:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-2: #f1f3f7;
  --panel: #ffffff;
  --panel-soft: #fbfcff;
  --text: #151b46;
  --muted: #9aa3b3;
  --line: #edf0f5;
  --line-soft: #f3f5f8;
  --primary: #ff962f;
  --primary-dark: #f47e1b;
  --primary-soft: #fff0df;
  --accent: #ff6c66;
  --accent-soft: #fff0ef;
  --mint: #e7f8f3;
  --sage: #f4f8f5;
  --cream: #fff8ec;
  --blue-soft: #eef5ff;
  --ok: #18b987;
  --warning: #e09a19;
  --danger: #ff6c66;
  --sidebar: #ffffff;
  --sidebar-dark: #f7f8fb;
  --sidebar-muted: #a8b0bf;
  --shadow: 0 16px 46px rgba(22, 31, 74, 0.09);
  --shadow-soft: 0 8px 24px rgba(22, 31, 74, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 150, 47, 0.08), transparent 260px),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  color: var(--text);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 28px rgba(22, 31, 74, 0.035);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand strong {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 1px;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.sidebar-brand {
  min-height: 48px;
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #ff6c66, #ff962f);
  font-weight: 850;
  letter-spacing: 0;
}

.brand-mark.large {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.side-nav {
  display: grid;
  gap: 3px;
  padding: 16px 0;
}

.side-section {
  margin: 16px 10px 7px;
  color: #b5bdca;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-section:first-child {
  margin-top: 0;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 9px;
  border-radius: 12px;
  color: #7d8797;
  font-size: 13px;
  font-weight: 700;
}

.side-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #ff962f, #ff7a35);
  box-shadow: 0 10px 20px rgba(255, 150, 47, 0.22);
}

.side-link.active {
  color: #fff;
  background: linear-gradient(135deg, #ff962f, #ff7a35);
  box-shadow: 0 10px 20px rgba(255, 150, 47, 0.22);
}

.side-link.active .side-icon,
.side-link:hover .side-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 9px;
  color: #a7b0bf;
  background: #f3f5f8;
  font-size: 10px;
  font-weight: 850;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line-soft);
}

.workspace-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #7d8797;
  background: #fbfcff;
  font-size: 12px;
  font-weight: 750;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #74b38d;
}

.main-area {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(22, 31, 74, 0.04);
  backdrop-filter: blur(14px);
}

.topbar strong {
  display: block;
  font-size: 13px;
}

