/* QuoteDesk — Odoo 18 styling.
 *
 * Tokens first, components after. The tokens are the whole point: when this
 * moves inside Odoo (ARCHITECTURE.md → "Moving into Odoo") the components stop
 * carrying their own colours and point at Odoo's own SCSS variables instead,
 * and only this block changes.
 *
 * No dark theme: the Odoo backend is light, and a chat panel that does not
 * match the rest of the window reads as a bolted-on tool.
 */

:root {
  /* Odoo's brand plum and the teal it pairs with for links and accents. */
  --o-primary: #714b67;
  --o-primary-dark: #5c3d54;
  --o-primary-light: #f3eff2;
  --o-accent: #017e84;

  --o-body: #374151;
  --o-heading: #1f2937;
  --o-muted: #6c757d;
  --o-faint: #8f98a3;

  --o-bg: #f9f9f9;
  --o-surface: #ffffff;
  --o-surface-alt: #f8f9fa;
  --o-hover: #f1f1f1;

  --o-border: #dee2e6;
  --o-border-strong: #ced4da;

  --o-ok: #28a745;
  --o-ok-bg: #eaf7ed;
  --o-warn: #b06d0a;
  --o-warn-bg: #fdf6e8;
  --o-bad: #c0392b;
  --o-bad-bg: #fcecea;

  --o-radius: 4px;
  --o-radius-lg: 8px;
  --o-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  --o-shadow-pop: 0 6px 18px rgba(0, 0, 0, .14);

  --o-navbar-h: 46px;
  --o-aside-w: 25%;

  --o-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --o-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--o-font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--o-body);
  background: var(--o-bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  color: var(--o-heading);
  font-weight: 600;
  margin: 0;
}

a { color: var(--o-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.o-icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.is-spinning { animation: o-spin 1s linear infinite; }
@keyframes o-spin { to { transform: rotate(360deg); } }

/* Anything marked as a stub is visibly inert, so a reviewer does not read the
   prototype as further along than it is. */
.is-stub { cursor: default; opacity: .55; }
.is-stub:hover { text-decoration: none; }

/* --- Navbar ------------------------------------------------------------- */

.o-navbar {
  flex: none;
  height: var(--o-navbar-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px 0 4px;
  background: var(--o-surface);
  border-bottom: 1px solid var(--o-border);
}

.o-apps {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--o-radius);
  background: transparent;
  color: var(--o-muted);
  cursor: pointer;
}
.o-apps:hover { background: var(--o-hover); }

.o-apps__grid {
  display: grid;
  grid-template-columns: repeat(3, 3px);
  grid-auto-rows: 3px;
  gap: 2px;
}
.o-apps__grid i { background: currentColor; border-radius: 1px; }

.o-navbar__brand {
  font-size: 14px;
  font-weight: 600;
  color: var(--o-heading);
  padding: 0 10px 0 6px;
}
.o-navbar__brand:hover { text-decoration: none; }

.o-navbar__menu { display: flex; align-items: center; gap: 2px; }

.o-navbar__menu a {
  padding: 6px 10px;
  border-radius: var(--o-radius);
  color: var(--o-body);
  font-weight: 500;
}
.o-navbar__menu a:hover { background: var(--o-hover); text-decoration: none; }
.o-navbar__menu a.is-active { color: var(--o-primary); background: var(--o-primary-light); }

.o-proto {
  margin-left: 14px;
  padding: 2px 8px;
  border: 1px dashed var(--o-border-strong);
  border-radius: 10px;
  color: var(--o-muted);
  font-size: 11px;
  letter-spacing: .02em;
}

.o-systray {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.o-systray__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--o-radius);
  background: transparent;
  color: var(--o-muted);
}
.o-systray__btn .o-icon { width: 1.15rem; height: 1.15rem; }

.o-systray__badge {
  position: absolute;
  top: -1px;
  right: -1px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: var(--o-bad);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
}

.o-systray__company {
  margin: 0 8px 0 10px;
  color: var(--o-body);
  font-weight: 500;
}

.o-systray__user { margin: 0; }

.o-avatar {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--o-radius);
  background: #00a09d;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
}

