/* qb2odoo — one small stylesheet. IBM Plex Sans, quiet neutrals, Odoo purple as the one accent. */
@font-face {          /* IBM Plex Sans (SIL Open Font License), latin subset, variable weight */
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin.woff2") format("woff2");
}
:root {
  --bg: #f6f5f7;
  --surface: #ffffff;
  --ink: #2a2730;
  --ink-2: #514b57;
  --muted: #77707d;
  --line: #e6e3e8;
  --line-2: #d6d1da;
  --accent: #714b67;
  --accent-hover: #5e3d56;
  --accent-ink: #ffffff;
  --accent-soft: #f3edf2;
  --ok: #2f7a4b;   --ok-soft: #e7f3ec;
  --warn: #8a5a00; --warn-soft: #fbf3e2;
  --bad: #a8322c;  --bad-soft: #fbeceb;
  --info: #2d5b86; --info-soft: #eaf1f8;
  --radius: 6px;
  --shadow: none;
  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .4em; font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; color: var(--ink); margin-top: 1.2em; }
p { margin: 0 0 .8em; }
code { font-family: var(--mono); font-size: .88em; background: #f1eef2; padding: .1em .35em; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 14px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink); text-decoration: none; font-size: 1.1rem; letter-spacing: -.01em; }
.brand-mark { display: inline-flex; }
.brand-sub { color: var(--muted); font-size: .85rem; border-left: 1px solid var(--line); padding-left: 14px; }
.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a { color: var(--ink-2); text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: .92rem; }
.topnav a:hover { background: var(--bg); }
.topnav a[aria-current] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
main.wrap { padding-top: 28px; padding-bottom: 40px; min-height: calc(100vh - 140px); }
.footer { color: var(--muted); font-size: .8rem; padding-bottom: 28px; }

/* page + project head */
.page-head, .project-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.project-head h1 { margin-bottom: 2px; }
.project-head p { margin: 0; }
.crumb { font-size: .85rem; color: var(--muted); text-decoration: none; }
.crumb::after { content: " /"; }
.section-head { margin: 8px 0 16px; }
.section-head p { max-width: 760px; }

/* step indicator */
.steps { list-style: none; display: flex; margin: 0 0 24px; padding: 14px 18px; background: var(--surface);
         border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); counter-reset: s; }
.step { flex: 1; position: relative; display: flex; justify-content: center; }
.step + .step::before { content: ""; position: absolute; top: 14px; right: calc(50% + 18px); left: calc(-50% + 18px);
                        height: 2px; background: var(--line); }
.step-done + .step::before, .step-done + .step-current::before { background: var(--accent); opacity: .45; }
.step a, .step > span { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-size: .84rem; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .82rem;
            border: 2px solid var(--line-2); background: var(--surface); color: var(--muted); position: relative; z-index: 1; }
