:root {
  --bg: #f3f4f7;
  --panel: #ffffff;
  --line: #e5e7eb;
  --text: #0f172a;
  --muted: #6b7280;
  --accent: #ff2d20;
  --danger: #ef4444;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 14px;
}

a { color: #0f172a; text-decoration: none; }
a:hover { color: var(--accent); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }

.sidebar {
  background: #f8f9fb;
  border-right: 1px solid var(--line);
  padding: 20px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 18px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px #ffe5e2;
}

.side-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9ca3af;
  margin: 14px 10px 8px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #334155;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
}
.side-link i {
  width: 16px;
  text-align: center;
  color: #94a3b8;
}
.side-link.active i,
.side-link:hover i { color: #b42318; }

.side-link.active,
.side-link:hover {
  background: #ffe5e2;
  color: #b42318;
}

.topbar {
  min-height: 64px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.topbar-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}
.topbar-title i { color: #ef4444; }

.top-search,
.input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #374151;
  font-size: 13px;
}
.input, select { margin-top: 6px; margin-bottom: 12px; }

.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  color: #374151;
}

.content-wrap { padding: 16px 18px 22px; }
.page-title-row { margin-bottom: 14px; }
.page-title { margin: 0; font-size: 34px; font-weight: 800; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  margin-bottom: 14px;
}