/* --- Control panel ------------------------------------------------------ */

.o-cp {
  flex: none;
  background: var(--o-surface);
  border-bottom: 1px solid var(--o-border);
  padding: 6px 16px 8px;
}

.o-cp__top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 24px;
}

.o-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.o-breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--o-faint); }
.o-breadcrumb a { color: var(--o-muted); }
.o-breadcrumb li[aria-current] { color: var(--o-heading); font-weight: 600; }

.o-pager {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--o-muted);
  font-size: 12px;
}
.o-pager a, .o-pager span.is-disabled {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--o-radius);
  color: var(--o-muted);
}
.o-pager a:hover { background: var(--o-hover); }
.o-pager span.is-disabled { opacity: .35; }

.o-cp__bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

/* Odoo's searchbar: a flat bordered field that lights up on focus. */
.o-picker { position: relative; width: min(460px, 50%); }

.o-searchbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 4px 0 8px;
  background: var(--o-surface);
  border: 1px solid var(--o-border-strong);
  border-radius: var(--o-radius);
}
.o-searchbar:focus-within {
  border-color: var(--o-primary);
  box-shadow: 0 0 0 2px rgba(113, 75, 103, .14);
}
.o-searchbar__icon { color: var(--o-muted); }

.o-searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: var(--o-heading);
}
.o-searchbar input::placeholder { color: var(--o-faint); }

.o-searchbar__toggle {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: var(--o-radius);
  background: transparent;
  color: var(--o-muted);
  cursor: pointer;
}
.o-searchbar__toggle:hover { background: var(--o-hover); }

.o-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 0;
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius);
  box-shadow: var(--o-shadow-pop);
}

.o-dropdown__item {
  display: block;
  width: 100%;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--o-body);
  cursor: pointer;
}
.o-dropdown__item:hover,
.o-dropdown__item.is-active { background: var(--o-hover); }
.o-dropdown__item[disabled] { cursor: default; opacity: .6; }
.o-dropdown__item[disabled]:hover { background: transparent; }

.o-dropdown__line { display: flex; align-items: baseline; gap: 6px; }
.o-dropdown__ref { font-family: var(--o-mono); font-size: 11px; color: var(--o-muted); }
.o-dropdown__name { font-weight: 600; color: var(--o-heading); }
.o-dropdown__sub {
  display: flex;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--o-muted);
}
.o-dropdown__empty { padding: 10px 12px; color: var(--o-muted); }

.o-facets { display: flex; align-items: center; gap: 6px; }

.o-facet {
  display: inline-flex;
  align-items: stretch;
  height: 22px;
  border-radius: var(--o-radius);
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--o-border);
}
.o-facet__key {
  display: grid;
  place-items: center;
  padding: 0 6px;
  background: var(--o-surface-alt);
  color: var(--o-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.o-facet__val {
  display: grid;
  place-items: center;
  padding: 0 7px;
  background: var(--o-surface);
  color: var(--o-heading);
}
.o-facet--kvp { border-color: #c7a7bd; }
.o-facet--kvp .o-facet__val { background: var(--o-primary-light); color: var(--o-primary-dark); }
.o-facet--cvp { border-color: #9fcccf; }
.o-facet--cvp .o-facet__val { background: #e8f4f4; color: #015c60; }

/* --- Layout ------------------------------------------------------------- */

.o-content {
  flex: 1;
  min-height: 0;
  display: flex;
}

.o-chat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--o-surface);
}

.o-aside {
  flex: none;
  width: var(--o-aside-w);
  min-width: 260px;
  display: flex;
  flex-direction: column;
  background: var(--o-surface-alt);
  border-left: 1px solid var(--o-border);
}

/* --- Thread ------------------------------------------------------------- */

.o-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 0 8px;
  scroll-behavior: smooth;
}

.o-thread > * {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto 22px;
}

.o-thread__intro { padding: 32px 0 8px; }
.o-thread__intro h2 { font-size: 20px; margin-bottom: 8px; }
.o-thread__intro p { margin: 0 0 10px; color: var(--o-muted); max-width: 60ch; }
.o-thread__intro-note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: var(--o-warn);
}
.o-thread__intro-note .o-icon { margin-top: 2px; }

.o-msg { position: relative; }

.o-msg--user { display: flex; justify-content: flex-end; }

.o-bubble {
  max-width: 80%;
  padding: 9px 13px;
  background: var(--o-primary-light);
  border: 1px solid #e4dae1;
  border-radius: var(--o-radius-lg);
  color: var(--o-heading);
  white-space: pre-wrap;
}

.o-prose p { margin: 0 0 10px; }
.o-prose p:last-child { margin-bottom: 0; }
.o-prose { color: var(--o-body); font-size: 13.5px; }

.o-subheading {
  margin: 16px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--o-muted);
}