.topbar-kicker {
  margin: 0 0 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.shell {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px;
}

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

.login-panel {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: center;
}

.login-panel.compact {
  display: block;
  max-width: 410px;
}

.login-copy h1 {
  margin: 16px 0 10px;
  font-size: 40px;
  line-height: 1.06;
}

.login-copy p {
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.login-card,
.panel,
.module-card,
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.login-card {
  padding: 26px;
  box-shadow: var(--shadow);
}

.login-card h2,
.login-card h1,
.panel h2,
.module-card h2 {
  margin: 0 0 8px;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
}

h3 {
  font-size: 14px;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  font-size: 12px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.button.is-loading {
  position: relative;
  padding-left: 30px;
  opacity: 0.82;
}

.button.is-loading::before {
  content: "";
  position: absolute;
  left: 11px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff962f, #ff7a35);
  box-shadow: 0 8px 18px rgba(255, 150, 47, 0.22);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary,
.button-ghost {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.button-secondary:hover,
.button-ghost:hover {
  color: var(--text);
  background: #fbfcff;
  border-color: #e1e6ee;
}

.button-danger {
  color: #fff;
  background: var(--danger);
}

.button-danger:hover {
  background: #9e4c44;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.58;
}

.full {
  width: 100%;
  margin-top: 14px;
}

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

.console-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 16px;
  padding: 4px 2px;
}

.integrations-page {
  display: grid;
  gap: 14px;
}

.connections-page {
  display: grid;
  gap: 16px;
}

.connections-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.connections-header h1 {
  margin: 3px 0 4px;
  font-size: 24px;
}

.connections-header p:not(.eyebrow) {
  margin: 0;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.social-account-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(22, 31, 74, 0.07);
  overflow: hidden;
}

.social-section-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.social-section-head h2 {
  margin: 0 0 2px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.social-logo,
.social-picker-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 950;
}

.social-logo img,
.social-picker-logo img {
  width: 58%;
  height: 58%;
  object-fit: contain;
}

.social-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.social-account-list {
  display: grid;
}

.social-account-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 90px 150px 78px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 16px;
}

.social-account-row + .social-account-row {
  border-top: 1px solid var(--line-soft);
}

.social-account-row:hover {
  background: #fbfcff;
}

.account-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-identity strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-stats {
  display: grid;
  gap: 1px;
}

.account-stats span {
  font-size: 16px;
  font-weight: 850;
}

.account-stats small {
  color: var(--muted);
  font-size: 10px;
}

.account-status {
  display: flex;
  justify-content: flex-start;
}

.empty-social-row {
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
}

.new-connection-dialog {
  width: min(760px, calc(100vw - 32px));
}

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

.social-picker-card {
  min-height: 128px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.social-picker-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 16px 34px rgba(22, 31, 74, 0.12);
}

.social-picker-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 12px;
}

.social-picker-card strong {
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.connection-method-step {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.connection-method-step[hidden] {
  display: none;
}

.connection-method-step h3 {
  margin: 0 0 3px;
}

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

.method-card {
  min-height: 108px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
}

.method-card:hover {
  border-color: var(--primary);
  background: #fffaf4;
}

.method-card span {
  width: fit-content;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #b85c12;
  background: var(--primary-soft);
  font-size: 10px;
  font-weight: 900;
}

.method-card strong {
  font-size: 14px;
}

.method-card small {
  color: var(--muted);
}

.method-card.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-list-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 90px;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.report-list-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.report-list-row strong {
  display: block;
}

.report-list-row span {
  color: var(--muted);
  font-size: 12px;
}

.publication-panel {
  display: grid;
  gap: 16px;
}

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

.publication-meta-grid .detail-card {
  display: grid;
  gap: 6px;
}

.publication-meta-grid .detail-card p {
  margin: 0;
}

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

.publication-mapping-grid {
  gap: 12px;
}

.publication-preview-table,
.publication-planned-list,
.publication-runs-list,
.publication-findings-list {
  display: grid;
  gap: 10px;
}

.publication-preview-row {
  align-items: start;
}

.publication-preview-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publication-planned-head {
  grid-template-columns: 90px 70px 90px minmax(0, 1fr) 160px;
}

.publication-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-size: 12px;
}

.publication-summary-strip strong {
  color: #151b46;
}

.publication-run-row {
  grid-template-columns: minmax(0, 1fr) auto 90px 90px;
}

.report-builder-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.report-builder-head h1 {
  margin: 4px 0;
  font-size: 24px;
}

.report-builder-head p {
  margin: 0;
}

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

.period-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.custom-period-fields {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-period-fields.hidden {
  display: none;
}

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

.a4-report-page {
  width: min(100%, 940px);
  min-height: 1329px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.a4-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.a4-page-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.a4-page-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.a4-widget-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.a4-widget-grid.grid-stack {
  display: block;
  min-height: 860px;
  margin: -14px;
}

.a4-widget-grid > .widget-width-full {
  grid-column: span 12;
}

.a4-widget-grid > .widget-width-half {
  grid-column: span 6;
}

.a4-widget-grid > .widget-width-third {
  grid-column: span 4;
}

.a4-widget-grid > .widget-width-two_thirds {
  grid-column: span 8;
}

.report-widget {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.grid-stack-item.report-widget {
  min-height: 0;
  display: block;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.report-widget-inner {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.grid-stack-item-content.report-widget-inner {
  inset: 14px !important;
  height: auto;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.grid-stack-item.ui-draggable-dragging .report-widget-inner,
.grid-stack-item.ui-resizable-resizing .report-widget-inner {
  border-color: var(--primary);
  box-shadow: 0 18px 38px rgba(255, 150, 47, 0.18), var(--shadow-soft);
}

.ui-resizable-handle {
  opacity: 0;
}

.grid-stack-item:hover .ui-resizable-handle {
  opacity: 1;
}

.report-widget.save-error {
  border-color: #ffb4a4;
  box-shadow: 0 0 0 3px rgba(255, 108, 102, 0.12), var(--shadow-soft);
}

.report-sources-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-size: 12px;
}

.report-sources-strip strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff3e4;
  color: #151b46;
  font-size: 11px;
}

.report-sources-strip form {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.report-sources-strip form button,
.mini-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #e5eaf2;
  border-radius: 999px;
  background: #fff;
  color: #6f7786;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.report-sources-strip form button {
  width: 24px;
  min-height: 24px;
  padding: 0;
}

.mini-command:hover,
.report-sources-strip form button:hover {
  border-color: #ff962f;
  color: #b85c12;
}

.report-sources-strip em {
  color: #8a93a5;
  font-style: normal;
}

.form-section-label {
  display: block;
  margin-bottom: 8px;
  color: #151b46;
  font-size: 12px;
  font-weight: 850;
}

.source-picker {
  min-height: min(66vh, 700px);
  max-height: min(66vh, 700px);
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
}

.source-filter-panel {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
}

.source-tools {
  display: grid;
  gap: 10px;
}

.source-search {
  display: grid;
  gap: 6px;
}

.source-search span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-search input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.source-search input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 150, 47, 0.14);
}

.source-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.source-category-filter button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #e5eaf2;
  border-radius: 999px;
  color: #6f7786;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.source-category-filter button:hover,
.source-category-filter button.is-active {
  border-color: #ff962f;
  color: #b85c12;
  background: #fff3e4;
  box-shadow: 0 8px 18px rgba(255, 150, 47, 0.12);
}

.source-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid #e9edf4;
  border-radius: 12px;
  background: #fff;
}

.source-option[hidden] {
  display: none;
}

.source-option input {
  width: 16px;
  height: 16px;
}

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

.source-option strong {
  color: #151b46;
  font-size: 12px;
}

.source-option small {
  color: var(--muted);
  font-size: 10px;
}

.chart-series-settings {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
}

.chart-series-settings[hidden] {
  display: none;
}

.chart-series-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.compact-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5f6878;
  font-size: 12px;
  font-weight: 800;
}

.compact-check input {
  width: 15px;
  height: 15px;
}

.chart-series-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(170px, 1.25fr) minmax(130px, 1fr) 44px 30px;
  gap: 8px;
  align-items: center;
}

.metric-search-input {
  min-height: 36px;
  font-size: 12px;
}

.metric-field,
.chart-series-row {
  position: relative;
}

.metric-field select[name="metric"],
.chart-series-row select[name="chart_metric"] {
  display: none;
}

.metric-autocomplete-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 4px;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(21, 27, 70, 0.14);
}

.metric-autocomplete-list[hidden] {
  display: none;
}

.metric-autocomplete-list button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #151b46;
  text-align: left;
  cursor: pointer;
}