.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-head h3 { margin: 0; font-size: 22px; font-weight: 700; }
.toolbar-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.table-search {
  width: 300px;
  max-width: 42vw;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  background: #fff;
}
.table-filter {
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  background: #fff;
}
.server-controls {
  margin: 2px 0 12px;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafbfc 0%, #f7f9fc 100%);
  padding: 12px;
}
.server-controls-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
}
.server-controls-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}
.filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fff;
  min-height: 42px;
}
.filter-field i {
  color: #64748b;
  font-size: 12px;
}
.filter-field .table-filter,
.filter-field .table-search {
  border: none;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
  max-width: none;
}
.btn-light {
  background: #fff;
  color: #334155;
  border: 1px solid var(--line);
}
.lead-meta-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
}
.meta-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}
.th-sort {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.th-sort:hover { color: #0f172a; }
.th-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-weight: 700;
}
.th-sort-link span {
  color: #94a3b8;
  font-size: 11px;
  min-width: 14px;
  display: inline-flex;
  justify-content: center;
}
.th-sort-link:hover { color: #0f172a; }

.dashboard-main-grid,
.bottom-grid { display: grid; grid-template-columns: 1fr 390px; gap: 14px; }
.bottom-grid { margin-top: 8px; }
.bottom-grid .card { margin-bottom: 0; }
.dashboard-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.dashboard-title-row .page-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dashboard-title-row .page-title i {
  color: #ef4444;
  font-size: 28px;
}
.dashboard-glass {
  border: 1px solid #e6ecf4;
  background: linear-gradient(180deg, #ffffff 0%, #fafcfe 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px rgba(15, 23, 42, 0.04);
}
.analytics-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px 0 12px;
}
.analytics-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  padding: 6px 10px;
}
.analytics-chip i { color: #ef4444; }

.analytics-kpi { font-size: 42px; font-weight: 800; margin-bottom: 8px; }
.analytics-kpi span { font-size: 17px; font-weight: 600; color: var(--muted); }

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  padding: 14px;
  font-size: 13px;
}

.source-list {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
  display: grid;
  gap: 8px;
}
.source-list div { display: flex; justify-content: space-between; font-size: 14px; color: #334155; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot-green { background: #22c55e; }
.dot-blue { background: #3b82f6; }
.dot-yellow { background: #f59e0b; }
.dot-red { background: #ef4444; }

.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.dashboard-metric {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border-color: #e6ecf4;
}
.mini-title { color: var(--muted); font-size: 12px; font-weight: 600; }
.mini-title i { margin-right: 6px; color: #ef4444; }
.mini-value { font-size: 32px; font-weight: 800; margin-top: 3px; }

.pipeline-row {
  display: grid;
  grid-template-columns: 95px 1fr;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.pipeline-row span { color: #475569; font-size: 12px; font-weight: 600; }
.pipeline-row span i { margin-right: 6px; color: #ef4444; }
.bar { background: #eef2f7; border-radius: 999px; height: 10px; overflow: hidden; }
.bar > div { height: 10px; border-radius: 999px; background: linear-gradient(90deg, #ff5a52, #ff2d20); }
.pipeline-note { font-size: 12px; }

.link-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}
.link-btn i { margin-right: 6px; }
.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2563eb;
  font-weight: 600;
}
.link-inline:hover { color: #1d4ed8; }
.flow-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.flow-file i { color: #64748b; }

.settings-page { max-width: none; }
.settings-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
}
.settings-tab {
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
}
.settings-tab.active {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settings-field {
  border: 1px solid #e5ebf4;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}
.settings-field label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 8px;
}
.settings-field input[type="text"],
.settings-field input[type="password"] {
  width: 100%;
  border: 1px solid #d5deea;
  border-radius: 9px;
  padding: 9px 10px;
}
.settings-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.prompt-card {
  border: 1px solid #e5ebf4;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}
.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.prompt-head h3 {
  margin: 0;
  font-size: 18px;
}
.prompt-key { margin: 4px 0 8px; font-size: 12px; }
.prompt-card textarea {
  width: 100%;
  border: 1px solid #d5deea;
  border-radius: 10px;
  padding: 10px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
}
.settings-actions { margin-top: 10px; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
.btn-danger { background: #111827; }
.btn-mini {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 7px;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-pending { background: #fff7ed; color: #c2410c; }
.badge-processing { background: #e0f2fe; color: #0c4a6e; }
.badge-completed { background: #dcfce7; color: #14532d; }
.badge-failed { background: #fee2e2; color: #7f1d1d; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  border-bottom: 1px solid #edf0f5;
  padding: 9px;
  font-size: 13px;
  vertical-align: top;
}
th { color: #475569; font-weight: 700; }
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #edf0f5;
  border-radius: 10px;
}
.lead-table { min-width: 1080px; }
.lead-table th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #dde5ef;
}
.lead-table tbody tr:hover { background: #fcfdff; }
.pager-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pager-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.flash-error,
.flash-success {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-weight: 600;
}
.flash-error { background: #fee2e2; color: #7f1d1d; }
.flash-success { background: #dcfce7; color: #14532d; }

.muted { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.step-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.step-chip {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid #dbe2ea;
  background: #f8fafc;
  color: #334155;
  white-space: nowrap;
}
.step-info {
  margin-left: 5px;
  font-size: 11px;
  opacity: 0.8;
  cursor: help;
}

.step-success, .step-completed, .step-pushed { background: #dcfce7; color: #14532d; border-color: #bbf7d0; }
.step-failed, .step-rejected { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.step-skipped, .step-partial, .step-disqualified { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.step-processing, .step-retrying { background: #e0f2fe; color: #0c4a6e; border-color: #bae6fd; }
.lead-error {
  min-width: 260px;
}
.error-view-btn {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.error-view-btn:hover {
  background: #ffe4e6;
}
.error-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
}
.error-modal[hidden] {
  display: none !important;
}
.error-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.error-modal-dialog {
  position: relative;
  width: min(760px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.3);
  overflow: hidden;
}
.error-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
  background: #f8fafc;
}
.error-modal-head h3 {
  margin: 0;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}
.error-modal-head h3 i {
  color: #dc2626;
}
.error-modal-close {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.error-modal-body {
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  max-height: calc(100vh - 140px);
  color: #1e293b;
  line-height: 1.5;
  font-size: 13px;
}

.flow-summary-card { background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%); }
.workflow-board-card { background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%); }
.workflow-board {
  margin-top: 6px;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wf-node {
  min-width: 205px;
  border: 1px solid #e5ebf4;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.wf-node-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
}
.wf-node-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}
.wf-node-state {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: capitalize;
}
.wf-node-count {
  margin-top: 8px;
  color: #0f172a;
}
.wf-node-count strong {
  font-size: 24px;
  line-height: 1;
}
.wf-node-meta {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.wf-node-meta span {
  text-align: center;
  font-size: 10px;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 2px;
}
.wf-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  color: #94a3b8;
  font-size: 14px;
}
.wf-success { border-color: #bbf7d0; background: #f0fdf4; }
.wf-success .wf-node-state { background: #dcfce7; color: #14532d; }
.wf-processing { border-color: #bae6fd; background: #f0f9ff; }
.wf-processing .wf-node-state { background: #e0f2fe; color: #0c4a6e; }
.wf-failed { border-color: #fecaca; background: #fff1f2; }
.wf-failed .wf-node-state { background: #fee2e2; color: #991b1b; }
.wf-pending { border-color: #e2e8f0; background: #fff; }
.wf-pending .wf-node-state { background: #f1f5f9; color: #475569; }
.wf-partial { border-color: #fed7aa; background: #fff7ed; }
.wf-partial .wf-node-state { background: #ffedd5; color: #9a3412; }

.flow-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.flow-summary-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 38px;
  letter-spacing: -0.02em;
}
.flow-summary-head h2 i { color: #ef4444; font-size: 26px; }
.flow-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.kpi-card {
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}
.kpi-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.kpi-value {
  margin-top: 6px;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  color: #0f172a;
}
.kpi-status .kpi-value { text-transform: capitalize; font-size: 20px; }

.upload-card { max-width: 980px; }
.upload-wizard {
  max-width: 1040px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 14px;
}
.wizard-step {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}
.wizard-step.active {
  border-color: #fecaca;
  background: #fff5f5;
}
.wizard-step-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.wizard-step-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.mapping-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
  align-items: start;
}
.mapping-table-wrap {
  border: 1px solid #e5ebf4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.mapping-side {
  border: 1px solid #e5ebf4;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}
.sample-json {
  max-height: 360px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.45;
}
.mapping-wizard {
  width: 100%;
  max-width: none;
}
.mapping-table-wrap table {
  table-layout: fixed;
}
.mapping-table-wrap th:nth-child(1),
.mapping-table-wrap td:nth-child(1) {
  width: 58%;
}
.mapping-table-wrap th:nth-child(2),
.mapping-table-wrap td:nth-child(2) {
  width: 28%;
}
.mapping-table-wrap th:nth-child(3),
.mapping-table-wrap td:nth-child(3) {
  width: 14%;
}
.mapping-table-wrap th,
.mapping-table-wrap td {
  padding: 11px 10px;
  vertical-align: middle;
}
.mapping-table-wrap td:nth-child(1) {
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
}
.mapping-select {
  width: 100%;
  min-width: 220px;
  padding: 8px 10px;
  border: 1px solid #d5deea;
  border-radius: 9px;
  background: #fff;
  color: #334155;
}
.mapping-table-wrap .select2-container,
.filter-field .select2-container {
  width: 100% !important;
}
.select2-container--default .select2-selection--single {
  height: 40px;
  border: 1px solid #d5deea;
  border-radius: 9px;
  display: flex;
  align-items: center;
  background: #fff;
}
.filter-field .select2-container--default .select2-selection--single {
  border: none;
  height: 28px;
  background: transparent;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px;
  color: #334155;
  font-size: 13px;
  padding-left: 10px;
  padding-right: 26px;
}
.filter-field .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 28px;
  padding-left: 0;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
  right: 8px;
}
.select2-dropdown {
  border: 1px solid #d5deea;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #d5deea;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}
.select2-results__option {
  font-size: 13px;
  padding: 8px 10px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: #ef4444;
  color: #fff;
}
.mapping-confidence {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.upload-dropzone {
  margin-top: 10px;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: .2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: #ff2d20;
  background: #fff5f4;
}

.upload-dropzone.has-file {
  border-color: #16a34a;
  background: #f0fdf4;
}

.upload-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #ffe5e2;
  color: #b42318;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
}

.upload-title { font-size: 16px; font-weight: 700; }
.upload-subtitle { font-size: 12px; color: #64748b; margin-top: 4px; }
.upload-file-name { font-size: 13px; color: #334155; margin-top: 10px; font-weight: 600; }
.upload-actions { margin-top: 12px; }

pre {
  overflow: auto;
  white-space: pre-wrap;
  background: #0b1020;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.guest-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.guest-container { width: 100%; max-width: 500px; }

@media (max-width: 1200px) {
  .dashboard-main-grid,
  .bottom-grid { grid-template-columns: 1fr; }
  .flow-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-title-row { align-items: center; }
}

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { flex-direction: column; height: auto; align-items: stretch; }
  .top-actions { justify-content: space-between; flex-wrap: wrap; }
  .table-search { width: 100%; max-width: none; }
  .server-controls-grid { grid-template-columns: 1fr 1fr; }
  .server-controls-actions { justify-content: flex-start; }
  .flow-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mapping-layout { grid-template-columns: 1fr; }
  .mapping-select { min-width: 100%; }
}

@media (max-width: 800px) {
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 1fr; }
  .content-wrap { padding: 12px; }
  .page-title { font-size: 32px; }
  .brand { font-size: 28px; }
  .server-controls-grid { grid-template-columns: 1fr; }
  .flow-summary-head { flex-direction: column; align-items: flex-start; }
  .flow-summary-head h2 { font-size: 30px; }
  .flow-kpis { grid-template-columns: 1fr; }
  .dashboard-title-row { flex-direction: column; align-items: flex-start; }
  .wizard-steps { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-tabs { flex-wrap: wrap; }
}