.o-bullets { margin: 0 0 10px; padding-left: 18px; }
.o-bullets li { margin-bottom: 4px; }

.o-source {
  font-size: 11.5px;
  color: var(--o-muted);
  border-left: 2px solid var(--o-border-strong);
  padding-left: 8px;
}

.o-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: var(--o-radius);
  border: 1px solid transparent;
  font-size: 12.5px;
}
.o-note__icon { margin-top: 2px; }
.o-note--warn { background: var(--o-warn-bg); border-color: #f0dcb4; color: #7a4c07; }
.o-note--info { background: #eef6fb; border-color: #cfe3f1; color: #1a5f8a; }

/* Result card for a baked-in function, so a function answer is visibly a
   different kind of thing from a chat answer. */
.o-result {
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius-lg);
  background: var(--o-surface);
  box-shadow: var(--o-shadow);
  overflow: hidden;
}

.o-result__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--o-surface-alt);
  border-bottom: 1px solid var(--o-border);
}

.o-result__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--o-primary-light);
  color: var(--o-primary-dark);
}
.o-result__badge--check_bid_docs { background: #e8f4f4; color: #015c60; }
.o-result__badge--check_our_docs { background: var(--o-surface); color: var(--o-muted); border: 1px solid var(--o-border); }
.o-result__sub { font-size: 12px; color: var(--o-muted); }
.o-result__time { margin-left: auto; font-size: 11px; color: var(--o-faint); }
.o-result__body { padding: 14px 14px 16px; }

.o-counts {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.o-count {
  flex: 1 1 90px;
  padding: 8px 10px;
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius);
  background: var(--o-surface);
}
.o-count__value { display: block; font-size: 19px; font-weight: 700; color: var(--o-heading); }
.o-count__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--o-muted);
}
.o-count--ok { background: var(--o-ok-bg); border-color: #c6e7cf; }
.o-count--ok .o-count__value { color: #1d7a34; }
.o-count--warn { background: var(--o-warn-bg); border-color: #f0dcb4; }
.o-count--warn .o-count__value { color: var(--o-warn); }
.o-count--bad { background: var(--o-bad-bg); border-color: #f2cfcb; }
.o-count--bad .o-count__value { color: var(--o-bad); }

.o-group {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--o-border);
  border-left-width: 3px;
  border-radius: var(--o-radius);
  background: var(--o-surface);
}
.o-group--bad { border-left-color: var(--o-bad); }
.o-group--warn { border-left-color: var(--o-warn); }
.o-group--ok { border-left-color: var(--o-ok); }

.o-group__heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--o-muted);
  margin-bottom: 6px;
}
.o-group__list { margin: 0; padding: 0; list-style: none; }
.o-group__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid var(--o-surface-alt);
}
.o-group__list li:first-child { border-top: 0; }
.o-group__text { font-weight: 600; color: var(--o-heading); }
.o-group__meta { color: var(--o-muted); font-size: 12.5px; }

