/*
  App-specific rules that must not depend on the Tailwind scan/build.
  DaisyUI + Tailwind utilities come from the CDN in base.html.

  Shared chrome (home + review + upload + email + settings): .lux-panel,
  .lux-page-header, .lux-section-label, .lux-status-*. List tables use
  django_tables2/daisyui. Bump ?v= on lux.css in base.html when this file
  changes (sandbox/Caddy cache).
*/

a.lux-settings-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.lux-settings-card:hover {
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.06),
    0 16px 32px rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

.lux-settings-card .lux-panel-title {
  margin-bottom: 0;
}

/* Soft white cards on the gray page background */
.lux-panel {
  border-radius: 1rem;
  background: var(--color-base-100, #fff);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.04),
    0 12px 28px rgb(0 0 0 / 0.08);
}

.lux-panel-body {
  padding: 1.25rem 1.5rem;
}

.lux-panel-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

/* Page title block (home filter panel / review header) */
.lux-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.lux-page-header h1,
.lux-page-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}

.lux-page-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.55;
  margin-bottom: 0.35rem;
  text-decoration: none;
  color: inherit;
}

.lux-page-kicker:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.lux-page-sub {
  font-size: 0.875rem;
  opacity: 0.6;
  margin: 0.35rem 0 0;
}

.lux-section-label {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.6;
  margin: 0 0 0.5rem;
}

/* Status accents — same tokens as home stat cards */
.lux-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-left-width: 3px;
  background: var(--color-base-100, #fff);
  color: inherit;
}

.lux-status-pending {
  --lux-stat-accent: var(--color-warning, #fbbd23);
  border-color: color-mix(in oklab, var(--lux-stat-accent) 35%, transparent);
  border-left-color: var(--lux-stat-accent);
  background: color-mix(in oklab, var(--lux-stat-accent) 12%, white);
}

.lux-status-pushed {
  --lux-stat-accent: var(--color-success, #36d399);
  border-color: color-mix(in oklab, var(--lux-stat-accent) 35%, transparent);
  border-left-color: var(--lux-stat-accent);
  background: color-mix(in oklab, var(--lux-stat-accent) 12%, white);
}

.lux-status-rejected {
  --lux-stat-accent: var(--color-neutral, #3d4451);
  border-color: color-mix(in oklab, var(--lux-stat-accent) 30%, transparent);
  border-left-color: var(--lux-stat-accent);
  background: color-mix(in oklab, var(--lux-stat-accent) 8%, white);
}

.lux-status-failed {
  --lux-stat-accent: var(--color-error, #f87272);
  border-color: color-mix(in oklab, var(--lux-stat-accent) 35%, transparent);
  border-left-color: var(--lux-stat-accent);
  background: color-mix(in oklab, var(--lux-stat-accent) 12%, white);
}

/* Review line items — colgroup-driven widths; description is text+ellipsis, not an input */
#review-form .lux-line-items {
  width: 100%;
  min-width: 40rem;
  table-layout: fixed;
}

#review-form .lux-line-items .lux-col-match {
  width: 13.5rem;
}

#review-form .lux-line-items .lux-col-code {
  width: 8.5rem;
}

#review-form .lux-line-items .lux-col-desc {
  width: auto;
}

#review-form .lux-line-items .lux-col-qty {
  width: 3.75rem;
}

#review-form .lux-line-items .lux-col-price {
  width: 6.5rem;
}

#review-form .lux-line-items .lux-col-del {
  width: 4.25rem;
}

#review-form .lux-line-items th,
#review-form .lux-line-items td {
  vertical-align: middle;
}

#review-form .lux-line-items th:last-child,
#review-form .lux-line-items td:last-child {
  text-align: center;
}

#review-form .lux-line-items .lux-input-qty,
#review-form .lux-line-items .lux-input-price {
  width: 100%;
  max-width: 6rem;
  text-align: right;
  padding-inline: 0.4rem;
}

#review-form .lux-line-items td:nth-of-type(2) input {
  width: 100%;
  text-align: left;
}

#review-form .lux-desc-truncate {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0.72;
  cursor: default;
}

#review-form .lux-price-ok {
  margin-top: 0.25rem;
  font-size: 0.65rem;
  line-height: 1.25;
  color: var(--color-success, #36d399);
}