.metric-autocomplete-list button:hover {
  background: #fff4e8;
}

.metric-autocomplete-list strong {
  font-size: 12px;
}

.metric-autocomplete-list span {
  color: var(--muted);
  font-size: 10px;
}

.chart-series-rows {
  display: grid;
  gap: 8px;
}

.chart-series-remove {
  width: 30px;
  height: 30px;
}

.chart-series-remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.chart-series-row input[type="color"] {
  width: 44px;
  min-height: 36px;
  padding: 3px;
}

.social-picker-card.is-selected {
  border-color: #ff962f;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(255, 150, 47, 0.14), var(--shadow-soft);
}

.social-picker-card.is-selected strong {
  color: #b85c12;
}

.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.legal-page h1 {
  margin: 6px 0 18px;
}

.legal-page h2 {
  margin: 24px 0 8px;
  color: #151b46;
  font-size: 15px;
}

.legal-page p {
  color: #4f586d;
  line-height: 1.7;
}

.widget-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.widget-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  position: relative;
}

.widget-tools .icon-command {
  width: 28px;
  height: 28px;
}

.widget-drag-handle {
  cursor: grab;
  touch-action: none;
}

.widget-drag-handle * {
  pointer-events: none;
}

.widget-drag-handle:active {
  cursor: grabbing;
}

.report-widget.is-dragging {
  opacity: 0.46;
  transform: scale(0.985);
}

.report-widget.drag-target {
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(255, 150, 47, 0.16);
}

.icon-command.active {
  border-color: var(--primary);
  color: #b85c12;
  background: #fff0df;
}

.width-menu {
  position: relative;
}

.width-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 150px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(32, 38, 45, 0.16);
}

.width-menu.is-open .width-menu-popover {
  display: grid;
  gap: 3px;
}

.width-menu-popover form {
  margin: 0;
}

.width-menu-popover button {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 780;
  text-align: left;
  cursor: pointer;
}

.width-menu-popover button:hover,
.width-menu-popover button.active {
  color: #b85c12;
  background: #fff0df;
}

.widget-head h3 {
  margin: 8px 0 3px;
}

.widget-kpi {
  margin-top: auto;
}

.widget-body {
  min-width: 0;
}

.widget-loading {
  min-height: 130px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  margin-top: auto;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8ef, #fff);
  color: #6f7786;
  font-size: 12px;
}