.o-table-wrap { overflow-x: auto; margin: 0 0 12px; }
.o-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.o-table th, .o-table td { padding: 6px 8px; border-bottom: 1px solid var(--o-border); }
.o-table thead th {
  background: var(--o-surface-alt);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--o-muted);
  border-bottom-color: var(--o-border-strong);
}
.o-table tfoot td { font-weight: 700; color: var(--o-heading); border-bottom: 0; }
.o-table .is-right { text-align: right; font-variant-numeric: tabular-nums; }
.o-table .is-left { text-align: left; }
.o-table tbody tr:hover { background: var(--o-surface-alt); }

.o-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 600;
}
.o-badge--muted { background: var(--o-surface-alt); color: var(--o-muted); border: 1px solid var(--o-border); }
.o-badge--brand { background: var(--o-primary); color: #fff; margin-right: 6px; }

/* Per-message actions: visible on hover, and always visible once saved so the
   state is readable without hovering every message. */
.o-msg__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  opacity: 0;
  transition: opacity .12s ease;
}
.o-msg--assistant:hover .o-msg__actions,
.o-msg--assistant:focus-within .o-msg__actions,
.o-msg--assistant.is-saved .o-msg__actions { opacity: 1; }

.o-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: var(--o-radius);
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: var(--o-muted);
  cursor: pointer;
}
.o-ghost:hover { background: var(--o-hover); color: var(--o-heading); text-decoration: none; }
.o-ghost--tiny { font-size: 11px; padding: 2px 6px; }
.o-ghost[disabled] { opacity: .5; cursor: default; }

.o-msg__saved {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--o-ok);
}
.o-msg--assistant.is-saved .o-msg__saved { display: inline-flex; }
.o-msg--assistant.is-saved .js-save { display: none; }

.o-msg.is-highlighted .o-result,
.o-msg.is-highlighted .o-prose {
  animation: o-flash 1.6s ease;
  border-radius: var(--o-radius-lg);
}
@keyframes o-flash {
  0%, 40% { box-shadow: 0 0 0 3px rgba(113, 75, 103, .22); }
  100% { box-shadow: 0 0 0 3px rgba(113, 75, 103, 0); }
}

.o-thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--o-muted);
  font-size: 12.5px;
}
.o-thinking i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--o-primary);
  animation: o-pulse 1.1s ease-in-out infinite;
}
.o-thinking i:nth-child(2) { animation-delay: .18s; }
.o-thinking i:nth-child(3) { animation-delay: .36s; }
@keyframes o-pulse {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* --- Dock: functions, composer, disclaimer ------------------------------ */

.o-dock {
  flex: none;
  border-top: 1px solid var(--o-border);
  background: var(--o-surface);
  padding: 10px 0 12px;
}

.o-dock > * { width: min(760px, calc(100% - 48px)); margin: 0 auto; }

.o-functions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.o-fn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--o-border-strong);
  border-radius: 14px;
  background: var(--o-surface);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--o-body);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.o-fn:hover:not([disabled]) {
  background: var(--o-primary-light);
  border-color: var(--o-primary);
  color: var(--o-primary-dark);
}
.o-fn[disabled] { opacity: .5; cursor: not-allowed; }
.o-fn .o-icon { color: var(--o-primary); }
.o-fn[disabled] .o-icon { color: var(--o-faint); }

.o-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 7px 7px 7px 12px;
  border: 1px solid var(--o-border-strong);
  border-radius: var(--o-radius-lg);
  background: var(--o-surface);
}
.o-composer:focus-within {
  border-color: var(--o-primary);
  box-shadow: 0 0 0 2px rgba(113, 75, 103, .12);
}

.o-composer textarea {
  flex: 1;
  min-height: 24px;
  max-height: 180px;
  padding: 3px 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--o-heading);
}
.o-composer textarea::placeholder { color: var(--o-faint); }

