:root {
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px 17px;
  color: inherit;
  transition: background 0.15s;
}
button:hover {
  background: var(--active);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 13px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--active);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 18px 0;
}
label input,
label select {
  margin-top: 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  letter-spacing: -0.03em;
  font-size: 32px;
  font-weight: 700;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h3 {
  font-size: 17px;
  font-weight: 600;
}
p {
  line-height: 1.6;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 650;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.8px;
}
.mark {
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: var(--line-strong);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 31px;
  font-weight: 700;
}
.subbrand {
  color: var(--ink-3);
  font-weight: 400;
  font-size: 20px;
}
.primary {
  background: var(--green);
  color: var(--accent-ink);
  border-color: var(--green);
}
.primary:hover {
  background: var(--accent);
}
.primary span {
  float: right;
}
.subtle {
  background: transparent;
  border: 0;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  padding: 30px;
  gap: 70px;
  align-items: center;
}
.login-intro {
  background: var(--active);
  border-radius: 22px;
  min-height: calc(100vh - 60px);
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-intro .brand {
  position: absolute;
  top: 70px;
}
.login-intro .eyebrow {
  margin-top: 65px;
}
.login h1 {
  font-size: clamp(42px, 4.5vw, 74px);
  letter-spacing: -3px;
  line-height: 1.1;
}
.login-intro > p:not(.eyebrow) {
  color: var(--ink-2);
  font-size: 17px;
}
.login-note {
  margin-top: 55px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
}
.login form {
  width: 100%;
  max-width: 380px;
  padding: 25px;
}
.login form .primary {
  width: 100%;
  margin-top: 10px;
}
#login-error {
  font-size: 13px;
  color: var(--red-ink);
  margin-top: 15px;
}
#workspace {
  display: flex;
  min-height: 100vh;
}
#workspace[hidden],
[hidden] {
  display: none !important;
}
aside {
  width: 235px;
  flex-shrink: 0;
  background: var(--hover);
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
aside > .eyebrow {
  margin: 54px 12px 15px;
  flex-shrink: 0;
}
aside .brand {
  flex-shrink: 0;
}
nav {
  display: grid;
  gap: 7px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
nav button,
nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: none;
  border: 0;
  color: var(--ink-2);
  font-size: 15px;
  padding: 14px;
  text-decoration: none;
}
nav a[hidden] {
  display: none;
}
nav button.active {
  background: var(--active);
  color: var(--ink);
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 10px 0;
  font-size: 12px;
  flex-shrink: 0;
}
.status-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}
.status-label i {
  background: var(--ink-2);
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
#account {
  margin: 18px 0 0;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
main {
  margin-left: 235px;
  width: calc(100% - 235px);
  padding: 38px 46px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
header h1 {
  margin: 8px 0 0;
}
.private-badge {
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 30px;
  color: var(--ink-2);
}
#notice {
  background: var(--amber);
  color: var(--amber-ink);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
  font-size: 14px;
}
.hero {
  background: var(--active);
  border: 1px solid var(--line-strong);
  padding: 34px 36px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.hero h2 {
  font-size: 34px;
  margin-bottom: 12px;
  max-width: 650px;
}
.hero p {
  color: var(--ink-2);
  max-width: 630px;
  font-size: 15px;
  margin-bottom: 22px;
}
.hero .primary {
  min-width: 170px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 19px;
}
.section-head span {
  font-size: 12px;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  text-align: left;
}
.card .icon {
  font-size: 22px;
  display: block;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.card h3 {
  margin-bottom: 8px;
}
.card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.connector-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.connector {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 17px 20px;
  flex: 1;
  min-width: 170px;
  font-size: 13px;
}
.connector small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.ok {
  color: var(--ink-2);
}
.bad {
  color: var(--amber-ink);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.toolbar input {
  flex: 1;
}
.list {
  display: grid;
  gap: 9px;
}
.list-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 20px;
  background: var(--surface);
}
.list-item strong {
  font-weight: 600;
  display: block;
  margin: 6px 0;
  font-size: 15px;
}
.list-item small {
  color: var(--muted);
  font-size: 12px;
}
.list-item p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}
.detail {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: 14px;
}
.detail pre {
  font: inherit;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail a {
  color: var(--green);
}
.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  font-size: 14px;
}
.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  padding: 17px 20px;
  border-bottom: 1px solid var(--active);
  text-align: left;
}
th {
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
  background: var(--hover);
}
td small {
  color: var(--muted);
}
td:last-child,
th:last-child {
  text-align: right;
}
.number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.source {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0;
}
.source a {
  color: inherit;
}
.split {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.chat-list button {
  text-align: left;
  font-size: 13px;
}
.chat-list button.selected {
  background: var(--active);
}
.chat-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  min-height: 550px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.messages {
  padding: 26px;
  flex: 1;
  min-height: 320px;
  max-height: 65vh;
  overflow: auto;
}
.message {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.7;
  overflow-wrap: anywhere;
  background: var(--hover);
}
.message.user {
  background: var(--active);
  margin-left: 45px;
}
.message.error {
  background: var(--amber);
  color: var(--amber-ink);
}
.message-label {
  font-size: 10px;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 7px;
  color: var(--ink-3);
}
.message.reasoning {
  background: transparent;
  border: 1px dashed var(--line-strong);
  padding: 10px 14px;
  margin-bottom: 10px;
  opacity: 1;
  transition: opacity 0.7s ease;
}
.message.reasoning .message-label {
  margin-bottom: 4px;
}
.reasoning-body {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  font-style: italic;
  max-height: 138px;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message .md-p {
  margin: 0 0 8px;
}
.message .md-p:last-child {
  margin-bottom: 0;
}
.message .md-list {
  margin: 0 0 8px;
  padding-left: 22px;
}
.message .md-list:last-child {
  margin-bottom: 0;
}
.message .md-h {
  font-weight: 700;
  margin: 4px 0 6px;
}
.message strong {
  font-weight: 700;
  color: var(--ink);
}
.message code {
  background: var(--active);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12.5px;
}
.message a {
  color: var(--ink-2);
}
.composer {
  border-top: 1px solid var(--line);
  padding: 15px;
  display: flex;
  gap: 10px;
  align-items: end;
}
.composer textarea {
  resize: vertical;
  min-height: 65px;
  max-height: 240px;
  font-size: 14px;
}
.composer button {
  height: 48px;
}
.draft-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 20px;
}
.quote-lines {
  display: grid;
  gap: 10px;
}
.quote-line {
  display: grid;
  grid-template-columns: 1fr 75px 40px;
  gap: 7px;
}
.quote-line button {
  padding: 8px;
}
.total {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 24px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.pill {
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 6px;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 5px 8px;
}
.quote-preview table {
  margin: 25px 0;
}
.quote-preview th,
.quote-preview td {
  padding: 12px 8px;
}
.quote-preview h2 {
  margin: 22px 0 12px;
}
.quote-preview .actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
footer {
  display: flex;
  justify-content: space-between;
  padding-top: 40px;
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.3px;
}
#content {
  min-height: 70vh;
}
@media (max-width: 1050px) {
  main {
    padding: 28px;
  }
  aside {
    width: 205px;
  }
  main {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .hero h2 {
    font-size: 28px;
  }
  .draft-grid,
  .split {
    grid-template-columns: 1fr;
  }
  .chat-list {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .login {
    gap: 20px;
  }
  .login-intro {
    padding: 30px;
  }
  .login h1 {
    font-size: 44px;
  }
}
@media (max-width: 700px) {
  aside {
    position: static;
    width: 100%;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside > .eyebrow,
  .sidebar-bottom {
    display: none;
  }
  aside .brand {
    font-size: 20px;
  }
  nav {
    display: flex;
    flex: none;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 15px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  nav button,
  nav a {
    font-size: 12px;
    padding: 12px;
    gap: 6px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  #workspace {
    display: block;
  }
  main {
    margin: 0;
    width: 100%;
    padding: 24px 18px;
  }
  .private-badge {
    display: none;
  }
  h1 {
    font-size: 30px;
  }
  .hero {
    padding: 24px;
  }
  .hero h2 {
    font-size: 27px;
  }
  .connector-row {
    gap: 8px;
  }
  .connector {
    min-width: 140px;
    padding: 14px;
  }
  .login {
    display: block;
    padding: 18px;
  }
  .login-intro {
    min-height: auto;
    padding: 32px 24px;
  }
  .login-intro .brand {
    position: static;
  }
  .login-intro .eyebrow {
    margin-top: 35px;
  }
  .login h1 {
    font-size: 40px;
  }
  .login-note {
    display: none;
  }
  .login form {
    margin: auto;
  }
  .detail {
    padding: 20px;
  }
  .quote-line {
    grid-template-columns: 1fr 60px 35px;
  }
  footer span {
    display: none;
  }
}
@media print {
  aside,
  header,
  footer,
  .toolbar,
  .quote-preview .actions,
  #notice,
  .source {
    display: none !important;
  }
  main {
    margin: 0;
    width: 100%;
    padding: 0;
  }
  body {
    background: var(--surface);
  }
  .detail {
    border: 0;
  }
  .quote-preview {
    padding: 25px;
  }
  .no-print {
    display: none !important;
  }
}
/* Keep account exit accessible on small screens and nested source tables legible. */
.notion-nested {
  margin: 16px 0 24px;
}
.notion-nested table td {
  min-width: 120px;
  white-space: pre-wrap;
}
@media (max-width: 700px) {
  .sidebar-bottom {
    display: flex;
    margin: 0;
    padding: 10px 0 0;
    justify-content: space-between;
    align-items: center;
  }
  .sidebar-bottom .status-label {
    display: none;
  }
  #account {
    margin: 0;
  }
  .sidebar-bottom .subtle {
    padding: 10px;
    min-height: 44px;
  }
  .quote-line select {
    min-width: 0;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .split > * {
    min-width: 0;
  }
}
/* Original Abra Robotics brand assets, copied without redesign from the public website. */
.official-logo {
  width: 175px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  /* Riga nera sotto la scritta ABRA ROBOTICS, larga quanto il logo. */
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.login-intro .official-logo {
  width: 240px;
}
.pricing-evidence {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.pricing-evidence p {
  font-size: 13px;
  margin-bottom: 8px;
}
.pricing-evidence a,
.download-link {
  color: var(--green);
}
.list .detail input,
.list .detail select {
  margin-bottom: 10px;
}

.caps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.caps li { background: var(--surface); border: 1px solid var(--line, var(--active)); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.caps li::before { content: '? '; color: var(--accent, var(--amber-ink)); font-weight: 700; }

.mcp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 10px; margin-bottom: 20px; }
.mcp-card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:12px; display:flex; flex-direction:column; gap:6px; }
.mcp-top { display:flex; align-items:center; gap:8px; }
.mcp-icon { font-size:18px; }
.dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.dot.ok { background:var(--green-ink); }
.dot.bad { background:var(--danger); }
.mcp-actions { margin-top:auto; }
.action-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap:10px; margin-bottom:20px; }
.action-grid .card { text-align:left; }
.table-wrap table { width:100%; }
.pill { background:var(--hover); border-radius:999px; padding:2px 8px; font-size:12px; }

.client-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap:12px; margin-bottom:20px; }
.client-card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:14px; display:flex; flex-direction:column; gap:8px; }
.offers-mini { display:flex; flex-direction:column; gap:4px; }
.offer-mini { display:flex; align-items:center; gap:8px; }
.client-card .caps { margin:0; }
.client-card button { align-self:flex-start; }
.caps li::before { content:'? '; color:var(--accent,var(--amber-ink)); font-weight:700; }

.tabs { display:flex; gap:8px; margin:8px 0 12px; }
.tab { background:var(--surface); color:var(--ink); border:1px solid var(--line); padding:6px 12px; border-radius:999px; cursor:pointer; }
.tab.active { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.mailtags { display:inline-flex; gap:6px; flex-wrap:wrap; margin:4px 0; }
.mailtag { border-radius:999px; padding:1px 9px; font-size:11px; font-weight:600; }
.chat-list { display:flex; flex-direction:column; gap:6px; }
.chat-item { display:flex; gap:6px; align-items:center; min-width:0; }
.chat-item button:first-child {
  flex:1;
  min-width:0;
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-item button.del {
  flex:0 0 28px;
  width:28px;
  min-width:28px;
  height:28px;
  padding:0;
  line-height:1;
  font-size:16px;
  background:transparent;
  color:var(--ink-3);
  border:0;
  border-radius:6px;
  cursor:pointer;
}
.chat-item button.del:hover { color:var(--red-ink); background:var(--red); }
.chat-picker { display:flex; gap:6px; }
.chat-picker button { background:var(--surface); color:var(--ink); border:1px solid var(--line); }
.chat-picker button.selected { background:var(--ink); color:var(--surface); }
.client-history summary { cursor:pointer; font-weight:600; margin:6px 0 4px; }
.client-mails { display:flex; flex-direction:column; gap:4px; }
.client-mails .empty { padding:6px 0; }

.composer {
  flex-wrap: wrap;
}
.composer textarea {
  flex: 1 1 160px;
  min-width: 0;
}
.composer-attach {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-width: 64px;
  padding: 0 12px;
  border: 1px solid var(--line, var(--active));
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  flex: 0 0 auto;
}
.composer-file {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  font-size: 28px;
  cursor: pointer;
}
.composer-attach-label {
  pointer-events: none;
}
@media (max-width: 700px) {
  .split .chat-list {
    flex-direction: column !important;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 168px;
  }
  .chat-list > .primary {
    min-width: 0;
    width: 100%;
  }
  .chat-panel {
    min-height: 0 !important;
  }
  .messages {
    min-height: 140px;
    max-height: min(46dvh, 340px);
    padding: 14px;
  }
  .composer {
    padding: 10px;
    gap: 8px;
  }
  .composer textarea {
    flex: 1 1 100%;
    min-height: 44px;
    max-height: 120px;
    order: 1;
  }
  .composer-attach {
    order: 2;
    min-width: 72px;
    height: 44px;
  }
  .composer button.primary {
    order: 3;
    flex: 1 1 auto;
    min-width: 96px;
    height: 44px;
  }
  .source {
    display: none;
  }
}

.pay-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 22px;
}
.pay-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 12px;
  align-items: center;
  font-size: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--hover);
}
.pay-row .pill {
  grid-column: 1;
}
.pay-row strong {
  grid-column: 2;
}
.pay-row .number {
  grid-column: 3;
  justify-self: end;
}
.pay-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}
.pay-row button {
  grid-column: 1 / -1;
  width: 100%;
}
.pay-paid {
  background: var(--active);
  color: var(--ink-2);
}
.pay-overdue {
  background: var(--red);
  color: var(--red-ink);
}
.pay-invoiced {
  background: var(--active);
  color: var(--ink-2);
}
.order-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.order-card-customer {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.order-meta {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.order-head {
  margin-bottom: 8px;
}
.order-lines {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.order-line {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--hover);
}
.order-line strong {
  display: block;
}
.order-line small {
  color: var(--muted);
}
.order-line-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  align-items: baseline;
}
.order-actions,
.quote-preview .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  min-height: 44px;
  box-sizing: border-box;
}
.btn-link.primary {
  background: var(--green);
  color: var(--accent-ink);
  border-color: var(--green);
}
@media (max-width: 700px) {
  .order-detail.detail,
  .order-detail.quote-preview {
    padding: 16px;
  }
  .order-actions,
  .quote-preview .actions.order-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .order-actions > *,
  .order-actions button,
  .order-actions .btn-link {
    width: 100%;
    min-height: 44px;
  }
  .list-item.order-card {
    padding: 14px;
  }
  .toolbar button {
    width: 100%;
    min-height: 44px;
  }
  .order-detail h2 {
    font-size: 22px;
    letter-spacing: -0.4px;
  }
  .order-detail .total {
    font-size: 18px;
  }
}

/* Messaggi vocali */
.composer .composer-mic {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 0 12px;
  border: 1px solid var(--line, var(--active));
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink, var(--ink));
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.composer .composer-mic.recording {
  background: var(--red-ink);
  border-color: var(--red-ink);
  color: var(--surface);
  font-size: 14px;
  font-weight: 600;
  animation: mic-pulse 1.4s ease-in-out infinite;
}
.composer .composer-mic:disabled {
  opacity: 0.6;
  cursor: progress;
}
@keyframes mic-pulse {
  50% { box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
  .composer .composer-mic.recording { animation: none; }
}
@media (max-width: 700px) {
  .composer .composer-mic {
    order: 2;
    height: 44px;
  }
}
/* Collegamento CRM di offerte e preventivi */
.crm-linkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; }
.crm-linkbar select { max-width: 260px; padding: 5px 8px; font-size: 12.5px; }
/* Offerte dei lead (Proposte -> Da preparare) */
.offers-sec { margin-bottom: 28px; }
.offers-hint { margin: -6px 0 12px; font-size: 13px; }
.offers-sent { margin-top: 12px; }
.offers-sent summary { cursor: pointer; color: var(--ink-3); font-size: 13px; margin-bottom: 8px; }
.pill.tone-blue { background: var(--blue); color: var(--blue-ink); }
.pill.tone-purple { background: var(--purple); color: var(--purple-ink); }
.pill.tone-amber { background: var(--amber); color: var(--amber-ink); }
.pill.tone-green { background: var(--c-green); color: var(--green-ink); }
.offer-title { margin: 6px 0 2px; }
.offer-title small { color: var(--ink-3); font-weight: 500; }
.offer-step { margin-top: 16px; }
.offer-step .toolbar { margin: 12px 0 0; }
.offer-step textarea, .offer-step input { width: 100%; }
.offer-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.offer-brief { display: grid; gap: 8px; margin: 8px 0 0; }
.offer-brief .kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.offer-brief dt { color: var(--ink-3); font-size: 13px; }
.offer-brief dd { margin: 0; }
.offer-brief ul { margin: 0; padding-left: 18px; }
.offer-result { display: grid; gap: 10px; margin-top: 14px; }
.offer-result .offer-text { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; line-height: 1.5; }
.offer-items { width: 100%; border-collapse: collapse; font-size: 13px; }
.offer-items th, .offer-items td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.offer-items .number { text-align: right; font-variant-numeric: tabular-nums; }
.offer-items tfoot td { font-weight: 650; }
.offer-preview { margin-top: 12px; }
.offer-frame { width: 100%; height: 75vh; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; margin-top: 10px; }
a.button { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
@media (max-width: 700px) { .offer-brief .kv { grid-template-columns: 1fr; gap: 2px; } .offer-frame { height: 60vh; } }
/* Righe con "Scarta" accanto (Proposte, Preventivazione) */
.list-row { display: flex; align-items: stretch; gap: 6px; }
.list-row > .list-item { flex: 1; min-width: 0; }
.list-row > .discard-btn { flex: none; align-self: center; font-size: 13px; padding: 6px 10px; color: var(--red-ink); border-color: var(--line); background: transparent; }
.list-row > .discard-btn:hover { background: color-mix(in srgb, var(--red-ink) 10%, transparent); border-color: var(--red-ink); }