.loading-dot {
  width: 28px;
  height: 28px;
  border: 3px solid #ffe1bd;
  border-top-color: #ff962f;
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

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

.widget-kpi strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.widget-kpi span {
  display: inline-flex;
  margin-top: 10px;
  font-weight: 850;
}

.widget-error {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid #ffd2c7;
  border-radius: 14px;
  background: #fff7f4;
  color: #9d3f30;
  font-size: 12px;
}

.widget-error strong {
  color: #7e2d22;
  font-size: 13px;
}

.positive {
  color: var(--ok);
}

.negative {
  color: var(--danger);
}

.chart-shell {
  min-height: 150px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8ef, #fff);
}

.multi-chart-shell.chart-no-axis {
  grid-template-columns: minmax(0, 1fr);
}

.multi-chart-content {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.multi-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  color: #6f7786;
  font-size: 11px;
  font-weight: 800;
}

.multi-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.multi-chart-legend i {
  width: 18px;
  height: 9px;
  border-radius: 2px;
}

.chart-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.bar-chart {
  height: 140px;
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.bar-point {
  position: relative;
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-rows: 18px 1fr 16px;
  align-items: end;
  gap: 4px;
  text-align: center;
}

.bar-point::before,
.bar-point::after {
  position: absolute;
  left: 50%;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.bar-point::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 190px;
  padding: 8px 10px;
  border: 1px solid rgba(21, 27, 70, 0.08);
  border-radius: 10px;
  background: #151b46;
  box-shadow: 0 14px 30px rgba(21, 27, 70, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}

.bar-point::after {
  content: "";
  bottom: calc(100% + 4px);
  width: 10px;
  height: 10px;
  background: #151b46;
  transform: translate(-50%, 6px) rotate(45deg);
}

.bar-point:hover::before,
.bar-point:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bar-point:hover::after {
  transform: translate(-50%, 0) rotate(45deg);
}

.bar-value {
  overflow: hidden;
  color: #6f7786;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-point i {
  display: block;
  width: 100%;
  min-height: 8px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #ff962f, #ffcf8b);
}

.multi-bar-chart {
  height: 132px;
  align-items: stretch;
}

.bar-group {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 16px;
  gap: 4px;
  text-align: center;
}

.bar-group-bars {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
}

.bar-segment {
  position: relative;
  width: min(18px, 100%);
  min-width: 5px;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
}

.bar-segment i {
  width: 100%;
  min-height: 5px;
  display: block;
  border-radius: 999px 999px 3px 3px;
}

.bar-segment::before,
.bar-segment::after {
  position: absolute;
  left: 50%;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.bar-segment::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid rgba(21, 27, 70, 0.08);
  border-radius: 10px;
  background: #151b46;
  box-shadow: 0 14px 30px rgba(21, 27, 70, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}

.bar-segment::after {
  content: "";
  bottom: calc(100% + 4px);
  width: 10px;
  height: 10px;
  background: #151b46;
  transform: translate(-50%, 6px) rotate(45deg);
}

.bar-segment:hover::before,
.bar-segment:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bar-segment:hover::after {
  transform: translate(-50%, 0) rotate(45deg);
}

.bar-group small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-point small {
  color: var(--muted);
  font-size: 9px;
}

.line-chart {
  height: 140px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 18px;
  gap: 6px;
}

.line-plot {
  position: relative;
  min-width: 0;
  height: 112px;
  padding-inline: 14px;
}

.line-chart svg {
  width: 100%;
  height: 112px;
  overflow: visible;
}

.line-chart polyline {
  fill: none;
  stroke: #ff962f;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.line-hover-zones {
  position: absolute;
  inset: 0 14px;
}

.line-hover-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: max(18px, calc(100% / var(--line-points, 12)));
  transform: translateX(-50%);
}

.line-hover-zone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--point-y);
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ff962f;
  box-shadow: 0 4px 12px rgba(255, 150, 47, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
  transition: opacity 120ms ease, transform 120ms ease;
}

.line-hover-zone::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(var(--point-y) - 12px);
  width: max-content;
  max-width: 190px;
  padding: 8px 10px;
  border: 1px solid rgba(21, 27, 70, 0.08);
  border-radius: 10px;
  background: #151b46;
  box-shadow: 0 14px 30px rgba(21, 27, 70, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(6px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.line-hover-zone.tooltip-right::after {
  left: 0;
  transform: translate(0, -100%) translateY(6px);
}

.line-hover-zone.tooltip-left::after {
  left: auto;
  right: 0;
  transform: translate(0, -100%) translateY(6px);
}

.line-hover-zone:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.line-hover-zone:hover::after {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}

.line-hover-zone.tooltip-right:hover::after,
.line-hover-zone.tooltip-left:hover::after {
  transform: translate(0, -100%) translateY(0);
}

.line-values {
  display: grid;
  grid-template-columns: repeat(var(--line-points, 12), minmax(0, 1fr));
  gap: 2px;
  align-items: start;
}

.line-values span {
  min-width: 0;
  text-align: center;
}

.line-values small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-values .muted-label small {
  opacity: 0;
}

.widget-table {
  display: grid;
  gap: 8px;
}

.widget-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.widget-table span {
  color: var(--muted);
}

.widget-table small {
  color: var(--ok);
  font-weight: 850;
}

.comment-widget-content {
  color: #38405f;
  line-height: 1.65;
}

.comment-widget-content p {
  margin: 0 0 10px;
}

.comment-widget-content ul {
  margin: 0;
  padding-left: 18px;
}

.pie-widget {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: auto;
}

.pie-chart {
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.48);
}

.pie-chart span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: #fff;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(22, 31, 74, 0.1);
}

.pie-legend {
  display: grid;
  gap: 8px;
}

.pie-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.pie-legend span {
  color: var(--muted);
}

.pie-legend strong {
  font-size: 12px;
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wysiwyg-toolbar button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  font-weight: 850;
  font-size: 11px;
}

.wysiwyg-toolbar button:hover {
  border-color: var(--primary);
  color: #b85c12;
  background: #fff7ed;
}

.simple-editor {
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  outline: none;
}

.simple-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 150, 47, 0.15);
}