.o-send {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 0;
  border-radius: var(--o-radius);
  background: var(--o-primary);
  color: #fff;
  cursor: pointer;
}
.o-send:hover { background: var(--o-primary-dark); }
.o-send[disabled] { background: var(--o-border-strong); cursor: default; }

.o-disclaimer {
  margin: 8px auto 0;
  font-size: 11px;
  color: var(--o-faint);
  text-align: center;
}

/* --- Saved panel -------------------------------------------------------- */

.o-aside__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--o-border);
}
.o-aside__head h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--o-muted);
}
.o-aside__count {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--o-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.o-aside__list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.o-aside__empty { margin: 6px 4px; color: var(--o-muted); font-size: 12px; }

.o-saved {
  margin-bottom: 8px;
  padding: 9px 10px;
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius);
  box-shadow: var(--o-shadow);
}

.o-saved__head { margin-bottom: 5px; }
.o-saved__label {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--o-primary-light);
  color: var(--o-primary-dark);
}
.o-saved__label--check_bid_docs { background: #e8f4f4; color: #015c60; }
.o-saved__label--chat { background: var(--o-surface-alt); color: var(--o-muted); }
.o-saved__label--quote { background: #fdf2e3; color: #8a5a07; }

.o-saved__summary {
  margin: 0 0 4px;
  color: var(--o-heading);
  font-size: 12.5px;
  font-weight: 500;
}
.o-saved__meta { margin: 0; color: var(--o-faint); font-size: 11px; }

.o-saved__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--o-surface-alt);
}
.o-log { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.o-log--done { color: var(--o-ok); }
.o-log--pending { color: var(--o-warn); }
.o-saved__foot .o-ghost { margin-left: auto; }

.o-aside__foot {
  flex: none;
  padding: 8px 10px;
  border-top: 1px solid var(--o-border);
}

/* --- Empty state -------------------------------------------------------- */

.o-empty {
  margin: auto;
  padding: 40px 24px;
  max-width: 460px;
  text-align: center;
}
.o-empty__art {
  width: 56px;
  height: 56px;
  stroke-width: 1.1;
  color: var(--o-border-strong);
  margin-bottom: 14px;
}
.o-empty h2 { font-size: 17px; margin-bottom: 8px; }
.o-empty p { color: var(--o-muted); margin: 0 0 16px; }

/* --- Buttons ------------------------------------------------------------ */

.o-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: var(--o-radius);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.o-btn--primary { background: var(--o-primary); color: #fff; }
.o-btn--primary:hover { background: var(--o-primary-dark); text-decoration: none; }
.o-btn--primary:hover, .o-btn--primary:link, .o-btn--primary:visited { color: #fff; }
.o-btn--secondary {
  background: var(--o-surface);
  border-color: var(--o-primary);
  color: var(--o-primary-dark);
  font-size: 12.5px;
  padding: 5px 12px;
}
.o-btn--secondary:hover { background: var(--o-primary-light); }
.o-btn--light {
  background: var(--o-surface);
  border-color: var(--o-border-strong);
  color: var(--o-body);
}
.o-btn--light:hover { background: var(--o-hover); }
.o-btn--block { width: 100%; }
.o-btn[disabled] { opacity: .55; cursor: default; }

/* --- Result footer: the step from an answer to a document --------------- */

.o-result__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--o-surface-alt);
  border-top: 1px solid var(--o-border);
}
.o-result__hint { font-size: 11.5px; color: var(--o-muted); }

/* --- Dialog ------------------------------------------------------------- */

.o-dialog { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
.o-dialog[hidden] { display: none; }
.o-dialog__backdrop { position: absolute; inset: 0; background: rgba(23, 23, 28, .45); }

.o-dialog__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(880px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  background: var(--o-surface);
  border-radius: var(--o-radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .3);
  overflow: hidden;
}

.o-dialog__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--o-border);
}
.o-dialog__head h2 { font-size: 15px; }
.o-dialog__sub { font-size: 12px; color: var(--o-muted); font-family: var(--o-mono); }
.o-dialog__close {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: var(--o-radius);
  background: transparent;
  color: var(--o-muted);
  cursor: pointer;
}
.o-dialog__close:hover { background: var(--o-hover); }