/* Review: price-mismatch choice under a line's price (NetSuite vs PO) */
#review-form .lux-price-choice {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  font-size: 0.7rem;
  line-height: 1.2;
}

#review-form .lux-price-choice .badge {
  white-space: nowrap;
}

#review-form .lux-price-choice label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  white-space: nowrap;
}

/* Review: rep overage note under a line's price (neutral, not a pass/fail colour) */
#review-form .lux-price-note {
  margin-top: 0.25rem;
  font-size: 0.65rem;
  line-height: 1.25;
  opacity: 0.7;
}

/* Review: Remove-line control (wraps the formset DELETE checkbox) */
#review-form .lux-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#review-form .lux-remove input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--color-error, #f87272);
  cursor: pointer;
}

#review-form tr.lux-row-removed td {
  opacity: 0.45;
  text-decoration: line-through;
}

#review-form tr.lux-row-removed td:last-child {
  opacity: 1;
  text-decoration: none;
}

/* Review: Commercial line summary under the line items */
#review-form .lux-overage-summary {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  background: color-mix(in oklab, var(--color-accent, #37cdbe) 10%, transparent);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
}

#review-form .lux-overage-summary > div {
  flex-basis: 100%;
}

/* Review: lines total vs the PDF's printed total */
#review-form .lux-order-total {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 0.5rem;
  font-size: 0.95rem;
  text-align: right;
}
#review-form .lux-order-total > div {
  flex-basis: 100%;
}
#review-form .lux-order-total-off {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: color-mix(in oklab, var(--color-warning, #fbbd23) 14%, transparent);
}