.empty-widget-state {
  min-height: 260px;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 28px;
  border: 1px dashed #dfe4ec;
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.empty-widget-state strong {
  color: var(--text);
  font-size: 16px;
}

.print-report-cover {
  width: 210mm;
  min-height: 297mm;
  display: grid;
  align-content: center;
  gap: 10px;
  margin: 0 auto 18px;
  padding: 28mm;
  background: #fff;
  box-shadow: var(--shadow);
  page-break-after: always;
}

.print-report-cover h1 {
  margin: 0;
  font-size: 36px;
}

.print-report-cover p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.print-report-cover span {
  color: var(--primary-dark);
  font-weight: 900;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .print-hidden {
    display: none !important;
  }

  .app-layout {
    display: block;
  }

  .main-area,
  .shell {
    display: block;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .a4-report-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 14mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    page-break-after: always;
  }

  .print-report-cover {
    margin: 0;
    box-shadow: none;
  }

  .report-widget {
    break-inside: avoid;
    box-shadow: none;
  }

  .a4-widget-grid {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }

  .widget-width-full {
    grid-column: span 12 !important;
  }

  .widget-width-half {
    grid-column: span 6 !important;
  }

  .widget-width-third {
    grid-column: span 4 !important;
  }

  .widget-width-two_thirds {
    grid-column: span 8 !important;
  }
}

.integrations-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 2px 0;
}

.integrations-header h1 {
  margin: 3px 0 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 820;
}

.integrations-split {
  min-height: calc(100vh - 190px);
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.integration-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.available-column {
  background: rgba(240, 245, 243, 0.7);
  border-right: 1px solid var(--line);
}

.connected-column {
  background: rgba(255, 255, 255, 0.92);
}

.column-toolbar {
  min-height: 108px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.62);
}

.column-toolbar h2 {
  margin: 0 0 4px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-box {
  width: min(230px, 42%);
  display: grid;
  gap: 5px;
}

.search-box span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.integration-list,
.connected-groups {
  overflow: auto;
}

.integration-list {
  max-height: calc(100vh - 300px);
  padding: 8px 14px 18px;
}

.integration-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(215, 224, 219, 0.72);
}

.integration-option:hover {
  background: rgba(255, 255, 255, 0.58);
}

.integration-logo {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #315f61;
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 950;
}

.integration-option-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.integration-option-main strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.integration-option-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.connected-groups {
  max-height: calc(100vh - 300px);
  padding: 10px 22px 22px;
}

.connected-group {
  padding: 18px 0;
}

.connected-group + .connected-group {
  border-top: 1px solid var(--line-soft);
}

.connected-group-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.connected-group-head h3 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.connected-account-list {
  display: grid;
  gap: 0;
  padding-left: 58px;
}

.connected-account {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 78px;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}

.connected-account-main {
  min-width: 0;
}

.connected-account-main strong {
  display: block;
  overflow: hidden;
  color: #52616a;
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connected-account-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.empty-compact {
  margin: 0;
  padding: 7px 0 7px 58px;
  color: var(--muted);
  font-size: 12px;
}

.console-hero h1 {
  margin: 3px 0 4px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 820;
}

.console-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
}

.command-button,
.icon-command {
  border: 1px solid transparent;
  appearance: none;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.command-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 820;
}

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

.command-button:disabled,
.icon-command:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.command-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff962f, #ff7a35);
  box-shadow: 0 8px 18px rgba(255, 150, 47, 0.22);
}

.command-muted {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.command-muted:hover {
  border-color: #e1e6ee;
  background: #fbfcff;
}

.command-danger {
  color: #9e4c44;
  border-color: #f0c8c4;
  background: #fff1ef;
}

.command-button.is-loading {
  cursor: wait;
  opacity: 0.78;
}

.command-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  font-size: 10px;
  font-weight: 900;
}