.step-done .step-dot { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.step-current .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.step-current .step-label { color: var(--ink); font-weight: 600; }
.step-blocked > span { color: #aaa3b0; cursor: default; }
.step a:hover .step-label { color: var(--accent); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
        padding: 20px 22px; margin-bottom: 16px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .table { margin: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head.padded { padding: 16px 20px 6px; }
.card-disabled { opacity: .7; }
.card.narrow, section.narrow { max-width: 720px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.choice-grid .card { margin-bottom: 0; }
.choice { transition: border-color .15s, box-shadow .15s; }
.choice-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice-radio { cursor: pointer; }
.choice-title { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.choice-title h3 { margin: 0; }
.choice-title input { width: 18px; height: 18px; accent-color: var(--accent); }
.split { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.split p { margin: 0; max-width: 680px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.empty { text-align: center; padding: 48px 24px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); margin-bottom: 16px; }
.empty p { max-width: 560px; margin-left: auto; margin-right: auto; color: var(--ink-2); }
.small-empty { padding: 20px; }

/* stats */
.extract-line { font-size: 1.02rem; margin: 2px 0 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 10px; }
.stat { background: var(--bg); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; }
.stat-n { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--muted); font-size: .8rem; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; margin: 8px 0 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table { font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .85rem;
            background: var(--surface); border-bottom: 1px solid var(--line); padding: 9px 12px; position: sticky; top: 0; z-index: 1; }
.table td { border-bottom: 1px solid var(--line); padding: 9px 12px; vertical-align: middle; }
.table td > a:first-child:not(.btn) { color: var(--ink); font-weight: 500; text-decoration: none; }
.table td > a:first-child:not(.btn):hover { color: var(--accent); text-decoration: underline; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-compact td, .table-compact th { padding: 6px 10px; }
.table-kv td:first-child { color: var(--ink-2); }
.table tr.total td { font-weight: 600; border-top: 2px solid var(--line-2); }
.card > .table-compact { margin-bottom: 8px; }
.table-scroll { max-height: 70vh; overflow: auto; }
.table-mapping td { padding: 7px 12px; }
.table-mapping .when-map, .table-mapping .when-create { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
[data-action="map"] .when-create, [data-action="create"] .when-map { display: none; }
.table-mapping .if-target, .table-mapping .if-fields, .table-mapping .if-type { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 2px 0; }
[data-action="create"] .if-target, [data-action="map"] .if-fields, [data-action="map"] .if-type, [data-action="merge"] .if-type { display: none; }
.table-mapping .note { margin-top: 3px; }
.mapping-summary .summary-line { font-size: 1rem; margin: 0 0 6px; }
.toolbar.wrap { flex-wrap: wrap; margin-top: 8px; }
.code { font-family: var(--mono); font-size: .85em; color: var(--ink-2); }
.toolbar { display: flex; gap: 12px; align-items: center; }

/* forms */
.form .field, .field { margin-bottom: 16px; }
.field.inline { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.field.inline label { margin: 0; font-weight: 500; }
.field.field-attention { background: var(--warn-soft); border: 1px solid #efdcb3; border-radius: 8px; padding: 10px 12px; }
label, .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
input[type=text], input[type=url], input[type=password], input[type=date], input[type=number], input[type=search], input:not([type]), select {
  font: inherit; font-size: .92rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 5px; padding: 7px 10px; min-height: 36px; max-width: 100%; }
.form input[type=text], .form input[type=url], .form input[type=password], .form input:not([type]) { width: 100%; max-width: 520px; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[readonly] { background: var(--bg); color: var(--ink-2); }
.input-code { width: 110px; }
.input-name { width: 220px; }
.table-mapping select { max-width: 200px; }
.hint { color: var(--muted); font-size: .84rem; margin: 6px 0 0; max-width: 720px; }
.radio, .checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 8px 0; cursor: pointer; }
.radio input, .checkbox input { margin-top: 4px; accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
details summary { cursor: pointer; color: var(--ink-2); margin-bottom: 8px; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.actions form { margin: 0; }
.actions[hidden] { display: none; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 10px; z-index: 2; }
.reset-form { margin-top: 4px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: .92rem;
       border-radius: 5px; padding: 8px 16px; min-height: 36px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
       transition: background .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-quiet { background: transparent; color: var(--ink-2); font-weight: 500; }
.btn-quiet:hover { background: #efecf0; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #8e2924; }
.btn-danger-text { color: var(--bad); }
.btn-undo { background: var(--surface); color: var(--bad); border-color: #e3b4b0; }
.btn-undo:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-small { padding: 4px 10px; min-height: 30px; font-size: .85rem; }
.btn[disabled], fieldset[disabled] .btn { opacity: .5; cursor: not-allowed; }

/* alerts, badges, banner */
.flashes { margin-bottom: 16px; }
.alert { border-radius: 8px; padding: 11px 14px; margin-bottom: 12px; border: 1px solid; font-size: .93rem; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-info { background: var(--info-soft); border-color: #cfe0ef; color: #1f4466; }
.alert-success { background: var(--ok-soft); border-color: #cbe5d5; color: #1f5a36; }
.alert-warning { background: var(--warn-soft); border-color: #efdcb3; color: #6b4600; }
.alert-error { background: var(--bad-soft); border-color: #efcdca; color: #7f241f; }
.badge { display: inline-block; font-size: .78rem; font-weight: 500; padding: 1px 8px; border-radius: 4px; background: #efecf0; color: var(--ink-2); vertical-align: 1px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 16px; border: 1px solid; }
.banner p { margin: 2px 0 0; }
.banner-title { font-size: 1.15rem; }
.banner-pass { background: var(--ok-soft); border-color: #bfdcc9; color: #1f5a36; }
.banner-fail { background: var(--bad-soft); border-color: #ebc4c0; color: #7f241f; }
.banner-actions { display: flex; gap: 8px; }
.checks { padding-top: 6px; padding-bottom: 6px; }
.checks .check { padding: 14px 0; border-bottom: 1px solid var(--line); }
.checks .check:last-child { border-bottom: 0; }
.check-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.check-head h3 { margin: 0 0 2px; font-size: 1rem; }
.check-head p { margin: 0; }
.check-status { white-space: nowrap; font-weight: 500; font-size: .92rem; }
.check-ok { color: var(--ok); }
.check-bad { color: var(--bad); }
.checks .table-scroll { margin-top: 10px; }
.card.check-pass { border-color: #bfdcc9; }
.card-ok { border-color: #bfdcc9; background: #fafdfb; }
.card-ok h3 { color: #1f5a36; }
.change-connection > summary { margin: 0; font-weight: 500; }
.change-connection[open] > summary { margin-bottom: 14px; }
.warnings { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: .9rem; max-height: 260px; overflow: auto; }
ul.plain { padding-left: 18px; color: var(--ink-2); }
ul.plain li { margin-bottom: 6px; }

/* progress */
.job-card { border-color: #cfe0ef; }
.job-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.job-pct { margin-left: auto; font-variant-numeric: tabular-nums; }
.job-msg { margin: 8px 0 2px; min-height: 1.2em; }
.bar { height: 8px; background: #ece9ee; border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
.bar-indeterminate > span { width: 30% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stages { list-style: none; padding: 0; margin: 4px 0 14px; }
.stage { display: flex; align-items: center; gap: 10px; padding: 5px 0; color: var(--muted); }
.stage-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.stage-done { color: var(--ink-2); }
.stage-done .stage-dot { background: var(--accent); border-color: var(--accent); }
.stage-active { color: var(--ink); font-weight: 600; }
.stage-active .stage-dot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stage-failed { color: var(--bad); font-weight: 600; }
.stage-failed .stage-dot { background: var(--bad); border-color: var(--bad); }

/* upload */
.dropzone { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--line-2); border-radius: 8px;
            padding: 22px; background: #fbfafb; cursor: pointer; font-weight: 500; text-align: center; margin: 10px 0 0; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone-text { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dropzone.busy { pointer-events: none; opacity: .6; }
.upload-progress { margin-top: 12px; }

@media (max-width: 860px) {
  .choice-grid, .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .brand-sub { display: none; }
  .step-label { font-size: .74rem; }
  .split { flex-direction: column; align-items: flex-start; }
  .kv { grid-template-columns: 1fr; }
}

/* -- hosted additions ------------------------------------------------------ */
.nav-form { display: inline; margin: 0; }
.nav-button { font: inherit; font-size: .92rem; color: var(--ink-2); background: none; border: 0; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.nav-button:hover { background: var(--bg); }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer-links { display: inline-flex; gap: 14px; margin-left: auto; }
.auth-card { max-width: 440px; margin: 40px auto; }
.auth-card .form input { max-width: 100%; }
input[type=email] { font: inherit; font-size: .92rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 5px; padding: 7px 10px; min-height: 36px; max-width: 100%; }
.form input[type=email] { width: 100%; max-width: 520px; }
.code-block { font-family: var(--mono); background: #f1eef2; padding: 8px 10px; border-radius: 6px; margin: 8px 0; white-space: pre-wrap; }
.choice-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
a.choice-link { color: inherit; text-decoration: none; display: block; }
/* source cards: the action on top, in the same place on every card, then the title and the text */
.choice-action { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 142px; margin-bottom: 14px; }
.choice-action > form, .choice-action > .btn { width: 80%; }
.choice-action > form > .btn { width: 100%; }
.choice-action .upload-form { width: 100%; }
.choice-action .dropzone { margin: 0; }
.choice-action .dropzone .btn { min-width: 70%; }
.choice-card h3 { text-align: center; }
.howto-details { margin-top: 12px; }
.howto-details summary { font-weight: 600; color: var(--accent); }
a.choice-link:hover { border-color: var(--accent); }
.kv-narrow { grid-template-columns: 130px 1fr; }
.btn-intuit { background: #2ca01c; color: #fff; }
.btn-intuit:hover { background: #108000; }
.howto { padding-left: 22px; }
.howto li { margin-bottom: 10px; }
.secret-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0; }
.secret { font-size: 1.05rem; padding: 6px 10px; letter-spacing: .04em; user-select: all; word-break: break-all; }
.qbwc-progress { margin: 12px 0; }
.delivery-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 16px; }
.delivery-strip form { margin: 0; }
.row-actions { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { margin: 0; display: inline-flex; gap: 4px; }
.nowrap { white-space: nowrap; }
h3.mt { margin-top: 1.4em; }
.prose { max-width: 820px; }
.prose h2 { font-size: 1.05rem; margin-top: 1.4em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.faq dt { font-weight: 600; margin-top: 12px; }
.faq dd { margin: 4px 0 0; color: var(--ink-2); }
@media (max-width: 860px) { .choice-grid-3 { grid-template-columns: 1fr; } }
.project-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