/* Review: email meta (when PO came from Graph) */
.lux-email-meta .lux-email-subject {
  margin: 0.25rem 0 0.35rem;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* Review: PDF pane + form actions */
.lux-pdf-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.65rem;
  border: 1px solid color-mix(in oklab, var(--color-base-content, #1f2937) 14%, transparent);
  background: color-mix(in oklab, var(--color-base-200, #e5e7eb) 55%, white);
}

.lux-pdf-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0.65;
}

.lux-pdf-frame {
  width: 100%;
  height: 80vh;
  border: 0;
  border-radius: 0.75rem;
  background: var(--color-base-200, #e5e7eb);
}

.lux-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in oklab, var(--color-base-content, #1f2937) 12%, transparent);
}

.lux-review-actions .lux-review-reject {
  margin-left: auto;
}

/* Review page activity log (ul only — do not put .lux-activity on a panel). */
ul.lux-activity {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.lux-activity > li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--color-base-content, #1f2937) 8%, transparent);
  font-size: 0.9rem;
}

ul.lux-activity > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

ul.lux-activity > li:first-child {
  padding-top: 0;
}

ul.lux-activity .lux-activity-time {
  font-size: 0.8rem;
  opacity: 0.55;
  white-space: nowrap;
}

/* Form validation (Django errorlist) — shared, not inline in review.html */
.errorlist {
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  background-color: color-mix(in oklab, var(--color-error, #f87272) 12%, white);
  color: color-mix(in oklab, var(--color-error, #f87272) 55%, #1f2937);
  border: 1px solid color-mix(in oklab, var(--color-error, #f87272) 35%, transparent);
  border-radius: 0.5rem;
}

/* Status cards + separate archive card */
/* Seven equal cards: PO statuses + inbound + archive (no side gap). */
.lux-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem;
  min-width: 0;
}

@media (max-width: 1100px) {
  .lux-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .lux-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lux-stat-inbound {
  --lux-stat-accent: var(--color-info, #3abff8);
  border-left-color: var(--lux-stat-accent);
}

/* Home desk activity (below PO table) — scoped; not Review's ul.lux-activity */
.lux-desk-activity-heading {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.lux-desk-activity-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--color-base-content, #1f2937) 8%, transparent);
}

.lux-desk-activity-item {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: baseline;
  padding: 0.55rem 0.85rem;
  background: var(--color-base-100, #fff);
  border-bottom: 1px solid color-mix(in oklab, var(--color-base-content, #1f2937) 6%, transparent);
}

.lux-desk-activity-item:nth-child(even) {
  background: color-mix(in oklab, var(--color-base-200, #e5e7eb) 45%, white);
}

.lux-desk-activity-item:last-child {
  border-bottom: none;
}

.lux-desk-activity-po {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-primary, #570df8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lux-desk-activity-po:hover {
  text-decoration: underline;
}

.lux-desk-activity-msg {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.lux-desk-activity-time {
  font-size: 0.7rem;
  opacity: 0.5;
  white-space: nowrap;
  flex-shrink: 0;
}

.lux-desk-activity-pager {
  display: inline-flex;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .lux-desk-activity-item {
    grid-template-columns: 1fr auto;
  }

  .lux-desk-activity-msg {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

.lux-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: var(--color-base-100, #fff);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.04),
    0 8px 20px rgb(0 0 0 / 0.06);
  border: 1px solid transparent;
  border-left: 4px solid var(--color-base-300, #d1d5db);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.lux-stat:hover {
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.04),
    0 12px 28px rgb(0 0 0 / 0.1);
}

.lux-stat-active {
  border-color: color-mix(in oklab, var(--lux-stat-accent, var(--color-primary)) 35%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--lux-stat-accent, var(--color-primary)) 25%, transparent),
    0 12px 28px rgb(0 0 0 / 0.08);
}

.lux-stat-pending {
  --lux-stat-accent: var(--color-warning, #fbbd23);
  border-left-color: var(--lux-stat-accent);
}

.lux-stat-pushed {
  --lux-stat-accent: var(--color-success, #36d399);
  border-left-color: var(--lux-stat-accent);
}

.lux-stat-rejected {
  --lux-stat-accent: var(--color-neutral, #3d4451);
  border-left-color: var(--lux-stat-accent);
}

.lux-stat-failed {
  --lux-stat-accent: var(--color-error, #f87272);
  border-left-color: var(--lux-stat-accent);
}

.lux-stat-archived {
  --lux-stat-accent: var(--color-base-content, #1f2937);
  border-left-color: color-mix(in oklab, var(--lux-stat-accent) 40%, transparent);
  border-style: dashed;
  background: color-mix(in oklab, var(--color-base-200, #e5e7eb) 55%, white);
}

.lux-stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.65;
}

.lux-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lux-stat-hint {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.55;
  margin-top: 0.15rem;
}

/* Actions: centered header; rule between open button and archive */
.lux-actions-head {
  text-align: center;
}

.lux-actions-cell {
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}

.lux-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.lux-actions form {
  display: inline-flex;
  margin: 0;
  padding-left: 0.45rem;
  border-left: 1px solid color-mix(in oklab, var(--color-base-content, #1f2937) 22%, transparent);
}

.lux-action-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
  flex-shrink: 0;
}

/* Fixed width so View / Review rows stay aligned */
.lux-action-open {
  min-width: 5.75rem;
  justify-content: flex-start;
  gap: 0.35rem;
  font-weight: 500;
  padding-inline: 0.55rem;
}

.lux-action-review {
  background: color-mix(in oklab, var(--color-primary, #570df8) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--color-primary, #570df8) 45%, transparent);
  color: var(--color-primary, #570df8);
}

.lux-action-review:hover {
  background: color-mix(in oklab, var(--color-primary, #570df8) 20%, transparent);
}

.lux-action-view {
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--color-base-content, #1f2937) 18%, transparent);
  color: color-mix(in oklab, var(--color-base-content, #1f2937) 75%, transparent);
}

.lux-action-view:hover {
  background: color-mix(in oklab, var(--color-base-200, #e5e7eb) 80%, white);
  border-color: color-mix(in oklab, var(--color-base-content, #1f2937) 28%, transparent);
}

.lux-action-archive {
  opacity: 0.7;
}

.lux-action-archive:hover {
  opacity: 1;
  background: color-mix(in oklab, var(--color-base-200, #e5e7eb) 80%, white);
}

/*
  Shared list tables (home POs + inbound email): horizontal scroll shell,
  fixed layout, column resize handles. #po-table kept as alias for older hooks.
*/
.lux-data-table-shell,
#po-table-shell {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.lux-data-table,
#po-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 58rem;
}

#email-table.lux-data-table {
  min-width: 48rem;
}

.lux-data-table th,
.lux-data-table td,
#po-table th,
#po-table td {
  position: relative;
  vertical-align: middle;
}

.lux-data-table .file-cell,
#po-table .file-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: 0.75rem;
  opacity: 0.55;
}

.lux-data-table .buyer-cell,
#po-table .buyer-cell {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

#po-table th:nth-child(4),
#po-table td:nth-child(4),
#po-table th:nth-child(5),
#po-table td:nth-child(5),
#po-table th:nth-child(6),
#po-table td:nth-child(6) {
  overflow: visible;
  white-space: nowrap;
}

#po-table th:nth-child(1),
#po-table td:nth-child(1),
#po-table th:nth-child(2),
#po-table td:nth-child(2),
#po-table th:nth-child(3),
#po-table td:nth-child(3) {
  overflow: hidden;
}

#email-table th:nth-child(4),
#email-table td:nth-child(4),
#email-table th:nth-child(5),
#email-table td:nth-child(5) {
  overflow: visible;
  white-space: nowrap;
}

.lux-data-table .col-resize,
#po-table .col-resize {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}

.lux-data-table .col-resize:hover,
#po-table .col-resize:hover {
  background: color-mix(in oklab, var(--color-primary, #570df8) 35%, transparent);
}

.lux-filter-row,
#po-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.lux-filter-row .lux-filter-search,
#po-filter-row .po-filter-search {
  width: 18rem;
  max-width: 100%;
}

.lux-filter-row .lux-filter-status,
#po-filter-row .po-filter-status {
  width: 11rem;
  max-width: 100%;
}


/* Review: Ship To folded to one line; click to edit (opens itself on errors or no address) */
#review-form .lux-shipto {
  margin-top: 0.5rem;
  border: 1px solid color-mix(in oklab, currentColor 15%, transparent);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

#review-form .lux-shipto > summary {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
}

#review-form .lux-shipto > summary::-webkit-details-marker {
  display: none;
}

#review-form .lux-shipto-label {
  font-weight: 600;
  white-space: nowrap;
}

#review-form .lux-shipto-line {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.8;
}

#review-form .lux-shipto-edit {
  font-size: 0.8rem;
  opacity: 0.6;
}

#review-form .lux-shipto[open] .lux-shipto-edit {
  display: none;
}

/* Review: Save / Reject / Approve stay in reach while scrolling long orders */
#review-form .lux-review-actionbar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 20;
  box-shadow: 0 -2px 12px rgb(0 0 0 / 0.08), 0 2px 6px rgb(0 0 0 / 0.06);
}

/* Review: NetSuite item picker in the Match column (badge, search box, "Use" suggestion) */
#review-form .lux-item-picker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

#review-form .lux-item-picker .lux-item-search {
  font-size: 0.72rem;
}

#review-form .lux-item-picker .lux-item-use {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Review: "What do these do?" help beside the action buttons (opens upward from the sticky bar) */
.lux-review-help {
  position: relative;
  font-size: 0.8rem;
}

.lux-review-help > summary {
  cursor: pointer;
  opacity: 0.65;
  text-decoration: underline dotted;
  list-style: none;
}

.lux-review-help > summary::-webkit-details-marker {
  display: none;
}

.lux-review-help[open] > dl {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  z-index: 30;
  width: min(30rem, 80vw);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--color-base-100, #fff);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.15);
}

.lux-review-help dt {
  font-weight: 600;
  margin-top: 0.4rem;
}

.lux-review-help dt:first-child {
  margin-top: 0;
}

.lux-review-help dd {
  margin: 0.1rem 0 0;
  opacity: 0.8;
  line-height: 1.35;
}

/* Review: "Hide prices" collapses the Price column (5th) */
#review-form .lux-line-items.lux-hide-prices .lux-col-price {
  width: 0;
}

#review-form .lux-line-items.lux-hide-prices th:nth-child(5),
#review-form .lux-line-items.lux-hide-prices td:nth-child(5) {
  display: none;
}

/* Review: a matched line shows the NetSuite item as text with a quiet "change" link */
#review-form .lux-item-chosen {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  max-width: 100%;
}

#review-form .lux-item-name {
  font-size: 0.75rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

#review-form .lux-item-change {
  font-size: 0.7rem;
  opacity: 0.6;
  text-decoration: underline dotted;
  cursor: pointer;
  flex-shrink: 0;
}

#review-form .lux-item-change:hover {
  opacity: 1;
}

/* Top navigation: a quiet tint for the current page instead of DaisyUI's solid fill */
.lux-nav a.menu-active {
  background: color-mix(in oklab, var(--color-primary, #570df8) 10%, transparent);
  color: var(--color-primary, #570df8);
  font-weight: 600;
}

/* Page layout (templates/lux/page.html) */
.lux-page-narrow {
  max-width: 34rem;
  margin-inline: auto;
}

.lux-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lux-page-actions:empty {
  display: none;
}

/* Upload: a real drop zone instead of a bare file button */
.lux-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 11rem;
  padding: 1.5rem;
  border: 2px dashed color-mix(in oklab, var(--color-base-content, #1f2937) 20%, transparent);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--color-base-200, #f2f2f2) 60%, transparent);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lux-dropzone:hover,
.lux-dropzone-over {
  border-color: var(--color-primary, #570df8);
  background: color-mix(in oklab, var(--color-primary, #570df8) 6%, transparent);
}

.lux-dropzone-ready {
  border-style: solid;
  border-color: var(--color-success, #36d399);
  background: color-mix(in oklab, var(--color-success, #36d399) 8%, transparent);
}

.lux-dropzone-icon {
  font-size: 1.75rem;
  line-height: 1;
  opacity: 0.6;
}

/* The real input covers the zone so clicking and dropping both work */
.lux-dropzone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.lux-footer {
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.45;
}

/* Progress card for slow actions (lux/js/progress.js) */
.lux-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: color-mix(in oklab, var(--color-base-content, #1f2937) 25%, transparent);
  backdrop-filter: blur(2px);
  animation: lux-fade-in 0.15s ease-out;
}

.lux-progress-card {
  width: min(26rem, 100%);
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  background: var(--color-base-100, #fff);
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.lux-progress-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.lux-progress-steps {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.875rem;
}

.lux-progress-steps li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.lux-progress-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  flex-shrink: 0;
  border: 2px solid currentColor;
}

.lux-progress-steps li.lux-progress-current {
  opacity: 1;
  font-weight: 600;
}

.lux-progress-steps li.lux-progress-current .lux-progress-dot {
  border-color: var(--color-primary, #570df8);
  animation: lux-pulse 1s ease-in-out infinite;
}

.lux-progress-steps li.lux-progress-done {
  opacity: 0.75;
}

.lux-progress-steps li.lux-progress-done .lux-progress-dot {
  border-color: var(--color-success, #36d399);
  background: var(--color-success, #36d399);
}

.lux-progress-note {
  font-size: 0.75rem;
  opacity: 0.6;
}

@keyframes lux-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lux-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

/*
  Lux palette (2026-11-09). Overrides DaisyUI's light theme colors. DaisyUI defines its themes in a CSS
  layer, so these unlayered rules win without redefining the whole theme. Deep blue primary (calm,
  businesslike), teal accent (overage/rush highlights), warm greys; amber is kept for the logo only so it
  never reads as the yellow "Pending" status.
*/
[data-theme="light"] {
  --color-base-100: oklch(100% 0 0);
  --color-base-200: oklch(97.6% 0.004 80);
  --color-base-300: oklch(93.5% 0.006 80);
  --color-base-content: oklch(24% 0.02 260);
  --color-primary: oklch(42% 0.12 258);
  --color-primary-content: oklch(98% 0.01 258);
  --color-secondary: oklch(55% 0.09 250);
  --color-secondary-content: oklch(98% 0.01 250);
  --color-accent: oklch(70% 0.11 195);
  --color-accent-content: oklch(25% 0.04 200);
  --color-neutral: oklch(27% 0.03 258);
  --color-neutral-content: oklch(95% 0.01 258);
  --lux-glow: oklch(80% 0.15 75);
}

/* Logo (templates/lux/_logo.html) */
.lux-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.lux-logo-mark {
  width: 1.5rem;
  height: 1.5rem;
}

.lux-logo-sun {
  fill: var(--lux-glow);
}

.lux-logo-rays line {
  stroke: var(--lux-glow);
}

.lux-logo-word {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.lux-logo-lg .lux-logo-mark {
  width: 2.5rem;
  height: 2.5rem;
}

.lux-logo-lg .lux-logo-word {
  font-size: 2rem;
}

/* Review: each line compared with the PO's Estimate */
#review-form .lux-estimate-note {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

/* Review: tape rolls vs feet under the quantity (lux/units.py) */
#review-form .lux-unit-note {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  min-width: 11rem;
}