.command-primary .command-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.page-head h1 {
  margin: 3px 0 0;
  font-size: 23px;
  line-height: 1.15;
  font-weight: 780;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 850;
  letter-spacing: 0.08em;
}

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

.metric {
  padding: 14px;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  font-size: 25px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.module-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}

.module-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  position: relative;
  padding: 18px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: #47555e;
  font-size: 12px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 150, 47, 0.15);
}

input:disabled {
  color: #98a2a8;
  background: #f7f9f7;
}

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

.checklist span {
  padding: 10px 11px;
  border: 1px solid #cfe1db;
  border-radius: 9px;
  background: var(--primary-soft);
  color: #315f61;
  font-weight: 750;
  font-size: 12px;
}

.settings-layout,
.connections-workbench {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.connections-console {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.provider-rail {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.rail-title {
  margin: 4px 8px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 5px 7px;
  border-radius: 12px;
  color: #3f4e55;
}

.rail-link:hover {
  background: var(--primary-soft);
}

.rail-link span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #315f61;
  background: var(--primary-soft);
  font-size: 10px;
  font-weight: 900;
}

.rail-link strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-link small {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #6f5b2b;
  background: #fbf0ce;
  font-size: 11px;
  font-weight: 900;
}

.integration-stack {
  display: grid;
  gap: 14px;
}

.integration-panel,
.utility-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  overflow: clip;
}

.integration-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(251, 252, 250, 0.96), rgba(255, 255, 255, 0.84));
}

.integration-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.integration-title h2 {
  margin: 0 0 3px;
  font-size: 16px;
}

.integration-title p {
  margin: 0;
}

.integration-mark,
.identity-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #315f61;
  background: var(--primary-soft);
  font-weight: 900;
}

.integration-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.identity-mark {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  font-size: 11px;
}

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

.state-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #546168;
  background: #f5f7f5;
  font-size: 11px;
  font-weight: 850;
}

.state-ready {
  color: #0f8e68;
  background: #e7f8f3;
}

.state-missing {
  color: #b85c12;
  background: #fff0df;
}

.account-board {
  padding: 10px;
}

.account-board-head,
.account-line {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 120px 112px;
  gap: 10px;
  align-items: center;
}

.account-board-head {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.account-line {
  position: relative;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
}

.account-line + .account-line {
  margin-top: 4px;
}

.account-line:hover {
  border-color: var(--line);
  background: #fbfcfa;
}

.identity-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.identity-cell strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-count strong {
  display: block;
  font-size: 15px;
}

.asset-count small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.line-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.icon-command {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #dbe5df;
  border-radius: 10px;
  color: var(--text);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.icon-command.text-command {
  width: auto;
  min-width: 78px;
  padding: 0 10px;
}

.command-svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-command:hover {
  border-color: var(--primary);
  color: #b85c12;
  background: #fff8ef;
}

.icon-command.danger {
  color: #9e4c44;
  border-color: #f0c8c4;
  background: #fff7f5;
}

.icon-command.is-loading {
  color: transparent;
  position: relative;
}

.icon-command.is-loading::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid #315f61;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.empty-line {
  min-height: 72px;
  display: grid;
  place-items: center;
  gap: 3px;
  margin: 6px;
  padding: 18px;
  border: 1px dashed #cbd9d3;
  border-radius: 14px;
  color: var(--muted);
  background: #fbfcfa;
  text-align: center;
}

.empty-line strong {
  color: var(--text);
}

.utility-panel {
  display: grid;
  gap: 14px;
  padding: 15px;
}

.utility-panel h2 {
  margin: 0 0 3px;
}

.debug-inline-form {
  display: grid;
  grid-template-columns: 220px minmax(240px, 1fr) auto;
  gap: 9px;
}

.detail-grid {
  align-content: start;
}

.detail-card {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fbfcfa;
}

.asset-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.asset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}

.asset-row strong {
  display: block;
}

.token-form {
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.settings-menu,
.provider-menu {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.settings-menu a,
.provider-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 9px;
  border-radius: 9px;
  color: #46555c;
  font-weight: 750;
  font-size: 12px;
}

.settings-menu a:hover,
.provider-menu a:hover {
  color: #254f52;
  background: var(--primary-soft);
}

.provider-menu span,
.provider-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #315f61;
  background: var(--primary-soft);
  font-size: 10px;
  font-weight: 900;
}

.settings-content,
.connections-content {
  display: grid;
  gap: 14px;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-right: 116px;
}

.panel-title-row h2 {
  margin: 0;
}

.return-url-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.return-url-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcff;
}