.o-dialog__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  background: #edeef0;
}

.o-dialog__foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--o-border);
  background: var(--o-surface-alt);
}
.o-dialog__note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-size: 11.5px;
  color: var(--o-muted);
}

/* --- Report an issue ----------------------------------------------------- */

.o-report__panel { width: min(560px, calc(100vw - 32px)); margin: 0; }
.o-report__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
}
.o-report__label { font-weight: 600; color: var(--o-heading); margin-top: 6px; }
.o-report__input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--o-border-strong);
  border-radius: var(--o-radius);
  font: inherit;
  color: var(--o-body);
  background: var(--o-surface);
  resize: vertical;
}
.o-report__input:focus { outline: none; border-color: var(--o-accent); box-shadow: 0 0 0 2px rgba(1, 126, 132, .15); }
.o-report__check { display: flex; align-items: center; gap: 8px; margin-top: 8px; cursor: pointer; }
.o-report__shot {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 6px;
  border: 1px dashed var(--o-border-strong);
  border-radius: var(--o-radius);
  background: var(--o-surface-alt);
}
.o-report__shot[hidden] { display: none; }
.o-report__shot img { max-width: 100%; max-height: 180px; box-shadow: var(--o-shadow); }
.o-report__shot-note { font-size: 12px; color: var(--o-muted); text-align: center; }
.o-report__details { margin-top: 8px; font-size: 12px; color: var(--o-muted); }
.o-report__details summary { cursor: pointer; color: var(--o-accent); }
.o-report__details ul { margin: 6px 0; padding-left: 18px; }
.o-report__details p { margin: 0; }
.o-report__error {
  margin: 6px 0 0;
  padding: 7px 9px;
  border-radius: var(--o-radius);
  background: var(--o-bad-bg);
  color: var(--o-bad);
}
.o-report__error[hidden] { display: none; }

/* --- The quote, as a sheet of paper ------------------------------------- */

.o-sheet {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  padding: 0 0 34px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  color: #23272b;
  font-size: 12px;
}

/* The same watermark the PDF carries, so the preview is not cleaner than the
   file somebody ends up holding. */
.o-sheet::before {
  content: "SAMPLE";
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 118px;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(23, 39, 43, .07);
  pointer-events: none;
  user-select: none;
}
.o-sheet > * { position: relative; }

