:root {
  color-scheme: light;
  --ink: #172234;
  --muted: #485872;
  --line: #c9d3e2;
  --panel: rgba(255, 255, 255, 0.9);
  --blue: #0b7edc;
  --blue-dark: #075ca2;
  --green: #146c3a;
  --red: #ba141a;
  --bg: #b8cbe3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.5), transparent 28rem),
    linear-gradient(135deg, #d6e4f2, var(--bg));
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.app-header {
  margin-bottom: 18px;
}

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

.brand-logo {
  width: 56px;
  height: 56px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
}

.brand p,
.hint,
.compact p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(23, 34, 52, 0.08);
  padding: 22px;
  margin-top: 18px;
}

.compact {
  display: grid;
  gap: 8px;
}

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

.notice {
  display: grid;
  align-content: start;
  gap: 10px;
}

.notice ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.5;
}

.notice p {
  color: var(--muted);
  line-height: 1.5;
}

.salesforce-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.salesforce-card p {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 6px;
}

.is-hidden {
  display: none !important;
}

.tabs {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid #8fa0b6;
  margin: -6px 0 24px;
}

.tab {
  appearance: none;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  padding: 12px 2px 11px;
}

.tab.is-active {
  border-bottom-color: #2b88f0;
}

.tab-panel.is-hidden {
  display: none;
}

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

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

label {
  color: #303946;
  font-weight: 650;
}

input[type="file"] {
  width: 100%;
  border: 1px solid #7e8793;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  padding: 10px;
}

input[type="text"],
select {
  width: 100%;
  border: 1px solid #7e8793;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  min-height: 43px;
  padding: 8px 10px;
}

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

.stacked {
  margin-bottom: 18px;
}

.source-input {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid #7e8793;
  border-radius: 6px;
  background: #fff;
  color: #182230;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  padding: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  min-height: 43px;
  padding: 0 18px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border: 1px solid #7e8793;
  border-radius: 6px;
  background: #fff;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 650;
  padding: 0 18px;
  text-decoration: none;
}

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

.primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}

.primary:hover:not(:disabled) {
  background: var(--blue-dark);
}

.secondary {
  border: 1px solid #7e8793;
  background: #fff;
  color: var(--blue-dark);
}

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

.status {
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
}

.status.neutral {
  background: #e6ebf2;
  color: var(--muted);
}

.status.success {
  background: #dff4e8;
  color: var(--green);
}

.status.error {
  background: #f9dadd;
  color: var(--red);
}

.messages {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.message {
  line-height: 1.45;
}

.message.error {
  color: var(--red);
}

.message.success {
  color: var(--green);
}

.summary {
  overflow-x: auto;
  margin-bottom: 14px;
}

.next-step {
  border: 1px solid #b8d6c4;
  border-radius: 6px;
  background: #eef8f2;
  color: var(--green);
  line-height: 1.45;
  margin-bottom: 14px;
  padding: 10px 12px;
}

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

th,
td {
  border-bottom: 1px solid #d8dfeb;
  padding: 9px;
  text-align: left;
}

th {
  color: #34445b;
  font-weight: 750;
}

.output {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid #7e8793;
  border-radius: 6px;
  background: #fff;
  color: #182230;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  padding: 12px;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .brand {
    align-items: flex-start;
  }

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

  .salesforce-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  h1 {
    font-size: 28px;
  }

  .result-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}