.return-url-card strong,
.return-url-card small {
  display: block;
}

.return-url-card strong {
  color: #151b46;
  font-size: 13px;
}

.return-url-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.return-url-card code {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
  background: #fff;
  color: #315f61;
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.provider-config-info {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
}

.provider-info-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
}

.provider-info-block > strong {
  color: #151b46;
  font-size: 12px;
}

.return-url-card.compact {
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
  padding: 9px;
  box-shadow: none;
}

.return-url-card.compact span {
  color: #151b46;
  font-size: 12px;
  font-weight: 850;
}

.scope-provider-card.compact {
  padding: 10px;
  box-shadow: none;
}

.scope-provider-card.compact > div:first-child span {
  color: #151b46;
  font-size: 12px;
  font-weight: 850;
}

.scope-provider-card.compact em {
  font-style: normal;
}

.setting-row.compact {
  border: 0;
  padding: 0;
  background: transparent;
}

.scope-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.scope-provider-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
}

.scope-provider-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.scope-provider-card strong {
  color: #151b46;
  font-size: 13px;
}

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

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

.provider-row-card {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfcfa);
  box-shadow: var(--shadow-soft);
}

.provider-row-left {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 16px;
  border-right: 1px solid var(--line-soft);
}

.provider-row-right {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.provider-row-right h3,
.provider-card h3 {
  margin: 0 0 3px;
}

.provider-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 230px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.provider-card-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.provider-status,
.provider-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mini-account-list {
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}

.mini-account-list strong,
.provider-account-item span:not(.account-avatar),
.connected-identity-main strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.provider-account-stack {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.connected-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.connected-identity-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.connected-identity-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.sync-feedback {
  grid-column: 1 / -1;
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #315f61;
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.submit-feedback {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 0 9px;
  border-radius: 999px;
  color: #315f61;
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.modal-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(32, 38, 45, 0.22);
  overflow: hidden;
}

.token-dialog {
  width: min(560px, calc(100vw - 32px));
}

.report-source-dialog {
  width: min(1120px, calc(100vw - 32px));
  height: calc(100vh - 48px);
  max-height: 920px;
}

.report-source-dialog .modal-body {
  height: calc(100% - 73px);
  max-height: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-source-dialog .modal-body > .wide {
  grid-column: 1 / -1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.report-source-dialog .modal-actions {
  grid-column: 1 / -1;
}

.sources-dialog {
  width: min(1120px, calc(100vw - 32px));
  height: calc(100vh - 48px);
  max-height: 920px;
}

.sources-dialog .modal-body {
  height: calc(100% - 73px);
  max-height: none;
  display: flex;
  flex-direction: column;
}

.sources-dialog .modal-body > .wide {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.sources-dialog .source-picker {
  flex: 1;
}

.modal-dialog::backdrop {
  background: rgba(33, 43, 48, 0.35);
  backdrop-filter: blur(2px);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.modal-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.modal-head h2 {
  margin: 3px 0;
}

.modal-body {
  display: grid;
  gap: 16px;
  padding: 16px;
  overflow: auto;
}

.modal-body-has-head-submit > .modal-actions {
  display: none;
}

.modal-body h3 {
  margin: 0 0 9px;
}

.scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.scope-list span,
.badge-provider,
.status-ready,
.status-missing {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.scope-list span,
.badge-provider {
  color: #315f61;
  background: var(--primary-soft);
}

.status-ready {
  color: #346a54;
  background: var(--mint);
}

.status-missing {
  color: #8a6821;
  background: #fbf0ce;
}

.panel-title-row .status-ready,
.panel-title-row .status-missing {
  position: absolute;
  top: 18px;
  right: 18px;
}

.modal-assets-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.token-detail-list {
  display: grid;
  gap: 10px;
}

.token-detail-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.token-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.token-detail-head strong {
  display: block;
  margin-top: 6px;
}

.split-actions {
  justify-content: flex-start;
}

.token-detail-card .delete-form {
  justify-content: flex-start;
}

.modal-body > input[type="hidden"] {
  display: none;
}

.modal-body .actions-row {
  margin-top: 0;
}

.modal-body .form-grid {
  margin: 0;
}

.icon-close {
  align-self: flex-start;
}

.provider-account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel-soft);
}

.settings-category {
  margin-top: 20px;
}

.settings-category h3,
.credential-form h3,
.credential-card h3 {
  margin: 0 0 10px;
}

.settings-list {
  display: grid;
  gap: 9px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-soft);
}

.setting-row label {
  color: var(--text);
  font-size: 13px;
}

.setting-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.small {
  margin: 3px 0 0;
  font-size: 11px;
}

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

.notice {
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 750;
}

.notice-ok {
  color: #346a54;
  background: #eef8f2;
  border-color: #cbe8d7;
}

.notice-error {
  color: #95473f;
  background: #fff1ef;
  border-color: #f3c6c0;
}

.notice-soft {
  color: #6f7786;
  background: #f8fafc;
  border-color: #e7ebf3;
}

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

.oauth-card {
  display: grid;
  gap: 12px;
  align-content: space-between;
  min-height: 200px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.oauth-card h3 {
  margin: 8px 0 5px;
}

.connections-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.connections-list h3 {
  margin: 0;
}

.connection-row,
.account-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.connection-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.connection-row strong {
  display: block;
  margin-top: 6px;
}

.connection-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.accounts-table {
  display: grid;
  gap: 9px;
}

.account-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.account-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
}

.account-avatar.fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #315f61;
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 900;
}

.account-toggle {
  justify-content: flex-end;
  min-width: 108px;
}

.debug-result {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.debug-metrics {
  margin-bottom: 0;
}

.debug-json {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid #24333a;
  border-radius: 11px;
  color: #eaf0ed;
  background: #162227;
  font-size: 11px;
  line-height: 1.5;
}

.error-json {
  color: #ffe8e5;
  background: #3a2020;
}

.oauth-meta {
  display: grid;
  gap: 5px;
}

.credential-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
}

.inline-check input {
  width: 15px;
  min-height: 15px;
}

.credentials-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.credential-card {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.credential-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.badge-provider {
  text-transform: uppercase;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.delete-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.line-actions .delete-form,
.line-actions .sync-form {
  margin: 0;
}

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

.inline-comment-form {
  display: grid;
  gap: 10px;
}

.editable-comment {
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #38405f;
  background: #fff;
  line-height: 1.65;
  outline: none;
}

.comment-widget-content h2,
.editable-comment h2 {
  margin: 6px 0 8px;
  font-size: 18px;
}

.comment-widget-content h3,
.editable-comment h3 {
  margin: 6px 0 7px;
  font-size: 15px;
}

.comment-widget-content img,
.editable-comment img,
.comment-history-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.editable-comment:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 150, 47, 0.15);
}

.inline-save-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.comment-history-dialog {
  width: min(900px, calc(100vw - 32px));
}

.internal-notes-dialog {
  width: min(900px, calc(100vw - 32px));
}

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

.internal-notes-editor {
  min-height: 280px;
}

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

.comment-history-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.comment-history-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.comment-history-item header strong {
  color: #151b46;
  font-size: 12px;
}

.comment-history-content {
  color: #38405f;
  line-height: 1.65;
}

.published-posts-table {
  display: grid;
  gap: 0;
  font-size: 12px;
}

.published-posts-head,
.published-post-row {
  display: grid;
  grid-template-columns: 34px 48px 92px minmax(0, 1fr) 72px 72px 62px;
  gap: 10px;
  align-items: center;
}

.published-posts-head {
  min-height: 30px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.published-post-row {
  min-height: 42px;
  border-top: 1px solid var(--line-soft);
}

.published-post-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.published-post-row small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.post-thumb {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: #f8faf8;
  object-fit: cover;
  font-size: 10px;
  font-weight: 800;
}

.post-id {
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-section,
  .sidebar-footer {
    grid-column: 1 / -1;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .user-menu {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .shell {
    padding: 16px;
  }

  .login-panel,
  .module-grid,
  .metrics-grid,
  .publication-meta-grid,
  .integrations-split,
  .social-account-row,
  .social-picker-grid,
  .method-grid,
  .report-list-row,
  .report-builder-head,
  .widget-grid,
  .integration-option,
  .connected-group-head,
  .connected-account,
  .debug-inline-form,
  .oauth-grid,
  .provider-grid,
  .provider-row-card,
  .connections-console,
  .account-board-head,
  .account-line,
  .debug-inline-form,
  .connection-row,
  .account-row,
  .form-grid,
  .checklist,
  .settings-layout,
  .connections-workbench,
  .setting-row,
  .setting-control,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .settings-menu,
  .provider-menu,
  .provider-rail {
    position: static;
  }

  .account-board-head {
    display: none;
  }

  .account-line {
    gap: 8px;
    align-items: stretch;
  }

  .line-actions {
    justify-content: flex-start;
  }

  .provider-row-left {
    padding-right: 0;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .connected-identity,
  .modal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .console-hero,
  .integrations-header,
  .connections-header,
  .report-builder-head,
  .integration-head,
  .column-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .search-box {
    width: 100%;
  }

  .integration-list,
  .connected-groups {
    max-height: none;
  }

  .connected-account-list,
  .empty-compact {
    padding-left: 0;
  }
}
