/* Flippy workspace revision: compact hierarchy, purposeful controls, readable mobile. */
:root {
  --bg: #f5f5fa;
  --panel: #fff;
  --text: #24233c;
  --muted: #64657c;
  --line: #e3e3ee;
  --green: #5544d8;
  --soft: #eeebff;
  --shadow: 0 4px 18px #26234a05;
}
body {
  background: var(--bg);
}
body.dark {
  --bg: #171824;
  --panel: #222334;
  --text: #f0effa;
  --muted: #b7b8ce;
  --line: #3a3b53;
  --green: #b8aaff;
  --soft: #33304b;
  --shadow: none;
  background: var(--bg);
}
button {
  border-radius: 10px;
  box-shadow: none;
}
button:hover {
  transform: none;
}
button.primary,
.primary-link {
  background: #5544d8;
  color: #fff;
  border-color: #5544d8;
  box-shadow: none;
}
button.primary:hover,
.primary-link:hover {
  background: #4334b7;
  border-color: #4334b7;
}
a,
button,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.panel {
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.page-heading {
  margin: 20px 0 25px;
}
.page-heading h1 {
  font-size: clamp(25px, 2.6vw, 36px);
  line-height: 1.17;
  letter-spacing: -0.8px;
}
.page-heading .subtitle {
  max-width: 64ch;
  font-size: 14px;
}
.page-heading .eyebrow {
  font-size: 10px;
}
.panel-header h2 {
  font-size: 17px;
}
.panel-header a {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.panel-header a .ui-icon {
  width: 16px;
  height: 16px;
}
.topbar {
  gap: 16px;
}
.global-search input {
  font-size: 14px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 8px;
  flex-shrink: 0;
  background: #5544d8;
  color: #fff;
}
.brand-mark:has(.workspace-logo) {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 4px;
}
.brand-mark .ui-icon {
  width: 26px;
  height: 26px;
}
.workspace-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mobile-brand {
  flex-shrink: 0;
}
.logo-preview {
  padding: 16px 0;
}
.logo-preview .brand-mark {
  width: 72px;
  height: 72px;
}
.branding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.branding-setting .brand-mark {
  width: 56px;
  height: 56px;
}
.workflow-section {
  margin-top: 0;
}
.workflow-section .eyebrow {
  display: block;
  margin-bottom: 5px;
}
.workflow-board.queue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.workflow-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
  align-self: start;
}
.workflow-stage > header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.stage-number {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}
.workflow-stage h3 {
  font-size: 16px;
  margin: 0;
}
.workflow-stage header p {
  font-size: 11px;
  margin: 3px 0 0;
  color: var(--muted);
}
.workflow-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 53px;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
}
.workflow-row:last-child {
  border-bottom: 0;
}
.workflow-row > .ui-icon:first-child {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
.workflow-row span {
  flex: 1;
}
.workflow-row strong {
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  line-height: 1;
  min-width: 26px;
  text-align: right;
}
.workflow-row > .ui-icon:last-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.workflow-row.has-work strong {
  color: var(--green);
}
.workflow-row.has-work:hover {
  background: var(--soft);
}
.workflow-row.is-clear {
  color: var(--muted);
}
.workflow-caption {
  margin: 10px 0 0;
  font-size: 11px;
}
.finance-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  overflow: hidden;
}
.finance-strip > div {
  padding: 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.finance-strip > div:last-child {
  border: 0;
}
.finance-strip span,
.finance-strip small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.finance-strip strong {
  display: block;
  font-size: clamp(22px, 2vw, 29px);
  letter-spacing: -0.8px;
  font-weight: 750;
  margin: 8px 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.finance-strip small {
  font-size: 11px;
  line-height: 1.5;
}
.storage-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.storage-summary strong {
  font-size: 30px;
}
.storage-summary small {
  font-size: 17px;
  color: var(--muted);
}
.breadcrumbs {
  display: flex;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  align-items: center;
}
.breadcrumbs a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.item-hero {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  margin: 12px 0 22px;
}
.item-art {
  width: 100px;
  height: 136px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 6px;
}
.item-art .ui-icon {
  width: 44px;
  height: 44px;
  color: var(--green);
}
.item-art .cover-large {
  width: 88px;
  height: 124px;
  object-fit: contain;
  border-radius: 6px;
}
.item-identity {
  min-width: 0;
}
.item-identity h1 {
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.item-code {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 13px;
}
.identity-tags {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.platform-badge,
.edition-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.platform-badge {
  color: #fff;
  background: #3b3762;
}
.platform-badge .ui-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.edition-badge {
  color: var(--green);
  background: var(--soft);
}
.status-row {
  gap: 6px;
  display: flex;
  flex-wrap: wrap;
}
.tag {
  font-size: 11px;
  padding: 5px 8px;
  line-height: 1.3;
}
.item-hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  max-width: 300px;
  justify-content: flex-end;
}
.primary-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border-radius: 10px;
  padding: 12px 15px;
  font-weight: 650;
  min-height: 44px;
  font-size: 13px;
}
.primary-link .ui-icon {
  width: 17px;
}
.action-disclosure {
  position: relative;
}
.action-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  font-weight: 650;
  font-size: 13px;
}
.action-disclosure > summary::-webkit-details-marker {
  display: none;
}
.action-disclosure > summary .ui-icon {
  width: 17px;
  height: 17px;
}
.action-disclosure[open] > summary {
  border-color: var(--green);
  color: var(--green);
}
.action-disclosure > div {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 20;
  width: 300px;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 35px #0002;
}
.delivery-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 20px;
}
.delivery-notice > .ui-icon {
  width: 21px;
  flex-shrink: 0;
  color: var(--green);
  margin-top: 2px;
}
.delivery-notice strong {
  font-size: 13px;
}
.delivery-notice p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.detail-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 620px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  gap: 4px;
}
.detail-tabs > button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  justify-content: center;
  font-size: 13px;
  min-height: 46px;
  padding: 10px 8px;
  color: var(--muted);
}
.detail-tabs > button[aria-selected="true"] {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 750;
}
.detail-tabs > button span {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--soft);
}
.detail-tab-panel {
  min-width: 0;
}
.item-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.item-overview-grid > .panel {
  min-width: 0;
}
.copy-facts {
  margin: 0;
}
.copy-facts > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.copy-facts > div:first-child {
  padding-top: 0;
}
.copy-facts dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.copy-facts dd {
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.copy-facts dd a {
  display: block;
  font-size: 12px;
  margin-top: 5px;
}
.copy-facts.compact > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.copy-facts.compact dt {
  margin: 0;
}
.copy-facts.compact dd {
  font-size: 13px;
  font-weight: 650;
  flex-shrink: 0;
}
.context-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
}
.context-links a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  min-height: 32px;
}
.context-links .ui-icon {
  width: 15px;
  height: 15px;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 15px 2px;
  text-align: left;
  box-shadow: none;
  min-height: 52px;
}
.task-row:hover {
  background: var(--soft);
  border-top-color: var(--line);
}
.task-row > .ui-icon:first-child {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--green);
}
.task-row > span {
  flex: 1;
  min-width: 0;
}
.task-row strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}
.task-row small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
}
.task-row > .ui-icon:last-child {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--muted);
}
.action-disclosure .task-row {
  padding: 13px 9px;
}
.action-disclosure .task-row:first-child {
  border-top: 0;
}
.value-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.value-pair span {
  font-size: 12px;
  color: var(--muted);
}
.value-pair strong {
  display: block;
  font-size: clamp(23px, 2vw, 29px);
  letter-spacing: -0.7px;
  font-weight: 750;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.value-pair > div:last-child strong {
  color: var(--green);
}
.valuation-reason {
  border-left: 2px solid var(--green);
  padding: 10px 14px;
  margin: 12px 0;
  background: var(--bg);
  border-radius: 0 8px 8px 0;
  font-size: 12px;
}
.valuation-reason p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 5px 0 0;
}
.cost-details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.cost-details > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--green);
  padding: 5px 0;
  font-weight: 650;
}
.cost-details .summary-row {
  font-size: 12px;
  gap: 16px;
}
.note-block {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.note-block:last-child {
  border-bottom: 0;
}
.note-block h3 {
  font-size: 12px;
  margin: 0 0 8px;
  color: var(--muted);
}
.note-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  margin: 0;
  line-height: 1.75;
}
.arrival-note {
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.arrival-note .note-block {
  padding: 9px 0;
  border: 0;
}
.history-panel {
  max-width: 920px;
}
.timeline {
  margin-top: 22px;
}
.timeline-entry {
  padding: 0 0 26px 4px;
}
.timeline-entry time {
  display: block;
  float: none;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}
.timeline-entry h3 {
  font-size: 14px;
  margin: 0 0 7px;
}
.timeline-entry .event-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  padding: 9px 12px;
  border-left: 2px solid var(--line);
  background: var(--bg);
  border-radius: 0 6px 6px 0;
}
.timeline-entry .event-actors {
  font-size: 11px;
  margin-top: 9px;
}
.timeline-entry:before {
  top: 5px;
}
.photo-grid img {
  object-fit: contain;
  max-height: 240px;
}
.summary-row {
  gap: 14px;
}
.summary-row > span {
  overflow-wrap: anywhere;
  min-width: 0;
}
/* Lot actions become a compact, sequential checklist, not nested button tiles. */
.lot-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  overflow: hidden;
}
.lot-actions .action-group {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(230px, 1fr);
  column-gap: 20px;
  padding: 16px 20px;
}
.lot-actions .action-group:last-child {
  border: 0;
}
.lot-actions .action-group h3 {
  font-size: 14px;
  margin: 0 0 5px;
}
.lot-actions .action-group p {
  grid-column: 1;
  min-height: 0;
  margin: 0;
  font-size: 12px;
}
.lot-actions .action-group-buttons {
  grid-column: 2;
  grid-row: 1/3;
  align-content: center;
  justify-content: flex-end;
}
.lot-actions .action-group-buttons > button {
  flex: 0 1 auto;
  font-size: 12px;
  padding: 8px 12px;
}
.metric {
  box-shadow: none !important;
  background: var(--panel) !important;
  color: var(--text) !important;
}
.metric:after,
.metric:before {
  display: none !important;
}
.metric .label,
.metric .foot {
  color: var(--muted) !important;
}
.metric .value {
  font-size: 25px;
}
.metric .label .ui-icon {
  display: none;
}
.bulkbar {
  align-items: center;
}
.table-mode td[data-label="Articolo"] .secondary:first-of-type {
  font-weight: 650;
  color: var(--text);
}
@media (min-width: 1001px) {
  .mobile-brand {
    display: none;
  }
  .content {
    padding: 0 32px 40px;
  }
}
@media (max-width: 1000px) {
  .topbar {
    height: 76px;
    margin-bottom: 22px;
    gap: 10px;
  }
  .topbar .global-search {
    max-width: none;
  }
  .mobile-brand {
    display: inline-flex;
  }
  .topbar .top-right > .primary {
    display: none;
  }
  .mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
    min-height: 70px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 19px 19px 0 0;
    box-shadow: 0 -4px 24px #26234a08;
  }
  .mobile-nav .mobile-menu-button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    min-height: 60px;
  }
  .mobile-nav .mobile-menu-button .ui-icon {
    width: 24px;
    height: 24px;
  }
  .mobile-nav > a {
    min-height: 60px;
    justify-content: center;
    font-size: 11px;
    gap: 5px;
  }
  .mobile-nav > a > b {
    height: 26px;
    display: grid;
    place-items: center;
  }
  .mobile-nav a[data-nav="scanner"] b {
    width: 48px;
    height: 48px;
    margin-top: -12px;
    border-radius: 14px;
  }
  .mobile-nav .mobile-menu-button[aria-expanded="true"] {
    color: var(--green);
  }
  .content {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
  .item-hero {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 15px;
  }
  .item-art {
    width: 86px;
    height: 120px;
  }
  .item-art .cover-large {
    width: 74px;
    height: 108px;
  }
  .item-hero-actions {
    grid-column: 1/-1;
    justify-content: flex-start;
    max-width: none;
  }
  .item-hero-actions .action-disclosure > div {
    left: 0;
    right: auto;
  }
  .workflow-board.queue-grid {
    gap: 12px;
  }
  .workflow-stage > header {
    padding: 15px 12px;
  }
  .workflow-row {
    padding: 12px;
    gap: 7px;
    font-size: 12px;
  }
  .workflow-row strong {
    font-size: 16px;
  }
}
@media (max-width: 700px) {
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }
  .topbar {
    gap: 8px;
  }
  .topbar .top-right {
    gap: 0;
  }
  .topbar .global-search input {
    padding-left: 33px;
    padding-right: 7px;
    height: 44px;
    font-size: 13px;
  }
  .topbar .global-search > .ui-icon {
    width: 17px;
    left: 10px;
  }
  .topbar .brand-mark {
    width: 40px;
    height: 40px;
  }
  .topbar .icon {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 8px;
  }
  .page-heading {
    gap: 14px;
    margin-top: 12px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading .subtitle {
    font-size: 13px;
  }
  .page-heading > .heading-actions {
    justify-content: flex-start;
  }
  .page-heading > .heading-actions > button {
    flex: 0 1 auto;
  }
  .panel {
    padding: 18px;
  }
  .panel-header {
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
  }
  .panel-header h2 {
    font-size: 16px;
  }
  .panel-header a {
    font-size: 11px;
  }
  .workflow-section .panel-header {
    flex-wrap: wrap;
  }
  .workflow-board.queue-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .workflow-stage > header {
    padding: 13px 16px;
    background: var(--bg);
  }
  .workflow-stage header p {
    font-size: 12px;
  }
  .workflow-row {
    min-height: 49px;
    padding: 12px 16px;
    font-size: 13px;
  }
  .workflow-row strong {
    font-size: 18px;
  }
  .workflow-row > .ui-icon:first-child {
    width: 18px;
    height: 18px;
  }
  .workflow-caption {
    font-size: 11px;
  }
  .finance-strip {
    grid-template-columns: 1fr 1fr;
  }
  .finance-strip > div {
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }
  .finance-strip > div:nth-child(2) {
    border-right: 0;
  }
  .finance-strip > div:nth-child(3) {
    border-bottom: 0;
  }
  .finance-strip strong {
    font-size: 24px;
  }
  .finance-strip span {
    font-size: 11px;
  }
  .finance-strip small {
    font-size: 10px;
  }
  .item-hero {
    gap: 13px;
    margin-bottom: 18px;
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .item-art {
    width: 72px;
    height: 104px;
    padding: 5px;
  }
  .item-art .cover-large {
    width: 60px;
    height: 92px;
  }
  .item-identity h1 {
    font-size: 24px;
    margin: 9px 0;
    line-height: 1.2;
  }
  .item-code {
    font-size: 11px;
    margin-bottom: 10px;
  }
  .identity-tags {
    gap: 5px;
  }
  .platform-badge,
  .edition-badge {
    font-size: 11px;
    padding: 5px 7px;
  }
  .platform-badge .ui-icon {
    width: 14px;
    height: 14px;
  }
  .item-identity .tag {
    font-size: 10px;
    padding: 4px 6px;
  }
  .item-hero-actions {
    display: flex;
    gap: 9px;
  }
  .item-hero-actions > button,
  .item-hero-actions > .primary-link {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    font-size: 13px;
  }
  .action-disclosure > div {
    width: min(300px, calc(100vw - 32px));
  }
  .item-hero-actions .action-disclosure > div {
    left: auto;
    right: 0;
  }
  .item-overview-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .detail-tabs {
    margin-bottom: 18px;
    gap: 0;
  }
  .detail-tabs > button {
    font-size: 12px;
    min-height: 46px;
    padding: 10px 5px;
  }
  .delivery-notice {
    padding: 12px;
    gap: 9px;
  }
  .copy-facts dd {
    font-size: 13px;
  }
  .value-pair strong {
    font-size: 26px;
  }
  .history-panel .panel-header {
    flex-direction: column;
    gap: 4px;
  }
  .timeline {
    padding-left: 18px;
  }
  .timeline-entry:before {
    left: -23px;
  }
  .timeline-entry h3 {
    font-size: 14px;
  }
  .timeline-entry p {
    font-size: 12px;
  }
  .note-copy {
    font-size: 13px;
  }
  .task-row {
    min-height: 58px;
    padding: 14px 0;
  }
  .task-row strong {
    font-size: 13px;
  }
  .lot-actions .action-group {
    display: block;
    padding: 16px;
  }
  .lot-actions .action-group-buttons {
    justify-content: flex-start;
    margin-top: 10px;
  }
  .lot-actions .action-group-buttons > button {
    flex: 0 1 auto;
  }
  .settings-nav {
    max-width: 100%;
    overflow: visible;
  }
  .settings-nav a {
    min-height: 44px;
  }
  .branding-setting {
    flex-wrap: wrap;
  }
  .branding-actions {
    width: 100%;
  }
  .table-wrap:has(.table-mode) {
    margin-left: -18px;
    margin-right: -18px;
  }
  .table-mode td[data-label="Articolo"] {
    max-width: 300px !important;
    white-space: normal !important;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  dialog {
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
  .modal-actions {
    position: sticky;
    bottom: -1px;
    background: var(--panel);
    padding: 14px 0 0;
  }
  .modal-actions > button {
    min-height: 44px;
  }
  .grid.two.section {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
  .task-row,
  .workflow-row {
    transition: none;
  }
}
@media (max-width: 1000px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }
  .top-right .date {
    display: none;
  }
}
@media (max-width: 850px) {
  .settings-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
    padding: 0 0 12px;
    overflow: visible;
  }
  .settings-nav a {
    min-width: 0;
    padding: 12px 10px;
    gap: 8px;
  }
  .settings-nav a > div {
    min-width: 0;
  }
  .settings-nav strong {
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
  .settings-nav .ui-icon {
    width: 18px;
    height: 18px;
  }
}
@media (max-width: 700px) {
  .topbar .global-search input {
    padding-left: 0;
    font-size: 16px;
  }
  .topbar .global-search > .ui-icon {
    position: static;
  }
}

.metric:hover{transform:none}.detail-tab-panel:focus{outline-offset:5px}

/* Typed photos: upload rows, classified cards and marketplace export choices. */
.panel-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.photo-upload-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
}
.photo-upload-list:empty {
  display: none;
}
.photo-upload-row {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.photo-upload-row img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 9px;
  flex-shrink: 0;
}
.photo-upload-fields {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  flex: 1;
}
.photo-upload-fields strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.photo-card {
  margin: 0;
  width: 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}
.photo-card > a {
  display: block;
}
.photo-card img {
  width: 100%;
  height: 120px;
  display: block;
  border-radius: 0;
}
.photo-card .photo-file {
  display: block;
  padding: 36px 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.photo-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-start;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.photo-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.photo-edit-preview {
  text-align: center;
  margin-bottom: 18px;
}
.photo-edit-preview img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 12px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-weight: 500;
  font-size: 13px;
}
.choice input {
  width: auto;
  min-height: 0;
  accent-color: var(--green);
  flex-shrink: 0;
}
.choice em {
  font-style: normal;
}
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0 0 24px;
}

/* Full-screen photo viewer: open in place instead of downloading the file. */
#lightbox {
  width: min(1100px, 96vw);
  max-width: 96vw;
  max-height: 94vh;
  padding: 18px;
  border-radius: 18px;
}
#lightbox::backdrop {
  background: #0b0a16e0;
}
.photo-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  min-height: 0;
  cursor: zoom-in;
}
.photo-open:hover {
  background: none;
  border: 0;
}
.lightbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.lightbox-head strong {
  display: block;
  font-size: 15px;
}
.lightbox-head .help {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.lightbox-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.lightbox-stage img {
  flex: 1;
  min-width: 0;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg);
}
.lightbox-nav {
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
  min-width: 44px;
}
.lightbox-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.lightbox-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 700px) {
  #lightbox {
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 16px;
  }
  .lightbox-stage img {
    max-height: 58vh;
  }
}
.photo-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.photo-card-actions button {
  padding: 5px 8px;
  font-size: 11px;
  min-height: 32px;
}
.lightbox-actions {
  align-items: center;
  gap: 14px;
}

/* Release notes stay readable on wide screens without constraining other pages. */
.release-current{display:flex;align-items:center;justify-content:space-between;gap:24px;border-color:var(--accent,#4f46d7);margin-bottom:24px}
.release-current>div{display:grid;gap:8px}.release-current strong{font-size:2rem;overflow-wrap:anywhere}
.release-current>.ui-icon{width:40px;height:40px;color:var(--accent,#4f46d7);flex-shrink:0}
.release-history{display:grid;gap:20px;max-width:1100px}.release-note h2{margin:14px 0}
.release-meta{display:flex;align-items:center;flex-wrap:wrap;gap:12px;color:var(--muted,#6b7280);font-size:.9rem}
.release-note ul{padding-left:22px;margin:0;max-width:85ch}.release-note li{margin:10px 0;line-height:1.6;overflow-wrap:anywhere}