.o-sheet__band {
  padding: 6px 34px;
  background: #e2e3e6;
  color: #3a3f45;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.o-sheet__head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 34px 14px;
  border-bottom: 1.5px solid #9aa0a6;
}
.o-sheet__head-right { text-align: right; }
.o-sheet__co { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.o-sheet__co-sub { margin: 2px 0 0; font-size: 11px; color: #6b7177; }
.o-sheet__placeholder { color: #9aa0a6; font-style: italic; }
.o-sheet__kind {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.o-sheet__number { margin: 3px 0 0; font-weight: 700; font-size: 12.5px; }

.o-sheet__parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 18px 34px 0;
}
.o-sheet__label {
  margin: 0 0 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8b9196;
}
.o-sheet__strong { margin: 0; font-size: 13px; font-weight: 700; }
.o-sheet__sub { margin: 2px 0 0; color: #6b7177; }

.o-sheet__facts {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 3px 10px;
  margin: 18px 0 0;
  padding: 0 34px;
}
.o-sheet__facts dt { color: #8b9196; }
.o-sheet__facts dd { margin: 0; }

.o-sheet__table {
  width: calc(100% - 68px);
  margin: 20px 34px 0;
  border-collapse: collapse;
}
.o-sheet__table th {
  padding: 6px 8px;
  background: #eef0f1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6b7177;
  text-align: left;
}
.o-sheet__table td { padding: 7px 8px; border-bottom: 1px solid #e6e8ea; }
.o-sheet__table .is-right { text-align: right; font-variant-numeric: tabular-nums; }
.o-sheet__table tfoot td { border-bottom: 0; padding: 3px 8px; color: #6b7177; }
.o-sheet__table tfoot .is-total td {
  padding-top: 8px;
  border-top: 1.5px solid #9aa0a6;
  color: #23272b;
  font-weight: 700;
  font-size: 13px;
}

.o-sheet__terms { padding: 26px 34px 0; }
.o-sheet__terms ul { margin: 0; padding-left: 15px; color: #41464b; }
.o-sheet__terms li { margin-bottom: 3px; }

.o-sheet__sign {
  display: flex;
  gap: 28px;
  margin: 28px 34px 0;
  padding-top: 16px;
  border-top: 1px solid #d8dbde;
  color: #8b9196;
}
.o-sheet__sign span { display: flex; align-items: flex-end; gap: 8px; flex: 1; }
.o-sheet__sign i { flex: 1; border-bottom: 1px solid #9aa0a6; height: 14px; }

/* --- Login -------------------------------------------------------------- */

.o-login-page { background: var(--o-bg); }

.o-login {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}

.o-login__card {
  width: 100%;
  max-width: 360px;
  padding: 26px 26px 20px;
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius-lg);
  box-shadow: var(--o-shadow);
}
.o-login__brand { font-size: 24px; color: var(--o-primary); text-align: center; }
.o-login__sub {
  margin: 2px 0 20px;
  text-align: center;
  color: var(--o-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.o-field { display: block; margin-bottom: 12px; }
.o-field span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--o-body);
}
.o-field input {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--o-border-strong);
  border-radius: var(--o-radius);
  font: inherit;
  color: var(--o-heading);
  background: var(--o-surface);
}
.o-field input:focus {
  outline: 0;
  border-color: var(--o-primary);
  box-shadow: 0 0 0 2px rgba(113, 75, 103, .14);
}

.o-login__error {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin: 0 0 14px;
  padding: 8px 10px;
  border: 1px solid #f2cfcb;
  border-radius: var(--o-radius);
  background: var(--o-bad-bg);
  color: #8e2a1f;
  font-size: 12px;
}
.o-login__error .o-icon { margin-top: 1px; flex: none; }

.o-login__note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--o-border);
  font-size: 11.5px;
  color: var(--o-warn);
}
.o-login__note .o-icon { margin-top: 2px; flex: none; }
.o-login__db { margin: 0; color: var(--o-faint); font-size: 11px; }

/* --- Toast -------------------------------------------------------------- */

.o-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 14px);
  z-index: 60;
  max-width: 420px;
  padding: 9px 14px;
  border-radius: var(--o-radius);
  background: #2b2b33;
  color: #fff;
  font-size: 12.5px;
  box-shadow: var(--o-shadow-pop);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.o-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* --- Narrow windows ----------------------------------------------------- */

@media (max-width: 1100px) {
  .o-aside { width: 300px; }
}

@media (max-width: 900px) {
  .o-content { flex-direction: column; }
  .o-aside {
    width: auto;
    max-height: 40%;
    border-left: 0;
    border-top: 1px solid var(--o-border);
  }
  .o-proto, .o-systray__company, .o-navbar__menu { display: none; }
  .o-picker { width: 100%; }
  .o-cp__bottom { flex-wrap: wrap; }
}

/* Thin scrollbars, as in the Odoo backend. */
.o-thread, .o-aside__list, .o-dropdown { scrollbar-width: thin; }
.o-thread::-webkit-scrollbar,
.o-aside__list::-webkit-scrollbar,
.o-dropdown::-webkit-scrollbar { width: 9px; }
.o-thread::-webkit-scrollbar-thumb,
.o-aside__list::-webkit-scrollbar-thumb,
.o-dropdown::-webkit-scrollbar-thumb {
  background: #cfd4da;
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 6px;
}
