:root {
  color-scheme: light;
  --bg: #eef1f3;
  --panel: #ffffff;
  --ink: #20262a;
  --muted: #67727a;
  --line: #d6dde2;
  --dark: #1f2a30;
  --dark-2: #26343b;
  --accent: #2f766d;
  --accent-strong: #245c55;
  --blue: #2c6596;
  --orange: #bd6b22;
  --red: #aa3f38;
  --shadow: 0 16px 42px rgba(31, 42, 48, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #172227;
}

.auth-card {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.auth-card h1 {
  margin: 0;
  font-size: 28px;
}

.auth-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.auth-message {
  min-height: 20px;
  color: var(--red);
  font-weight: 700;
}

.auth-setup {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f9fa;
  color: #35424a;
  word-break: break-word;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  background: var(--dark);
  color: #f7fafb;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  overflow: auto;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #324249;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 850;
}

.brand h1,
.topbar h2,
.editor-header h3,
.panel-heading h3 {
  margin: 0;
  line-height: 1.1;
}

.brand h1 {
  font-size: 1.08rem;
}

.brand p,
.eyebrow,
.sidebar-block p,
.empty-editor span,
.status-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.sidebar .brand p,
.sidebar-block p {
  color: rgba(247, 250, 251, 0.68);
}

.field {
  display: grid;
  gap: 7px;
}

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

.field span,
.checkbox-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.sidebar .field span,
.sidebar .checkbox-field span {
  color: rgba(247, 250, 251, 0.72);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 101, 150, 0.12);
}

.sidebar input,
.sidebar select {
  background: #172126;
  border-color: rgba(255, 255, 255, 0.17);
  color: #fff;
}

.sidebar-actions,
.toolbar,
.editor-actions,
.panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-actions .button {
  flex: 1;
}

.full-button {
  width: 100%;
}

.button {
  border: 1px solid var(--accent-strong);
  background: var(--accent);
  color: #fff;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  font-weight: 760;
}

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

.button.is-busy {
  opacity: 0.76;
  cursor: progress;
}

.button.is-done {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.button--ghost.is-active {
  border-color: var(--accent-strong);
  background: #e8f3f0;
  color: var(--accent-strong);
}

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

.sidebar .button--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.button--danger {
  background: #fff;
  color: var(--red);
  border-color: rgba(170, 63, 56, 0.35);
}

.button--danger:hover {
  background: #fff3f2;
}

.sidebar-block {
  display: grid;
  gap: 13px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-block h2 {
  margin: 0;
  color: rgba(247, 250, 251, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metrics {
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.metrics div {
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  padding: 10px 8px;
}

.metrics span {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 850;
}

.main {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px 18px 14px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(180px, auto) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.topbar h2 {
  font-size: 1.52rem;
}

.toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
  row-gap: 8px;
}

.source-input {
  flex: 1 1 280px;
  width: auto;
  min-width: 240px;
}

.compact-select {
  flex: 0 0 152px;
  width: 152px;
}

.mode-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 3px;
}

.mode-button,
.utility-tab-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 30px;
  border-radius: 5px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 780;
  white-space: nowrap;
}

.mode-button.is-active,
.utility-tab-button.is-active {
  background: #e8f3f0;
  color: var(--accent-strong);
}

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

.summary-strip article {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.summary-strip strong {
  display: block;
  margin-top: 0;
  font-size: 1.08rem;
}

.workspace {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(380px, 1.05fr) minmax(340px, 0.95fr);
  gap: 16px;
}

.table-panel,
.editor-panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.table-panel,
.editor-panel {
  min-height: 0;
  overflow: hidden;
}

.table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.table-panel {
  display: flex;
  flex-direction: column;
}

.worklist-bar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  flex: 0 0 auto;
}

.worklist-button,
.editor-tab-button {
  border: 1px solid var(--line);
  background: #f8fafb;
  color: var(--ink);
  min-height: 32px;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 760;
  white-space: nowrap;
}

.worklist-button span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e2e8ec;
  color: #42515a;
  font-size: 0.72rem;
}

.worklist-button.is-active,
.editor-tab-button.is-active {
  border-color: var(--accent-strong);
  background: #e8f3f0;
  color: var(--accent-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fa;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.is-active {
  background: #eef6f4;
}

.title-cell {
  min-width: 220px;
  font-weight: 760;
}

.muted-cell {
  color: var(--muted);
  font-size: 0.82rem;
}

.row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.row-badges span,
.export-check-metrics span {
  display: inline-grid;
  min-height: 21px;
  place-items: center;
  border-radius: 999px;
  background: #e7ecef;
  color: #39464d;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 780;
}

.row-badges span[data-tone="green"],
.export-check-metrics span[data-tone="green"] {
  background: #dff0e9;
  color: #23624f;
}

.row-badges span[data-tone="orange"],
.export-check-metrics span[data-tone="orange"] {
  background: #fff0df;
  color: #8a4d18;
}

.row-badges span[data-tone="red"],
.export-check-metrics span[data-tone="red"] {
  background: #fae4e2;
  color: #8f342f;
}

.status-pill {
  display: inline-grid;
  min-width: 84px;
  min-height: 24px;
  place-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7ecef;
  color: #39464d;
  font-size: 0.76rem;
  font-weight: 780;
  white-space: nowrap;
}

.status-pill[data-tone="green"] {
  background: #dff0e9;
  color: #23624f;
}

.status-pill[data-tone="orange"] {
  background: #fff0df;
  color: #8a4d18;
}

.status-pill[data-tone="red"] {
  background: #fae4e2;
  color: #8f342f;
}

.editor-panel {
  padding: 0;
  overflow: auto;
}

.empty-editor {
  min-height: 100%;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 14px 16px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.editor-header h3 {
  font-size: 1.2rem;
}

.editor-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  overflow-x: auto;
}

[data-editor-panel].is-editor-tab-hidden {
  display: none;
}

.editor-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 1 0 100%;
  width: 100%;
  max-width: 390px;
  margin-left: auto;
  align-items: stretch;
}

.editor-actions .button {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-meta {
  margin-top: 8px;
  color: #435059;
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.form-section {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.form-section--lead {
  border-top: 0;
}

.form-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.form-section-heading h4 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.form-section-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

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

.form-grid--primary {
  grid-template-columns: minmax(0, 1.3fr) minmax(170px, 0.7fr);
}

.checkbox-field {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding-top: 20px;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.form-button {
  align-self: end;
}

.photo-upload-zone {
  grid-column: 1 / -1;
  min-height: 78px;
  border: 1px dashed #9fb0b8;
  background: #f7fafb;
  border-radius: 6px;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  color: var(--muted);
  outline: none;
}

.photo-upload-zone strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.photo-upload-zone span,
.photo-process-info {
  color: var(--muted);
  font-size: 0.8rem;
}

.photo-upload-zone:focus,
.photo-upload-zone.is-dragover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 101, 150, 0.12);
}

.photo-upload-zone.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.photo-process-info {
  align-self: end;
  min-height: 38px;
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
}

.photo-preflight-output {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  background: #f8fafb;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.photo-preflight-output[data-tone="warning"] {
  border-color: rgba(189, 107, 34, 0.35);
  background: #fff8ef;
}

.photo-preflight-output[data-tone="error"] {
  border-color: rgba(170, 63, 56, 0.35);
  background: #fff5f4;
}

.preflight-warning {
  color: #8a4d18;
  font-weight: 720;
}

.preflight-error {
  color: var(--red);
  font-weight: 760;
}

.photo-editor {
  grid-column: 1 / -1;
  order: -10;
  border: 1px solid var(--line);
  background: #fbfcfc;
  border-radius: 6px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.photo-editor-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.photo-editor-heading strong {
  font-size: 0.94rem;
}

.photo-editor-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.photo-editor-heading span[data-tone="error"] {
  color: var(--red);
  font-weight: 740;
}

.photo-crop-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 42 / 24;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  margin: 0;
}

.photo-crop-preview.is-dragging {
  cursor: grabbing;
}

.photo-crop-preview.is-resizing {
  cursor: nwse-resize;
}

.photo-crop-preview img {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--crop-image-width, 100%);
  height: var(--crop-image-height, 100%);
  object-fit: contain;
  object-position: 50% 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(31, 42, 48, 0.16);
  background: #eef1f3;
  pointer-events: none;
}

.photo-crop-frame {
  position: absolute;
  left: var(--crop-frame-x, 50%);
  top: var(--crop-frame-y, 50%);
  width: var(--crop-frame-width, 100%);
  aspect-ratio: 42 / 24;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 999px rgba(31, 42, 48, 0.08), inset 0 0 0 1px rgba(31, 42, 48, 0.35), 0 1px 8px rgba(31, 42, 48, 0.22);
  pointer-events: auto;
}

.photo-crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(31, 42, 48, 0.28);
  pointer-events: auto;
}

.photo-crop-handle--nw {
  left: -8px;
  top: -8px;
  cursor: nwse-resize;
}

.photo-crop-handle--ne {
  right: -8px;
  top: -8px;
  cursor: nesw-resize;
}

.photo-crop-handle--sw {
  left: -8px;
  bottom: -8px;
  cursor: nesw-resize;
}

.photo-crop-handle--se {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
}

.photo-crop-handle--center {
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.crop-adjustments {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.crop-nudge {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.crop-nudge .button,
.crop-reset-button {
  min-height: 32px;
  padding: 0 8px;
}

.crop-zoom-field input[type="range"] {
  padding: 0;
}

.crop-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.crop-toolbar .button {
  min-height: 34px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  margin-top: 12px;
}

.text-preview {
  min-height: 104px;
  border: 1px solid var(--line);
  background: #fbfcfc;
  padding: 12px;
  line-height: 1.45;
  border-radius: 6px;
}

.text-preview strong {
  color: #11191d;
}

.text-preview a {
  color: var(--blue);
}

.photo-preview {
  margin: 0;
  border: 1px solid var(--line);
  background: #f7f9fa;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.photo-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-preview figcaption {
  padding: 7px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.warning {
  margin: 12px 16px 0;
  border: 1px solid rgba(189, 107, 34, 0.35);
  background: #fff4e8;
  color: #7e4617;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 720;
}

.form-section .warning {
  margin-left: 0;
  margin-right: 0;
}

.utility-drawer {
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.utility-bar {
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
}

.utility-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.utility-drawer.is-collapsed .bottom-panel {
  display: none;
}

.bottom-panel {
  display: block;
  min-height: 0;
  max-height: min(360px, 38vh);
  overflow: auto;
  border-top: 1px solid var(--line);
}

.bottom-panel > div {
  padding: 14px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(120px, 1fr);
  gap: 10px;
}

.panel-heading {
  justify-content: space-between;
  margin-bottom: 10px;
}

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

.panel-heading h3 {
  font-size: 1rem;
}

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

.export-check {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  background: #f8fafb;
  border-radius: 6px;
  padding: 10px 12px;
}

.export-check[data-tone="warning"] {
  border-color: rgba(189, 107, 34, 0.35);
  background: #fff8ef;
}

.export-check[data-tone="error"] {
  border-color: rgba(170, 63, 56, 0.35);
  background: #fff5f4;
}

.export-check > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.export-check strong {
  font-size: 0.9rem;
}

.export-check span {
  color: var(--muted);
  font-size: 0.78rem;
}

.export-check-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#exportOutput,
#blacklistInput,
#classifiedsInput,
#historyOutput {
  min-height: 142px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.classifieds-sync {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 10px 14px;
  align-items: end;
  margin-bottom: 10px;
}

.classifieds-sync .field {
  margin: 0;
}

.sync-status {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-readiness {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 0.86rem;
}

.auth-readiness strong {
  color: var(--text);
}

.users-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.users-grid {
  min-width: 1180px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 150px minmax(190px, 1fr) 150px 92px minmax(260px, 1.2fr) 110px 90px;
  gap: 8px;
  align-items: center;
}

.users-grid--head {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 2px;
}

.users-grid input,
.users-grid select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  padding: 7px 9px;
}

.user-auth-fields {
  display: grid;
  grid-template-columns: auto 94px auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.user-auth-fields label,
.user-active {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.photo-upload-zone.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status-line {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 20;
  min-height: 36px;
  max-width: min(520px, calc(100vw - 36px));
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 12px 30px rgba(31, 42, 48, 0.14);
  padding: 8px 12px;
  overflow-wrap: anywhere;
}

.status-line[data-tone="error"] {
  border-color: rgba(170, 63, 56, 0.35);
  background: #fff5f4;
  color: var(--red);
  font-weight: 740;
}

.status-line[data-tone="ok"] {
  color: #44525a;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
}

@media (max-width: 1040px) {
  .workspace,
  .bottom-panel {
    grid-template-columns: 1fr;
  }

  .classifieds-sync {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    max-height: 420px;
  }
}

@media (max-width: 820px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: static;
  }

  .main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    grid-template-rows: auto;
  }

  .workspace,
  .bottom-panel {
    overflow: visible;
  }

  .topbar,
  .toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    flex-direction: column;
  }

  .source-input,
  .compact-select {
    width: 100%;
  }

  .summary-strip,
  .form-grid,
  .settings-grid,
  .crop-adjustments,
  .crop-toolbar,
  .preview-row,
  .bottom-panel {
    grid-template-columns: 1fr;
  }

  .users-grid {
    min-width: 720px;
    grid-template-columns: 140px 130px 170px 130px 210px 80px;
  }
}
