/* Palette observed on akashikatienda.com, 2026-10-12. */
@import url('/assets/fonts.css');
:root {
  --ink: #4a2d57;
  --muted: #898092;
  --green: #796799;
  --paper: #faf8f3;
  --line: #ebe5ed;
  --sage: #eeeaf7;
  --rose: #f4e6d3;
  --orange: #bba055;
  font-family: 'Public Sans', 'Segoe UI', sans-serif;
}
h1,
h2,
h3 {
  font-family: 'Readex Pro', 'Segoe UI', sans-serif;
}
.stock-filter {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}
.stock-filter input {
  width: auto;
}
.product-art img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  background: #fff;
  padding: 10px;
}
.product-art small {
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fffdf4ed;
}
.product-info > small {
  display: block;
}
.product-info h3 {
  line-height: 1.5;
}
.product-info .product-price {
  margin-top: 12px;
}
body {
  background: var(--paper);
}
.sidebar {
  background: #fcf6e4;
  border-color: #ece2c8;
}
.brand-logo {
  width: 110px;
  height: 92px;
  object-fit: contain;
}
.sidebar .brand {
  justify-content: center;
  position: relative;
  padding: 0 10px 13px;
}
.brand-caption {
  font-size: 14px !important;
  font-family: inherit !important;
  letter-spacing: 1.8px !important;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  color: #9184ac;
}
.workspace {
  background: #f4eddb;
  border-color: #e9dfc4;
}
.workspace-icon {
  color: #bfa34f;
}
.workspace small,
.nav-label {
  color: #9c8b78;
}
nav button {
  color: #85728e;
}
nav button > span {
  color: #b3a47f;
}
nav button.active {
  background: #e9e2f3;
  color: #6d5689;
}
nav button.active > span {
  color: #9a86b5;
}
nav button:hover {
  background: #f1ebf5;
}
.dot {
  background: #b9a060;
}
.topbar {
  background: #fdfaf1;
  border-bottom-color: #eee5d0;
}
.primary,
button.primary {
  background: #8b79aa;
}
.primary:hover,
button.primary:hover {
  background: #74608f;
}
.avatar {
  background: #eae3f5;
  color: #806598;
}
.greeting {
  color: #c0a34e;
}
.welcome-strip {
  background: linear-gradient(110deg, #f4edda, #eee8f7);
  border-color: #e9dfc8;
}
.welcome-symbol {
  color: #c3a64c;
}
.welcome-strip p {
  color: #8a7d95;
}
.strip-tag {
  color: #9b8bac;
}
.stat i {
  color: #b3a054;
}
.stat strong {
  color: #65487a;
}
.chart-bar {
  background: linear-gradient(#bcb3d9, #9f8bb9);
}
.pill.success {
  background: #eee8f7;
  color: #8b70a5;
}
.pill.warning {
  background: #f7eed6;
  color: #a48a43;
}
.pill.blue {
  background: #f1e7f0;
  color: #9b7195;
}
.product-icon {
  background: #f5efd9;
  color: #baa055;
}
.stock-amount {
  color: #aa8b43;
}
.product-art {
  background: #f2edf7;
}
.product-art > span {
  color: #aa8bbc;
}
.art-1,
.art-4 {
  background: #f4eada;
}
.art-2,
.art-5 {
  background: #ebe6f3;
}
.connection-note {
  border-color: #d9cce4;
  color: #918097;
}
.connection-note b {
  color: #92799e;
}
.demo-pill {
  background: #eee8f6;
  color: #8c72a5;
}
.local-indicator {
  border-color: #e8ddc6;
}
.subtle-tag {
  background: #f5f0fa;
  color: #a08bae;
}
.text-button {
  color: #9278aa;
}
.login-story {
  background: linear-gradient(140deg, #fbf3d9 10%, #eee5f2 80%);
  color: #644875;
}
.login-story .brand {
  justify-content: flex-start;
}
.login-story .brand-logo {
  width: 130px;
  height: 118px;
}
.login-story .brand-caption {
  display: none;
}
.story-body .eyebrow {
  color: #a296b2;
}
.story-body h1 {
  color: #644875;
}
.story-body em {
  color: #a28ac1;
}
.story-body p {
  color: #8a7895;
}
.orbit {
  border-color: #c4ac6255;
}
.orbit:after {
  border-color: #c4ac6240;
}
.orbit-inner {
  color: #c4a74e;
}
.orbit-label {
  color: #b59a50;
}
.login-story footer {
  color: #a190a6;
}
.login-form {
  background: #fdfbf7;
}
.login-card h2 {
  color: #6c4e7d;
}
.login-foot {
  color: #ad9fbd;
}
.fiscal-icon {
  background: #efe7f7;
  color: #a18bbb;
}
.fiscal-hero h2 {
  color: #78608a;
}
.integration-icon {
  color: #a893bd;
}
.info-box {
  background: #f5eff9;
  color: #92809d;
}
.order-total {
  background: #f4eef9;
}
.main-footer {
  border-color: #ece4ed;
  color: #a797b2;
}
.history-buttons {
  display: flex;
  margin-left: auto;
  margin-right: 14px;
}
.store-hero {
  padding: 26px;
  background: linear-gradient(110deg, #f8efd7, #eee5f8);
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
}
.store-hero .brand-logo {
  width: 105px;
  height: 105px;
}
.store-hero h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 27px;
}
.store-hero p {
  color: #94819c;
  font-size: 15px;
  line-height: 1.8;
  margin-top: 7px;
}
.store-hero .pill {
  margin-left: auto;
}
.store-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 17px;
}
.store-body {
  padding: 25px;
}
.store-body h2 {
  margin-bottom: 12px;
}
.store-body p {
  font-size: 15px;
  line-height: 1.9;
  color: #93849c;
}
.store-setup {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 23px 0;
}
.store-step {
  background: #faf7fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.store-step span {
  display: block;
  color: #b69c53;
  font-family: Georgia, serif;
  font-size: 27px;
  margin-bottom: 13px;
}
.store-step b {
  font-size: 15px;
  font-weight: 500;
}
.store-step p {
  font-size: 14px;
  margin-top: 8px;
}
.catalog-reference {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.catalog-reference span {
  padding: 9px 12px;
  border-radius: 20px;
  background: #f7f0df;
  font-size: 14px;
  color: #9b8a54;
}
.store-sync-note {
  background: #f3edf8;
  padding: 15px;
  border-radius: 7px;
  margin-top: 20px;
}
.store-snapshot {
  margin-top: 22px;
}
.store-snapshot h2 {
  padding: 22px;
}
.logo-caption-text {
  font-size: 14px;
  font-family: inherit;
  color: #a394b4;
}
.store-error {
  color: #a26172;
  font-size: 15px;
  margin-top: 13px;
}
.login-story .brand {
  position: relative;
}
.login-story h1 {
  font-family: Georgia, serif;
}
.sidebar .brand > span:last-child {
  font-family: inherit;
}
.login-story .brand > span:last-child {
  font-family: inherit;
}
@media (max-width: 800px) {
  .history-buttons {
    margin-right: 0;
  }
  .store-hero {
    flex-wrap: wrap;
    padding: 22px;
  }
  .store-hero .pill {
    margin-left: 0;
  }
  .store-setup {
    grid-template-columns: 1fr;
  }
  .login-story .brand-logo {
    height: 80px;
    width: 95px;
  }
  .store-hero h2 {
    font-size: 23px;
  }
  .topbar {
    gap: 5px;
  }
  .history-buttons .icon-button {
    width: 25px;
  }
}
@media (max-width: 480px) {
  .brand-logo {
    width: 100px;
  }
  .store-hero .brand-logo {
    width: 75px;
    height: 75px;
  }
  .store-body {
    padding: 20px;
  }
  .topbar .breadcrumb {
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .demo-pill {
    font-size: 14px;
    letter-spacing: 0.5px;
  }
  .topbar-right {
    gap: 5px;
  }
  .history-buttons {
    margin-left: 0;
  }
  .stat strong {
    font-size: 22px;
  }
}

/* Reading sizes and space for larger labels. */
body {
  line-height: 1.5;
}
.sidebar {
  width: 285px;
  overflow-y: auto;
}
.main {
  margin-left: 285px;
  width: calc(100% - 285px);
}
nav {
  flex-shrink: 0;
}
nav button {
  white-space: normal;
  line-height: 1.4;
}
nav button > span {
  flex-shrink: 0;
}
.page-heading p,
.store-body p,
.store-hero p,
.modal-heading p,
.footnote {
  line-height: 1.7;
}
label input,
label select,
label textarea {
  font-size: 17px;
  min-height: 46px;
}
th {
  font-size: 14px;
}
td {
  font-size: 15px;
}
dialog {
  width: 680px;
}
.stat strong {
  overflow-wrap: anywhere;
}
.product-price {
  flex-wrap: wrap;
}
.panel-heading {
  flex-wrap: wrap;
}
@media (max-width: 1000px) and (min-width: 801px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .main {
    margin-left: 0;
    width: 100%;
  }
  .sidebar {
    width: min(300px, 90vw);
  }
  .topbar {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .topbar .breadcrumb {
    max-width: none;
    white-space: normal;
  }
  .main-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
}

.report-tabs,
.report-filter-actions,
.report-export {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.report-tabs {
  margin-bottom: 20px;
}
.report-filters {
  padding: 22px;
}
.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 20px;
}
.report-detail {
  padding: 24px;
}
.report-detail > p,
.report-detail > h3,
.report-detail > .report-export {
  margin-bottom: 18px;
}
.report-detail h3 {
  margin-top: 22px;
}
.report-detail .table-wrap {
  margin-bottom: 18px;
}
.report-detail td,
.report-detail th {
  padding: 12px;
}
.report-detail table {
  white-space: normal;
}
.report-detail .secondary {
  display: inline-block;
}
.report-export a {
  display: inline-flex;
  align-items: center;
}
@media (max-width: 1100px) {
  .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .report-filter-grid {
    grid-template-columns: 1fr;
  }
  .report-detail {
    padding: 18px;
  }
}
.report-client-summary {
  padding: 22px;
  margin-bottom: 20px;
}
.report-client-summary p {
  margin-top: 8px;
  overflow-wrap: anywhere;
}

dialog:has(.report-detail) {
  width: 1000px;
}

/* Unified searchable client selector and paired date filters. */
.report-filters {
  overflow: visible;
}
.report-client-picker {
  position: relative;
  margin-bottom: 18px;
  min-width: 0;
}
.report-client-picker > label {
  margin-bottom: 8px;
}
.report-client-control {
  position: relative;
}
.report-client-control input {
  width: 100%;
  padding: 11px 42px 11px 12px;
  font-size: 17px;
  min-height: 46px;
  border: 1px solid #dfe3d5;
  border-radius: 6px;
  background: #fcfcfa;
  color: var(--ink);
  min-width: 0;
}
.report-client-control input:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.report-client-control > button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 34px;
  background: transparent;
  color: var(--ink);
  border-radius: 5px;
}
.report-client-options {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 40;
  max-height: 280px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px #4a2d5720;
  border-radius: 7px;
}
.report-client-options[hidden] {
  display: none;
}
.report-client-options button {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: white;
  color: var(--ink);
  font-size: 16px;
  white-space: normal;
}
.report-client-options button:hover,
.report-client-options button:focus,
.report-client-options button[aria-selected='true'] {
  background: var(--sage);
}
.report-client-options small {
  display: block;
  color: var(--muted);
}
.report-client-options p {
  padding: 12px;
}
.report-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  grid-column: span 2;
  min-width: 0;
}
@media (max-width: 600px) {
  .report-date-range {
    grid-column: span 1;
    gap: 12px;
  }
}

.factory-editor {
  padding: 24px;
  margin-bottom: 24px;
}
.factory-editor > p {
  margin-top: 10px;
  margin-bottom: 20px;
  line-height: 1.7;
}
.factory-form {
  margin-top: 22px;
}
.factory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 20px;
}
.factory-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.factory-line {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.factory-line > p {
  font-size: 15px;
}
.factory-line small {
  display: block;
  color: var(--muted);
}
.factory-line input,
.factory-line select {
  min-width: 0;
}
.factory-total,
.factory-calculation {
  padding: 18px;
  background: var(--sage);
  border-radius: 8px;
  margin: 20px 0;
  font-size: 17px;
}
.factory-calculation p {
  margin: 6px 0;
}
.factory-disclosure {
  margin-top: 24px;
}
.factory-disclosure > summary {
  padding: 22px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}
.factory-note {
  padding: 0 22px;
}
.factory-search {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  max-width: 300px;
  width: 100%;
  font-size: 16px;
}
.factory-balance {
  padding: 16px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: 17px;
  font-weight: 600;
}
.factory-balance.success {
  background: #e7f1e4;
  color: #315d31;
}
.factory-balance.error {
  background: #fbe5e5;
  color: #a02c2c;
}
.factory-danger {
  color: #b32d36;
  font-weight: 600;
}
.factory-source-label {
  margin-bottom: 0;
  min-width: 180px;
}
.factory-source-label select {
  font-size: 16px;
}
#factory-editor {
  scroll-margin-top: 20px;
}
@media (max-width: 1000px) {
  .factory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .factory-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .factory-grid,
  .factory-line {
    grid-template-columns: 1fr;
  }
  .factory-editor {
    padding: 18px;
  }
  .factory-form-actions > button {
    width: 100%;
  }
}

#cost-rows th:first-child,
#cost-rows td:first-child,
#production-stock-rows th:first-child,
#production-stock-rows td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  max-width: 270px;
  min-width: 200px;
  white-space: normal;
  box-shadow: 2px 0 4px #4a2d5710;
}
.factory-editor .table-wrap {
  margin: 18px 0;
}
.factory-material-options {
  margin: 18px 0;
}
.factory-material-options summary {
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 14px;
}
.factory-form input[readonly] {
  background: #f1edf4;
  color: #74657e;
}

.nav-group {
  margin: 4px 0;
  border-radius: 8px;
}
.nav-group > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 9px;
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
}
.nav-group > summary::-webkit-details-marker {
  display: none;
}
.nav-group > summary > span {
  width: 20px;
  flex-shrink: 0;
}
.nav-group > summary:after {
  content: '›';
  margin-left: auto;
  font-size: 22px;
}
.nav-group[open] > summary:after {
  content: '⌄';
}
.nav-group > div {
  padding-left: 12px;
  border-left: 2px solid var(--line);
  margin-left: 14px;
}
.nav-group button {
  font-size: 15px;
  padding: 10px 8px;
  line-height: 1.4;
}
.nav-group button > span {
  display: none;
}
.sidebar nav {
  flex-shrink: 0;
  overflow: visible;
}
.sidebar-bottom {
  padding-top: 14px;
}
.factory-sheet-intro {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin: 20px 0;
}
.factory-product-image {
  width: 145px;
  height: 145px;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf8fc;
}
.factory-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
}
.factory-sheet-intro p {
  line-height: 1.7;
  margin-top: 10px;
}
.factory-sheet-notes {
  white-space: pre-wrap;
  line-height: 1.7;
}
.factory-form .heading-actions {
  flex-wrap: wrap;
  margin: 18px 0;
}
.factory-form [hidden],
.factory-grid label[hidden] {
  display: none;
}
.factory-purchase-line {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
.factory-purchase-line > .factory-unit-cost {
  grid-column: 1/4;
}
.factory-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfbfd;
  color: var(--ink);
}
@media (max-width: 1000px) {
  .factory-purchase-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .factory-purchase-line > .factory-unit-cost {
    grid-column: auto;
  }
}
@media (max-width: 600px) {
  .factory-sheet-intro {
    flex-direction: column;
  }
  .factory-purchase-line {
    grid-template-columns: 1fr;
  }
}

.client-order-data {
  background: #f5f0f8;
  padding: 16px;
  border-radius: 12px;
}
.client-order-data p {
  margin: 8px 0;
}
.order-line {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(70px, 1fr) minmax(100px, 1fr) 32px;
  gap: 10px;
  align-items: end;
}
.line-subtotal {
  padding-bottom: 12px;
  font-weight: 600;
}
#order-summary {
  padding: 12px;
  background: #faf7f2;
  border-radius: 10px;
}
@media (max-width: 650px) {
  .order-line {
    grid-template-columns: minmax(0, 1fr) 75px 32px;
  }
  .line-subtotal {
    grid-column: 1/3;
    grid-row: 2;
  }
  .order-line button {
    grid-column: 3;
    grid-row: 1;
  }
}

#order-summary {
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
}
#order-summary p {
  margin: 4px 0;
}
.add-order-product {
  padding: 13px 20px;
  margin: 12px 0;
  box-shadow: 0 3px 8px #4a345c22;
}

.order-detail .modal-heading p {
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}
.order-detail-bottom {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding: 20px 24px;
}
.order-detail-counts {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}
.order-detail-counts > span {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
}
.order-detail-counts b {
  margin-left: 12px;
}
.order-detail-amounts p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0;
  font-size: 14px;
}
.order-detail-tax {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}
.order-detail-bottom .detail-notes {
  padding: 0;
  margin: 16px 0;
  white-space: pre-wrap;
}
.order-detail-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 19px;
}
.order-detail-total strong {
  font-size: 28px;
}
@media (max-width: 600px) {
  .order-detail .modal-heading p {
    font-size: 18px;
  }
  .order-detail-bottom {
    padding: 16px;
  }
  .order-detail-total strong {
    font-size: 24px;
  }
}

.order-brand-logo {
  display: block;
  width: 145px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 12px;
}
.order-detail .modal-heading,
.order-form-branded .modal-heading {
  background: #f8f3ed;
  border-bottom: 2px solid #c3a56b;
}
.order-detail .modal-heading h2,
.order-form-branded .modal-heading h2 {
  color: #66517f;
}
.order-form-branded .modal-heading > div {
  width: 100%;
}
.order-date-label {
  text-align: right;
  font-size: 11px !important;
  font-weight: 400 !important;
  color: var(--muted);
  margin: 0 0 8px !important;
}
.order-detail-bottom {
  background: #faf7fc;
  border-radius: 0 0 14px 14px;
}
.order-detail-total {
  color: #66517f;
  border-top: 2px solid #c3a56b;
}
#order-summary .order-detail-counts {
  margin: 6px 0 12px;
  gap: 20px;
}
#order-summary .order-detail-counts > span {
  background: #f7f2fa;
}

#modal.order-form-branded,
#modal.order-detail {
  width: min(960px, 94vw);
  max-width: 960px;
}
.order-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  color: #66517f;
  font-size: 11px;
  font-weight: 600;
}
.order-legal b {
  border: 1px solid #c3a56b;
  border-radius: 5px;
  font-size: 20px;
  padding: 3px 12px;
}
.order-page-count {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  padding: 8px 24px;
  margin: 0;
}

.order-legal {
  text-align: center;
}
.order-date-label {
  font-size: 16px !important;
}
.order-form-branded .modal-heading > div > p:not(.order-date-label),
.order-detail .modal-heading > div > p:not(.order-date-label) {
  font-size: 24px;
  font-weight: 600;
  color: #66517f;
}
.order-form-branded .modal-heading h2,
.order-detail .modal-heading h2 {
  font-size: 24px;
}
.modal-heading .client-order-data {
  padding: 12px 0;
  background: transparent;
  font-size: 14px;
}
.modal-heading .client-order-data > b {
  font-size: 22px;
}
.order-quantity-field {
  text-align: center;
  align-items: center;
}
.order-quantity-field input {
  width: 75px;
  text-align: center;
  margin: auto;
  font-size: 14px;
}
.order-price-box {
  background: #f7f2fa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  align-self: end;
}
.order-price-box small {
  display: block;
  font-size: 11px;
  margin-bottom: 6px;
}
.order-price-box .line-subtotal {
  padding: 0;
  display: block;
  font-size: 18px;
}
.product-search {
  margin-bottom: 8px;
  width: 100%;
}
.order-form-branded .order-line {
  grid-template-columns: minmax(0, 2fr) 90px minmax(140px, 1fr) 32px;
}
@media (max-width: 650px) {
  .order-form-branded .order-line {
    grid-template-columns: minmax(0, 1fr) 75px 32px;
  }
  .order-price-box {
    grid-column: 1/3;
  }
}

.order-form-branded .modal-heading > div,
.order-detail .modal-heading > div {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}
.order-form-branded .order-brand-logo,
.order-detail .order-brand-logo {
  order: 0;
  width: 190px;
  height: 95px;
  object-fit: contain;
  align-self: flex-start;
  margin: 0 0 12px;
}
.order-form-branded .order-date-label,
.order-detail .order-date-label {
  order: 0;
  position: absolute;
  top: 12px;
  right: 0;
  font-size: 13px !important;
  line-height: 1.4;
  white-space: nowrap;
  font-weight: 400 !important;
  margin: 0 !important;
}
.order-form-branded .order-legal,
.order-detail .order-legal {
  order: 1;
  align-self: center;
  margin: 0 0 16px;
  font-size: 11px;
  line-height: 1.4;
}
.order-form-branded .modal-heading h2,
.order-detail .modal-heading h2 {
  order: 2;
  font-size: 21px;
  margin: 0 0 8px;
}
.order-form-branded .modal-heading > div > p:not(.order-date-label),
.order-detail .modal-heading > div > p:not(.order-date-label) {
  order: 3;
  font-size: 22px !important;
  line-height: 1.4;
  margin: 0 0 10px;
}
.order-form-branded .modal-heading .client-order-data,
.order-detail .modal-heading .client-order-data {
  order: 4;
}
.order-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-price-box .line-unit-label {
  margin: 0;
  text-align: left;
  font-size: 10px;
}
.line-unit-price {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.order-price-box .line-subtotal {
  font-size: 18px;
  text-align: right;
}
.order-form-branded .order-line {
  grid-template-columns: minmax(0, 2fr) 90px minmax(180px, 1fr) 32px;
}
@media (max-width: 650px) {
  .order-form-branded .order-line {
    grid-template-columns: minmax(0, 1fr) 75px 32px;
  }
  .order-form-branded .order-brand-logo,
  .order-detail .order-brand-logo {
    width: 150px;
    height: 80px;
  }
  .order-form-branded .order-date-label,
  .order-detail .order-date-label {
    font-size: 11px !important;
  }
}

.order-form-branded .order-legal,
.order-detail .order-legal {
  font-size: 9px;
  line-height: 1.3;
  margin-top: -14px;
  margin-bottom: 10px;
  gap: 3px;
}
.order-form-branded .order-legal b,
.order-detail .order-legal b {
  font-size: 14px;
  padding: 2px 8px;
}
.order-form-branded .order-date-label,
.order-detail .order-date-label {
  font-size: 18px !important;
  top: 12px;
}
.order-form-branded .modal-heading > div > p:not(.order-date-label),
.order-detail .modal-heading > div > p:not(.order-date-label) {
  font-size: 11px !important;
  font-weight: 500;
  margin-bottom: 8px;
}
.order-price-box {
  background: #f8f3ed;
  border-color: #dbc89e;
  align-self: end;
  min-height: 48px;
  flex-wrap: nowrap;
}
.order-price-box .line-unit-label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin: 0;
  font-size: 11px;
}
.order-price-box .line-unit-price {
  display: inline;
  margin: 0;
  font-size: 12px;
}
.order-price-box .line-subtotal {
  white-space: nowrap;
  font-size: 16px;
}
.order-form-branded .order-line select,
.order-form-branded .order-quantity-field input {
  background: #f8f3ed;
  border-color: #dbc89e;
}
.order-form-branded .order-line {
  grid-template-columns: minmax(0, 2fr) 80px minmax(235px, 1fr) 32px;
  align-items: end;
}
@media (max-width: 750px) {
  .order-form-branded .order-line {
    grid-template-columns: minmax(0, 1fr) 75px 32px;
  }
  .order-price-box {
    grid-column: 1/3;
  }
  .order-form-branded .order-date-label,
  .order-detail .order-date-label {
    font-size: 15px !important;
  }
}
.order-form-branded .order-line {
  min-width: 0;
}
.order-form-branded .order-line > label {
  min-width: 0;
}
.order-product-field select,
.order-product-field .product-search {
  width: 100%;
  min-width: 0;
}
.order-price-box {
  min-width: 0;
}
@media (max-width: 750px) {
  .order-form-branded .order-price-box {
    grid-row: 2;
    grid-column: 1/3;
  }
  .order-form-branded .order-line > button {
    grid-column: 3;
    grid-row: 1;
  }
}

.order-form-branded .modal-heading h2,
.order-detail .modal-heading h2 {
  position: absolute;
  top: 14px;
  left: 195px;
  right: 155px;
  text-align: center;
  font-size: 19px;
  line-height: 1.3;
  margin: 0;
}
.order-form-branded .modal-heading .client-order-data,
.order-detail .modal-heading .client-order-data {
  order: 2;
  margin-top: 6px;
}
.order-form-branded .modal-heading > div > p:not(.order-date-label),
.order-detail .modal-heading > div > p:not(.order-date-label) {
  order: 3;
  font-size: 15px !important;
  margin: 10px 0 0;
}
.order-form-branded .order-date-label,
.order-detail .order-date-label {
  font-size: 16px !important;
}
@media (max-width: 650px) {
  .order-form-branded .order-brand-logo,
  .order-detail .order-brand-logo {
    width: 125px;
    height: 75px;
  }
  .order-form-branded .modal-heading h2,
  .order-detail .modal-heading h2 {
    left: 130px;
    right: 140px;
    top: 14px;
    font-size: 15px;
  }
  .order-form-branded .order-date-label,
  .order-detail .order-date-label {
    font-size: 12px !important;
  }
}
@media (max-width: 450px) {
  .order-form-branded .modal-heading h2,
  .order-detail .modal-heading h2 {
    left: 110px;
    right: 112px;
    font-size: 13px;
  }
  .order-form-branded .order-brand-logo,
  .order-detail .order-brand-logo {
    width: 105px;
  }
  .order-form-branded .order-date-label,
  .order-detail .order-date-label {
    font-size: 10px !important;
  }
}

.order-form-branded .order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 65px 95px 24px;
  gap: 8px;
  align-items: end;
}
.order-form-branded .order-price-box {
  grid-column: 3;
  grid-row: 1;
  min-height: 46px;
  padding: 10px 8px;
  justify-content: center;
  align-items: center;
}
.order-form-branded .order-line > button {
  grid-column: 4;
  grid-row: 1;
  align-self: end;
  margin-bottom: 8px;
}
.order-form-branded .order-quantity-field {
  grid-column: 2;
  grid-row: 1;
}
.order-form-branded .order-quantity-field input {
  width: 100%;
  height: 46px;
  padding: 8px;
}
.order-form-branded .order-product-field {
  grid-column: 1;
  grid-row: 1;
}
.order-form-branded .order-product-field select {
  height: 46px;
  padding: 8px;
  font-size: 13px;
}
.order-form-branded .order-price-box .line-subtotal {
  font-size: 14px;
}
.order-form-branded .order-line .product-search {
  max-width: 100%;
  font-size: 12px;
}
@media (max-width: 450px) {
  .order-form-branded .order-line {
    grid-template-columns: minmax(0, 1fr) 48px 78px 20px;
    gap: 5px;
  }
  .order-form-branded .order-price-box .line-subtotal {
    font-size: 12px;
  }
  .order-form-branded .order-product-field select {
    font-size: 12px;
  }
}
.order-form-branded .order-line > label {
  margin: 0 !important;
  padding-bottom: 0 !important;
}
.order-form-branded .order-price-box {
  height: 46px;
  min-height: 46px;
  box-sizing: border-box;
  margin: 0 !important;
}
.order-form-branded .order-line > button {
  margin-bottom: 0;
  height: 46px;
}
.order-form-branded .order-product-field select,
.order-form-branded .order-quantity-field input {
  margin-bottom: 0 !important;
}

.order-form-branded .order-line {
  grid-template-columns: minmax(0, 1fr) 65px 140px 24px;
}
.order-form-branded .product-search[hidden] {
  display: none;
}
.order-form-branded .order-price-box .line-subtotal {
  font-size: 16px;
}
@media (max-width: 450px) {
  .order-form-branded .order-line {
    grid-template-columns: minmax(0, 1fr) 48px 108px 20px;
    gap: 5px;
  }
  .order-form-branded .order-price-box .line-subtotal {
    font-size: 14px;
  }
}

.order-lines-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 65px 140px 24px;
  gap: 8px;
  align-items: center;
  background: #f8f3ed;
  border: 1px solid #dbc89e;
  border-radius: 10px;
  padding: 10px 0;
  margin: 14px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #66517f;
}
.order-lines-heading > span:first-child {
  padding-left: 12px;
}
.order-lines-heading > span:nth-child(2),
.order-lines-heading > span:nth-child(3) {
  text-align: center;
}
.order-form-branded .order-line {
  margin-bottom: 10px;
}
.order-form-branded .order-line > label {
  display: block;
}
.order-form-branded .order-quantity-field input {
  display: block;
}
@media (max-width: 450px) {
  .order-lines-heading {
    grid-template-columns: minmax(0, 1fr) 48px 108px 20px;
    gap: 5px;
    font-size: 11px;
  }
}
.order-lines-heading {
  background: #eee6f6;
  border-color: #d9c9e8;
  color: #66517f;
}

.order-form-branded .modal-heading > div,
.order-detail .modal-heading > div {
  display: grid;
  grid-template-columns: 170px minmax(120px, 1fr) minmax(180px, 1.3fr);
  grid-template-rows: auto auto auto;
  column-gap: 16px;
  align-items: start;
}
.order-form-branded .order-brand-logo,
.order-detail .order-brand-logo {
  grid-column: 1;
  grid-row: 1/4;
  width: 160px;
  height: 90px;
  margin: 0;
}
.order-form-branded .modal-heading h2,
.order-detail .modal-heading h2 {
  position: static;
  grid-column: 2;
  grid-row: 1;
  font-size: 18px;
  text-align: center;
  margin: 0;
}
.order-form-branded .order-legal,
.order-detail .order-legal {
  grid-column: 2;
  grid-row: 2/4;
  align-self: start;
  justify-self: center;
  margin: 4px 0 0;
}
.order-form-branded .order-date-label,
.order-detail .order-date-label {
  position: static;
  grid-column: 3;
  grid-row: 1;
  text-align: right;
}
.order-form-branded .modal-heading .client-order-data,
.order-detail .modal-heading .client-order-data {
  grid-column: 3;
  grid-row: 2;
  text-align: right;
  padding: 6px 0;
  margin: 0;
}
.modal-heading .client-order-data > b {
  font-size: 18px;
}
.modal-heading .client-order-data p {
  font-size: 12px;
  margin: 4px 0;
}
.order-form-branded .modal-heading > div > p:not(.order-date-label),
.order-detail .modal-heading > div > p:not(.order-date-label) {
  grid-column: 3;
  grid-row: 3;
  text-align: right;
  font-size: 13px !important;
  margin: 4px 0 0;
}
.order-form-branded .modal-heading,
.order-detail .modal-heading {
  padding-bottom: 18px;
}
.order-form-branded .order-line {
  gap: 0;
  margin: 0;
  border-bottom: 1px solid #ddd4e5;
}
.order-form-branded .order-line > label,
.order-form-branded .order-price-box {
  border-right: 1px solid #ddd4e5;
  background: white;
  border-radius: 0;
  height: 48px;
}
.order-form-branded .order-line select,
.order-form-branded .order-quantity-field input {
  background: white;
  border: 0;
  border-radius: 0;
  height: 48px;
}
.order-form-branded .order-price-box {
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  height: 48px;
  padding-right: 12px;
  justify-content: flex-end;
}
.order-form-branded .order-line > button {
  background: white;
  border: 0;
  margin: 0;
  height: 48px;
}
.order-lines-heading {
  gap: 0;
  margin-bottom: 0;
}
.order-lines-heading > span {
  border-right: 1px solid #ddd4e5;
}
.order-lines-heading > span:last-child {
  border: 0;
}
.draft-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 650px) {
  .order-form-branded .modal-heading > div,
  .order-detail .modal-heading > div {
    grid-template-columns: 100px minmax(95px, 1fr) minmax(130px, 1.2fr);
    gap: 8px;
  }
  .order-form-branded .order-brand-logo,
  .order-detail .order-brand-logo {
    width: 100px;
    height: 70px;
  }
  .order-form-branded .modal-heading h2,
  .order-detail .modal-heading h2 {
    font-size: 14px;
  }
  .modal-heading .client-order-data > b {
    font-size: 15px;
  }
  .order-form-branded .order-date-label,
  .order-detail .order-date-label {
    font-size: 11px !important;
  }
}

.order-form-branded .order-line {
  border-bottom: 2px solid #d2c5dc;
}
.order-form-branded .order-line > label,
.order-form-branded .order-price-box {
  border-right: 2px solid #d2c5dc;
}
.order-lines-heading > span {
  border-right: 2px solid #d2c5dc;
}
.order-form-branded .modal-heading .client-order-data,
.order-detail .modal-heading .client-order-data {
  grid-column: 1/3;
  grid-row: 3;
  text-align: left;
  padding-top: 12px;
}
.order-form-branded .order-brand-logo,
.order-detail .order-brand-logo {
  grid-row: 1/3;
}
.order-form-branded .order-legal,
.order-detail .order-legal {
  grid-row: 2;
}
.order-form-branded .modal-heading > div > p:not(.order-date-label),
.order-detail .modal-heading > div > p:not(.order-date-label) {
  grid-column: 3;
  grid-row: 2;
  font-size: 14px !important;
  margin-top: 8px;
}
.order-form-branded .modal-heading > div,
.order-detail .modal-heading > div {
  grid-template-rows: auto auto auto;
}

.order-form-branded .order-line {
  border-bottom: 1px solid #ddd4e5;
}
.order-form-branded .order-line > label,
.order-form-branded .order-price-box,
.order-lines-heading > span {
  border-right: 1px solid #ddd4e5;
}
.order-lines-heading > span:last-child {
  border-right: 0;
}

#modal.order-document-modal {
  width: min(960px, 94vw);
  max-width: 960px;
}
.order-document-modal > .modal-heading {
  padding: 0;
  border: 0;
  position: relative;
}
.order-document-modal > .modal-heading > div {
  display: none;
}
.order-document-modal #close-modal {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
}

.order-form-branded .line-stock-error {
  grid-column: 1/-1;
  margin: 0;
  padding: 9px 12px;
  color: #963f43;
  background: #fff3f1;
  font-size: 12px;
  line-height: 1.5;
}
.line-stock-error[hidden] {
  display: none;
}
.order-form-branded .stock-invalid input[type='number'] {
  color: #963f43;
  background: #fff3f1;
}
.order-form-branded .stock-invalid {
  border-bottom-color: #dfa5a5;
}

#modal.preparation-modal {
  width: min(1100px, 96vw);
  max-width: 1100px;
}
.prep-counts {
  font-size: 20px;
  padding: 15px 24px;
}
.prep-qty {
  font-size: 24px;
}
.prep-check {
  width: 28px;
  height: 28px;
  accent-color: #8876a7;
}
.prep-missing {
  color: #963f43;
  font-size: 13px;
}
.preparation-modal details input {
  width: 100%;
  padding: 8px;
}
.preparation-modal .modal-footer {
  flex-wrap: wrap;
}
.preparation-modal > p {
  padding: 0 24px;
}

.prep-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  font-size: 14px;
  margin-top: 12px;
}
.prep-counts span {
  padding: 10px 12px;
  background: #f5effa;
  border-radius: 10px;
}

.order-promotion {
  display: flex;
  gap: 6px;
  padding: 5px;
}
.order-form-branded .order-line > label {
  height: auto;
  min-height: 48px;
}
.order-promotion select {
  max-width: 150px;
  font-size: 11px !important;
  height: 32px !important;
}
.order-promotion input {
  min-width: 0;
  width: 100%;
  font-size: 11px;
}
.preparation-modal table {
  table-layout: fixed;
  width: 100%;
  min-width: 0 !important;
}
.preparation-modal th:first-child {
  width: 35%;
}
.preparation-modal th:nth-child(2) {
  width: 12%;
}
.preparation-modal th:nth-child(3) {
  width: 12%;
}
.preparation-modal th:nth-child(4) {
  width: 12%;
}
.preparation-modal td,
.preparation-modal th {
  padding: 9px 6px;
  overflow-wrap: anywhere;
}
.preparation-modal td input:not([type='checkbox']) {
  width: 100%;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.preparation-modal .table-wrap {
  overflow-x: visible;
}
#modal.preparation-modal {
  width: 96vw;
  max-width: 1250px;
}

.return-panel {
  padding: 24px;
  margin-bottom: 20px;
}
.return-panel label {
  display: block;
  margin: 12px 0;
}
.return-panel input,
.return-panel select {
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.return-panel td input {
  width: 100%;
  min-width: 65px;
}
.order-promotion {
  background: #faf7fc;
}

.factory-sheet-intro .factory-product-image {
  width: 280px;
  height: 280px;
}
.factory-sheet-intro > div {
  flex: 1;
}
.recipe-options {
  margin: 16px 0;
}
.recipe-options summary {
  cursor: pointer;
  color: #66517f;
}
.factory-line:has(.recipe-material-photo) {
  grid-template-columns: 75px minmax(160px, 2fr) minmax(85px, 1fr) minmax(150px, 1fr) auto;
}
.recipe-material-photo img,
#material-photo-preview img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 8px;
}
.recipe-material-photo span {
  font-size: 11px;
  color: #8a7b92;
}
.recipe-material-photo {
  align-self: center;
}
#material-photo-preview img {
  width: 100px;
  height: 100px;
}
@media (max-width: 650px) {
  .factory-sheet-intro .factory-product-image {
    width: 160px;
    height: 200px;
  }
  .factory-line:has(.recipe-material-photo) {
    grid-template-columns: 65px 1fr;
  }
  .factory-line-subtotal {
    grid-column: 1/-1;
  }
}

.material-photo-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}
.material-photo-remove {
  color: #975b61 !important;
  border-color: #d8b9bd !important;
  background: #fff !important;
}
.material-compact {
  max-width: 210px;
}
.material-currency {
  display: flex;
  align-items: center;
  border: 1px solid #d8cfe0;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.material-currency > span {
  padding-left: 12px;
  color: #776485;
}
.material-currency input {
  border: 0 !important;
  min-width: 0;
  width: 100%;
}
.material-code {
  align-self: center;
}
.material-code summary {
  cursor: pointer;
  color: #776485;
}

.material-inventory .table-wrap {
  overflow: visible;
}
.material-inventory table {
  table-layout: fixed;
  width: 100%;
  min-width: 0 !important;
}
.material-inventory th,
.material-inventory td {
  white-space: normal !important;
  overflow-wrap: anywhere;
  padding: 10px 6px;
  font-size: 12px;
}
.material-inventory th:nth-child(2) {
  width: 16%;
}
.material-inventory th:nth-child(9) {
  width: 15%;
}
.material-inventory th:last-child {
  width: 15%;
}
.material-inventory td button {
  padding: 6px 8px;
  font-size: 11px;
  margin: 2px;
  white-space: normal;
}

.cost-search-tools {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}
.cost-search-tools label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
}
.cost-search-main {
  flex: 1;
  min-width: 240px;
}
.cost-search-tools input,
.cost-search-tools select {
  width: 100%;
  padding: 12px;
  border: 1px solid #cfc1db;
  border-radius: 9px;
  background: white;
  font-size: 15px;
}
.cost-search-tools button {
  margin-bottom: 1px;
}
.cost-inventory table th:first-child {
  width: 25%;
}
.cost-inventory table th:nth-child(2) {
  width: 9%;
}
.cost-inventory td:first-child {
  overflow-wrap: anywhere;
}
.cost-inventory td:first-child {
  white-space: normal;
}
.cost-inventory td:nth-child(2) {
  overflow-wrap: anywhere;
}

.review-tag {
  display: block;
  color: #725483;
  background: #f1eaf7;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  margin-top: 5px;
}
.review-confirm {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  padding: 12px;
  background: #f1eaf7;
  border-radius: 8px;
}
.review-confirm input {
  width: 18px !important;
  flex: 0 0 18px;
}
.review-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}
.review-filter select {
  padding: 8px;
  border: 1px solid #d8cfe0;
  border-radius: 8px;
}

.cost-inventory .cost-search-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: end;
  gap: 16px;
}
.cost-inventory .cost-search-main {
  min-width: 0;
}
.cost-inventory .cost-search-tools .review-filter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  margin: 0;
}
.cost-inventory .cost-search-tools .review-filter select {
  padding: 12px;
  font-size: 15px;
}
@media (max-width: 600px) {
  .cost-inventory .cost-search-tools {
    grid-template-columns: 1fr;
  }
}

.material-inventory .cost-search-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.material-inventory .cost-search-tools input,
.material-inventory .cost-search-tools select {
  width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .material-inventory .cost-search-tools {
    grid-template-columns: 1fr;
  }
}

.material-reviewed-mark {
  display: inline-block;
  color: #43845b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: baseline;
  margin-left: 3px;
  white-space: nowrap;
}

.cost-inventory .cost-search-tools {
  grid-template-columns: minmax(0, 420px) minmax(190px, 240px);
  justify-content: start;
}
.cost-inventory .cost-search-tools input,
.cost-inventory .cost-search-tools select {
  box-sizing: border-box;
}
.cost-pagination {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 16px;
}
.cost-pagination > span:first-child {
  margin-right: 10px;
  font-size: 13px;
  color: #776485;
}
.cost-pagination button {
  min-width: 34px;
  padding: 7px 10px;
}
.cost-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}
@media (max-width: 600px) {
  .cost-inventory .cost-search-tools {
    grid-template-columns: 1fr;
  }
}

.cost-pagination {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 9px;
  padding-top: 12px;
}
.cost-pagination > span {
  font-size: 12px;
  color: #776485;
  white-space: nowrap;
}
.cost-pagination button {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
.cost-pagination > span:first-child {
  margin-right: 0;
}

.cost-inventory .cost-search-tools {
  grid-template-columns: minmax(0, 420px) minmax(190px, 240px) auto;
  align-items: end;
  margin-bottom: 16px;
}
.cost-inventory .cost-search-tools label {
  margin: 0;
  gap: 7px;
  line-height: 20px;
}
.cost-inventory .cost-search-tools input,
.cost-inventory .cost-search-tools select {
  height: 46px;
  margin: 0;
}
.cost-import-link {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 46px;
  margin: 0;
  white-space: nowrap;
}
.cost-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
}
.cost-list-footer .footnote {
  margin: 0;
}
.cost-list-footer .cost-pagination {
  padding-top: 0;
  flex-shrink: 0;
}
@media (max-width: 1000px) {
  .cost-inventory .cost-search-tools {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto;
  }
  .cost-import-link {
    font-size: 11px;
    padding: 8px;
  }
}
@media (max-width: 700px) {
  .cost-inventory .cost-search-tools {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 1fr);
  }
  .cost-import-link {
    grid-column: 1/-1;
  }
  .cost-list-footer {
    flex-wrap: wrap;
  }
  .cost-list-footer .cost-pagination {
    margin-left: auto;
  }
}

.list-page-hidden {
  display: none !important;
}
.list-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  font-size: 12px;
  color: #776485;
}
.list-pagination nav {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.list-pagination button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
.list-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}
@media (max-width: 520px) {
  .list-pagination {
    flex-wrap: wrap;
  }
  .list-pagination nav {
    margin-left: auto;
  }
}
@media print {
  .list-page-hidden {
    display: revert !important;
  }
  .list-pagination {
    display: none !important;
  }
}

.factory-grid.material-form-grid {
  grid-template-columns: minmax(220px, 300px) minmax(220px, 260px) minmax(120px, 180px);
  gap: 0 18px;
  justify-content: start;
  align-items: start;
}
.material-form-grid .material-field-name {
  grid-area: 1/1;
}
.material-form-grid .material-field-category {
  grid-area: 1/2;
}
.material-form-grid .material-field-sku {
  grid-area: 1/3;
}
.material-form-grid .material-field-unit {
  grid-area: 2/1;
  max-width: 240px;
}
.material-form-grid .material-field-origin {
  grid-area: 2/2;
  max-width: 260px;
}
.material-form-grid .material-field-import_price {
  grid-area: 3/1;
  max-width: 210px;
}
.material-form-grid .material-field-import_tax {
  grid-area: 3/2;
  max-width: 210px;
}
.material-form-grid .material-field-current_stock {
  grid-area: 3/3;
  max-width: 140px;
}
.material-form-grid .material-field-price_mode {
  grid-area: 3/1;
}
.material-form-grid .material-field-unit_cost,
.material-form-grid .material-field-total_cost {
  grid-area: 3/2;
}
.material-form-grid input[name='import_tax'][readonly] {
  background: #fcfcfa;
  color: var(--ink);
}
.material-form-grid label {
  min-width: 0;
}
.material-form-grid input,
.material-form-grid select {
  box-sizing: border-box;
}
@media (max-width: 850px) {
  .factory-grid.material-form-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .material-form-grid .material-field-name {
    grid-area: 1/1;
  }
  .material-form-grid .material-field-category {
    grid-area: 1/2;
  }
  .material-form-grid .material-field-sku {
    grid-area: 2/1;
  }
  .material-form-grid .material-field-unit {
    grid-area: 2/2;
  }
  .material-form-grid .material-field-origin {
    grid-area: 3/1;
  }
  .material-form-grid .material-field-import_price,
  .material-form-grid .material-field-price_mode {
    grid-area: 4/1;
  }
  .material-form-grid .material-field-import_tax,
  .material-form-grid .material-field-unit_cost,
  .material-form-grid .material-field-total_cost {
    grid-area: 4/2;
  }
  .material-form-grid .material-field-current_stock {
    grid-area: 5/1;
  }
}
@media (max-width: 520px) {
  .factory-grid.material-form-grid {
    grid-template-columns: 1fr;
  }
  .material-form-grid > label {
    grid-area: auto !important;
    max-width: 100% !important;
  }
}

.factory-sheet-intro .recipe-public-price {
  max-width: 200px;
  margin-top: 18px;
  margin-bottom: 0;
}
.recipe-public-price .material-currency input {
  width: 100%;
  box-sizing: border-box;
}
.recipe-public-price .material-currency {
  background: #fcfcfa;
}

.money-input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe3d5;
  border-radius: 6px;
  background: #fcfcfa;
  box-sizing: border-box;
}
.money-input-symbol {
  padding-left: 12px;
  font-size: 13px;
  font-weight: 400;
  color: #74657e;
  flex-shrink: 0;
}
.money-input input {
  border: 0 !important;
  background: transparent !important;
  min-width: 0;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}
.money-input:focus-within {
  outline: 2px solid #b5a2c6;
  outline-offset: 1px;
}
.client-overview h3 {
  margin-top: 20px;
}
.client-overview p {
  line-height: 1.6;
}

/* Compact product composition header and live financial summary. */
.material-form-grid .material-field-name {
  grid-area: 1/1/2/3;
}
.material-form-grid .material-field-category {
  grid-area: 1/3;
}
.material-form-grid .material-field-sku {
  grid-area: 2/3;
}
@media (max-width: 850px) {
  .material-form-grid .material-field-name {
    grid-area: 1/1/2/3;
  }
  .material-form-grid .material-field-category {
    grid-area: 2/1;
  }
  .material-form-grid .material-field-sku {
    grid-area: 2/2;
  }
  .material-form-grid .material-field-unit {
    grid-area: 3/1;
  }
  .material-form-grid .material-field-origin {
    grid-area: 3/2;
  }
}
.factory-editor:has(.recipe-title-banner) > h2 {
  font-size: 26px;
  margin-bottom: 12px;
}
.recipe-title-banner {
  background: #eee7f6;
  border-radius: 9px;
  padding: 12px 16px;
  color: #58416e;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.recipe-title-banner strong {
  font-size: 21px;
}
.recipe-title-banner small {
  font-size: 13px;
}
.factory-editor:has(.recipe-title-banner) .factory-sheet-intro {
  margin: 14px 0;
  gap: 20px;
}
.recipe-price-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.recipe-price-summary label {
  font-size: 13px;
  min-width: 0;
  margin: 0 !important;
  max-width: none !important;
}
.recipe-price-summary output {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px;
  background: #f3eef8;
  border: 1px solid #ded4e9;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  box-sizing: border-box;
  margin-top: 6px;
}
.factory-calculation:empty {
  display: none;
}
@media (max-width: 1050px) {
  .recipe-price-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.marketing-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.marketing-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.marketing-filters input,
.marketing-filters select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.marketing-editor {
  margin-top: 20px;
}
.marketing-editor textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.marketing-editor details {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.marketing-editor summary {
  cursor: pointer;
  font-weight: 600;
}
.marketing-picker {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.marketing-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 0;
}
.marketing-picker input {
  width: auto;
}
.marketing-picker label[hidden] {
  display: none;
}
.marketing-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin: 16px 0;
}
.marketing-calendar > div {
  min-height: 75px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
}
.marketing-calendar button {
  display: block;
  font-size: 11px;
  padding: 5px;
  max-width: 100%;
  white-space: normal;
  margin: 5px 0;
}
.marketing-calendar small {
  display: block;
}
.marketing-month {
  max-width: 220px;
  margin-top: 20px;
}
#mkt-image-preview img {
  max-width: 250px;
  max-height: 180px;
  object-fit: contain;
  margin: 12px 0;
}
@media (max-width: 1050px) {
  .marketing-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .marketing-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .marketing-calendar > div {
    padding: 2px;
    min-height: 60px;
  }
  .marketing-calendar button {
    font-size: 9px;
  }
}

.marketing-list-panel {
  padding: 18px;
}
.marketing-list-panel > .heading-actions {
  margin-bottom: 16px;
}
@media (max-width: 1350px) {
  .marketing-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.marketing-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.marketing-summary article {
  padding: 12px;
  background: #f1ecf7;
  border-radius: 8px;
}
.marketing-summary small,
.marketing-summary strong {
  display: block;
}
.marketing-summary strong {
  margin-top: 8px;
  font-size: 18px;
}
@media (max-width: 650px) {
  .marketing-summary {
    grid-template-columns: 1fr 1fr;
  }
}

.mkt-form-block {
  padding: 20px;
  margin: 18px 0;
  border: 1px solid #ded4e9;
  border-radius: 12px;
  background: #fff;
}
.mkt-form-block > h3 {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9e2ef;
  color: #69517f;
}
.mkt-channels {
  grid-column: 1/-1;
  border: 0;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.mkt-channels legend {
  font-size: 14px;
  margin-bottom: 10px;
}
.mkt-channels label {
  display: flex;
  gap: 7px;
  align-items: center;
  border: 1px solid #ded4e9;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0;
}
.mkt-channels input {
  width: auto;
}
.mkt-channels label:has(input:checked) {
  background: #eee7f6;
  border-color: #9883b2;
}
.mkt-date-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin: 12px 0;
}
.mkt-date-row input {
  width: 100%;
  box-sizing: border-box;
}
.mkt-date-row output {
  display: flex;
  align-items: center;
  padding: 12px;
  min-height: 48px;
  box-sizing: border-box;
  background: #eee7f6;
  border-radius: 8px;
}
@media (max-width: 550px) {
  .mkt-form-block {
    padding: 12px;
  }
  .mkt-date-row {
    gap: 6px;
  }
  .mkt-date-row input {
    font-size: 12px;
    padding: 8px;
  }
}
.mkt-channels label {
  flex-direction: row;
  align-items: center;
}
.mkt-channels input[type='checkbox'] {
  margin: 0;
  width: auto;
  min-height: 0;
}

.mkt-publication-links {
  grid-column: 1/-1;
  background: #f7f4fb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.mkt-publication-links h4 {
  margin: 0 0 8px;
}
.mkt-publication-links [hidden] {
  display: none;
}
.mkt-store-measurement {
  background: #faf8f1;
  border: 1px solid #e6dfc9 !important;
  border-radius: 10px;
  padding: 18px !important;
  margin: 20px 0;
}
.mkt-store-measurement summary {
  color: #776344;
}
.mkt-store-measurement p {
  line-height: 1.6;
}

#marketing-form [name='title'] {
  font-size: 24px;
  font-weight: 700;
}
.mkt-channel-details {
  grid-column: 1/-1;
}
.mkt-channel-card {
  padding: 16px;
  margin: 12px 0;
  background: #faf8fd;
  border: 1px solid #ded4e9;
  border-radius: 10px;
}
#mkt-channel-total {
  display: block;
  font-weight: 700;
  padding: 12px;
  background: #eee7f6;
  border-radius: 8px;
}
.mkt-channel-card h4 {
  margin: 0 0 14px;
}

.fair-list,
.fair-editor {
  padding: 20px;
}
.fair-filter {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}
.fair-filter input {
  width: 100%;
  box-sizing: border-box;
}
.fair-editor {
  margin-top: 20px;
}
.fair-editor textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.fair-editor [hidden] {
  display: none !important;
}
.fair-goods-row {
  padding: 16px;
  border: 1px solid #ded4e9;
  border-radius: 10px;
  margin: 16px 0;
  background: #fbf9fd;
}
.fair-row-heading {
  display: flex;
  gap: 16px;
  align-items: center;
}
.fair-row-heading label {
  flex: 1;
}
.fair-goods-row .factory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fair-campaign-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
}
.fair-editor [name='title'] {
  font-weight: 700;
  font-size: 24px;
}
.fair-editor input,
.fair-editor select {
  box-sizing: border-box;
  max-width: 100%;
}
@media (max-width: 600px) {
  .fair-filter {
    grid-template-columns: 1fr;
  }
  .fair-goods-row .factory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fair-campaign-row {
    grid-template-columns: 1fr;
  }
  .fair-list,
  .fair-editor {
    padding: 12px;
  }
}

.fair-purchase-row {
  padding: 16px;
  margin: 16px 0;
  border: 1px solid #ded4e9;
  background: #faf8fd;
  border-radius: 10px;
}
.fair-purchase-row .fair-row-heading {
  justify-content: space-between;
}
.fair-purchase-row h4 {
  margin: 0;
}
.fair-purchase-row .factory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 650px) {
  .fair-purchase-row .factory-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.fair-editor-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.fair-editor-heading h2 {
  margin: 0;
}
.fair-export-actions,
.fair-row-exports {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.fair-export-actions a {
  text-decoration: none;
  white-space: nowrap;
}
.fair-list > .heading-actions {
  margin: 14px 0;
}
.fair-row-exports a {
  text-decoration: none;
}

.kits-list,
.kit-editor {
  padding: 20px;
}
.kits-list > label {
  max-width: 520px;
}
.kit-editor {
  margin-top: 20px;
}
.kit-intro {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  margin: 18px 0;
}
.kit-intro [name='name'] {
  font-weight: 700;
  font-size: 22px;
}
.kit-intro [name='sku'] {
  max-width: 240px;
}
#kit-photo-preview {
  width: 280px;
  height: 280px;
  background: #f5f0f9;
  border: 1px solid #ded4e9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#kit-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.kit-editor textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.kit-editor [hidden] {
  display: none !important;
}
.kit-component {
  display: grid;
  grid-template-columns: 65px minmax(150px, 2fr) 100px minmax(130px, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.kit-component input {
  width: 100%;
  box-sizing: border-box;
}
.kit-material-photo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.kit-material-photo span {
  font-size: 12px;
  color: #8a7b92;
}
.kit-line-cost {
  font-size: 14px;
}
.kit-extra {
  margin: 16px 0;
}
.kit-extra label {
  max-width: 240px;
  margin-top: 12px;
}
.kit-editor .heading-actions {
  flex-wrap: wrap;
  margin: 14px 0;
}
.kit-editor .recipe-price-summary output {
  overflow-wrap: anywhere;
}
@media (max-width: 950px) {
  .kit-intro {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  #kit-photo-preview {
    width: 180px;
    height: 220px;
  }
  .kit-component {
    grid-template-columns: 55px minmax(150px, 1fr) 90px;
  }
  .kit-line-cost {
    grid-column: 2/3;
  }
}
@media (max-width: 600px) {
  .kit-intro {
    grid-template-columns: 1fr;
  }
  .kit-component {
    grid-template-columns: 55px minmax(0, 1fr);
  }
  .kit-component label:has([name='quantity']) {
    grid-column: 2;
  }
  .kits-list,
  .kit-editor {
    padding: 12px;
  }
}

.kit-retail-reference {
  margin-top: 14px;
  padding: 12px;
  background: #f3eef8;
  border-radius: 8px;
}
.kit-retail-reference span,
.kit-retail-reference strong,
.kit-retail-reference small {
  display: block;
}
.kit-retail-reference strong {
  font-size: 20px;
  margin: 6px 0;
}
.kit-component {
  grid-template-columns: 50px minmax(140px, 2fr) 75px 125px minmax(105px, 1fr) auto;
}
.kit-line-cost {
  grid-column: 2/6;
  margin: 0;
  color: #8a7b92;
  font-size: 12px;
}
.kit-component > [data-kit-remove] {
  grid-column: 6;
  grid-row: 1;
}
.kit-line-sale {
  font-size: 14px;
}
@media (max-width: 1050px) {
  .kit-component {
    grid-template-columns: 50px minmax(140px, 1fr) 80px 130px;
  }
  .kit-line-sale {
    grid-column: 2/4;
  }
  .kit-line-cost {
    grid-column: 2/4;
  }
  .kit-component > [data-kit-remove] {
    grid-column: 4;
    grid-row: 2;
  }
}
@media (max-width: 650px) {
  .kit-component {
    grid-template-columns: 45px minmax(0, 1fr);
  }
  .kit-component label,
  .kit-line-sale,
  .kit-line-cost {
    grid-column: 2;
  }
  .kit-component > [data-kit-remove] {
    grid-column: 2;
    grid-row: auto;
  }
}

/* Right-hand workspace uses the brand's lilacs; the sidebar retains its cream palette. */
.main {
  background: #f1ebf8;
  --paper: #f6f1fb;
  --line: #cbb9dc;
  --muted: #796687;
}
.main .topbar {
  background: #eee5f7;
  border-color: #cbb9dc;
}
.main .panel,
.main .stat {
  background: #fff;
  border-color: #d5c6e3;
}
.main .welcome-strip,
.main .store-hero {
  background: linear-gradient(110deg, #e7dcf2, #f4eefb);
  border-color: #cbb9dc;
}
.main .product-icon,
.main .product-art,
.main .art-1,
.main .art-4,
.main .catalog-reference span {
  background: #eee5f7;
  color: #785a92;
}
.main .pill.warning {
  background: #e9ddf4;
  color: #654379;
}
.main .mkt-store-measurement {
  background: #f1e9f8;
  border-color: #cbb9dc !important;
}
.main .mkt-store-measurement summary {
  color: #705083;
}
.main-footer {
  background: #eee5f7;
  border-top-color: #cbb9dc;
}
.main .stock-amount,
.main .stat i {
  color: #785a92;
}
#content table th {
  background: #e8dcf3;
  color: #543763;
  border-bottom: 2px solid #ad94c2;
}
#content table td {
  border-bottom: 1px solid #baa3ce;
}
#content table tbody tr:nth-child(even) > td {
  background: #faf7fe;
}
#content table tbody tr:hover > td {
  background: #f0e7f9;
}
#content .table-wrap {
  border-color: #cbb9dc;
}
#content .factory-line,
#content .kit-component {
  border-bottom-color: #baa3ce;
}
.kit-name-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 14px;
  align-items: end;
}
.kit-name-code .kit-code-small {
  font-size: 12px;
}
.kit-name-code .kit-code-small input {
  font-size: 13px;
}
.kit-financial-panels {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 14px;
  margin: 16px 0;
}
.kit-cost-panel,
.kit-sale-panel {
  border: 1px solid #c3abd6;
  border-radius: 12px;
  padding: 16px;
}
.kit-cost-panel {
  background: #ede3f6;
}
.kit-sale-panel {
  background: #fbf8ff;
}
.kit-financial-panels h3 {
  margin: 0 0 14px;
  font-size: 17px;
}
.kit-financial-panels output,
.kit-sale-panel strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  padding: 10px 0;
  color: #523366;
}
.kit-financial-panels label {
  font-size: 13px;
}
.kit-financial-panels small {
  font-size: 12px;
  line-height: 1.5;
}
.kit-profit-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid #cbb9dc;
  margin-top: 12px;
}
.kit-cost-panel output {
  font-size: 24px;
}
.kit-sale-panel input,
.kit-sale-panel select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
@media (max-width: 1100px) {
  .kit-financial-panels {
    grid-template-columns: 1fr;
  }
  .kit-name-code {
    grid-template-columns: minmax(0, 1fr) 110px;
  }
}
@media (max-width: 600px) {
  .kit-name-code {
    grid-template-columns: minmax(0, 1fr) 100px;
  }
  .kit-cost-panel,
  .kit-sale-panel {
    padding: 12px;
  }
}

.kit-name-code {
  grid-template-columns: minmax(0, 330px) 145px;
  justify-content: start;
  gap: 10px;
}
.kit-promo-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}
.kit-promo-entry > label {
  margin: 0;
}
.kit-promo-entry input,
.kit-promo-entry select {
  height: 44px;
}
.kit-coverage {
  padding: 9px 10px;
  margin: 8px 0;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.5;
  border-left: 3px solid #a58ab9;
  background: #eee6f6;
}
.kit-coverage.loss {
  background: #fbe8eb;
  border-color: #ad425c;
  color: #8b2942;
}
.kit-coverage.even {
  background: #eee8f4;
  border-color: #9477ae;
  color: #624478;
}
.kit-coverage.pending {
  background: #f3f0f5;
  color: #7c6b87;
}
.kit-cost-floor {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  margin-top: 16px;
  border-top: 1px solid #c3abd6;
  padding-top: 12px;
}
@media (max-width: 600px) {
  .kit-name-code {
    grid-template-columns: minmax(0, 1fr) 110px;
  }
  .kit-promo-entry {
    gap: 7px;
  }
  .kit-promo-entry select,
  .kit-promo-entry input {
    font-size: 13px;
  }
}
.kit-promo-entry > label {
  display: grid;
  grid-template-rows: 38px 44px;
  row-gap: 6px;
  align-items: end;
}
.kit-promo-entry > label > input,
.kit-promo-entry > label > select,
.kit-promo-entry .material-currency {
  margin-top: 0;
}

.kit-sale-warning {
  font-size: 12px;
  line-height: 1.5;
  color: #8b2942;
  background: #fbe8eb;
  border-radius: 7px;
  padding: 9px;
  margin: 8px 0;
}
.kit-sale-warning:empty {
  display: none;
}
.kit-included-option {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 6px;
}
.kit-included-option input[type='checkbox'] {
  width: auto;
  min-width: 14px;
  margin: 0;
  flex-shrink: 0;
}
.kit-component input[readonly] {
  background: #f2edf7;
  color: #796687;
}

.material-usage-mark {
  display: inline-block;
  vertical-align: middle;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f1edf5;
  color: #8a7a97;
  margin-left: 4px;
}
.material-usage-mark.assembly {
  background: #e8dff1;
  color: #654b7d;
}
.material-usage-mark.resale {
  background: #eee7f5;
  color: #72578d;
}
.material-inventory .cost-search-tools {
  grid-template-columns: minmax(0, 1.6fr) minmax(150px, 1fr) minmax(170px, 1fr);
}
.material-form-grid .material-field-usage_type {
  grid-area: 4/1/5/4;
  max-width: 400px;
}
@media (max-width: 850px) {
  .material-form-grid .material-field-usage_type {
    grid-area: 6/1/7/3;
  }
  .material-inventory .cost-search-tools {
    grid-template-columns: 1fr 1fr;
  }
  .material-inventory .cost-search-tools > input {
    grid-column: 1/-1;
  }
}
@media (max-width: 520px) {
  .material-inventory .cost-search-tools {
    grid-template-columns: 1fr;
  }
  .material-form-grid .material-field-usage_type {
    grid-area: auto !important;
  }
}

.material-form-grid .material-field-cost_quantity {
  grid-area: 4/1;
  max-width: 240px;
}
.material-form-grid .material-field-usage_type {
  grid-area: 5/1/6/4;
}
.kit-component .kit-line-cost {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  background: #eee5f7;
  color: #573d6d;
  border-radius: 7px;
  padding: 9px 12px;
  margin: 4px 0;
}
.kit-line-sale {
  font-size: 12px;
  color: #796687;
}
@media (max-width: 850px) {
  .material-form-grid .material-field-cost_quantity {
    grid-area: 5/2;
  }
  .material-form-grid .material-field-usage_type {
    grid-area: 6/1/7/3;
  }
}
@media (max-width: 520px) {
  .material-form-grid .material-field-cost_quantity,
  .material-form-grid .material-field-usage_type {
    grid-area: auto !important;
  }
}

.category-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(200px, 1fr);
  gap: 16px;
  align-items: end;
}
@media (max-width: 700px) {
  .category-filters {
    grid-template-columns: 1fr;
  }
}

#category-editor [hidden] {
  display: none !important;
}
#category-code-form {
  padding: 20px;
}
#category-code-form input,
#category-code-form select {
  max-width: 420px;
}
#category-results table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
#category-results th,
#category-results td {
  white-space: normal;
  overflow-wrap: anywhere;
}
#category-results th:nth-child(1) {
  width: 12%;
}
#category-results th:nth-child(2) {
  width: 31%;
}
#category-results th:nth-child(3) {
  width: 23%;
}
#category-results th:nth-child(4) {
  width: 14%;
}
#category-results th:nth-child(5) {
  width: 20%;
}

#category-definition-form {
  padding: 20px;
}
#category-definition-form input,
#category-definition-form select {
  max-width: 420px;
}

.category-reference-report {
  padding: 20px;
  margin-bottom: 18px;
}
.category-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.category-reference-grid > div {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f5effa;
  border: 1px solid #d7c9e4;
  border-radius: 8px;
}
.category-reference-grid dt {
  font-weight: 700;
  color: #594366;
  min-width: 44px;
}
.category-reference-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 850px) {
  .category-reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 550px) {
  .category-reference-grid {
    grid-template-columns: 1fr;
  }
}

#material-free-cost[hidden] {
  display: none !important;
}

.kits-list table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.kits-list th,
.kits-list td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.kits-list th:first-child {
  width: 24%;
}
.kits-list th:nth-child(2) {
  width: 8%;
}
.kits-list th:nth-child(3),
.kits-list th:nth-child(4),
.kits-list th:nth-child(5) {
  width: 12%;
}
.kits-list th:nth-child(6) {
  width: 8%;
}
.kits-list th:last-child {
  width: 24%;
}
.kits-list th,
.kits-list td {
  padding: 12px 8px;
  font-size: 12px;
}
.kits-list .heading-actions {
  flex-wrap: wrap;
}
.kits-list .heading-actions button,
.kits-list .heading-actions a {
  padding: 7px 9px;
  font-size: 12px;
}

.recipe-price-summary.recipe-kit-prices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.recipe-kit-prices label:nth-child(n + 4) {
  font-size: 12px;
}
.recipe-kit-prices label:nth-child(n + 4) output {
  font-size: 14px;
}
.recipe-component-retail {
  display: block;
  margin-top: 5px;
  color: #84758e;
  font-size: 12px;
}
@media (max-width: 700px) {
  .recipe-price-summary.recipe-kit-prices {
    grid-template-columns: 1fr;
  }
}

.material-field-category select {
  font-size: 13px;
  padding-left: 10px;
  padding-right: 18px;
}

.material-inventory th:first-child {
  width: 12%;
}
.material-inventory th:nth-child(2) {
  width: 27%;
}
.material-inventory th:nth-child(3) {
  width: 14%;
}
.material-inventory th:nth-child(4),
.material-inventory th:nth-child(5) {
  width: 10%;
}
.material-inventory th:nth-child(6) {
  width: 12%;
}
.material-inventory th:last-child {
  width: 15%;
}
#content .material-inventory th .material-sort {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
}
#content .material-inventory th .material-sort:focus-visible {
  outline: 2px solid #8e75a8;
  outline-offset: 4px;
}

.market-panel {
  padding: 20px;
  margin-bottom: 18px;
}
.market-panel .list-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}
.market-panel .list-toolbar label {
  flex: 1 1 180px;
  margin: 0;
}
.market-panel .heading-actions {
  flex-wrap: wrap;
}
.market-panel td small {
  display: block;
}
.market-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
}
.market-panel table {
  min-width: 0;
}
.market-panel th,
.market-panel td {
  white-space: normal;
}

.material-form-grid label:has([name='deck_type_id']) {
  grid-column: 1/-1;
  max-width: 400px;
}
.material-form-grid label[hidden]:has([name='deck_type_id']) {
  display: none !important;
}
#catalog-in-stock {
  width: auto;
}

.china-item {
  min-width: 0;
  margin: 20px 0;
  padding: 14px 16px 16px;
  border: 1px solid #9b8bb3;
  border-inline-start: 4px solid #675582;
  border-radius: 10px;
  background: #faf8fd;
}
.china-item legend {
  padding: 0 8px;
  color: #372849;
}
.china-item legend span {
  display: inline-grid;
  place-items: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.25rem;
  border-radius: 0.4rem;
  background: #675582;
  color: white;
}
.china-item-fields {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) minmax(5rem, 7rem) minmax(10rem, 1fr) minmax(12rem, 1fr);
  gap: 12px 16px;
  align-items: start;
}
.china-item-fields label {
  min-width: 0;
}
.china-item-fields input,
.china-item-fields select {
  width: 100%;
  min-width: 0;
}
.china-item-fields output {
  display: block;
  font-weight: 700;
  color: #372849;
}
.china-item-actions,
.china-receipt {
  margin-top: 14px;
}
.china-action {
  box-sizing: border-box;
  width: 13rem;
  max-width: 100%;
  height: 3rem;
  padding: 8px 10px;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}
.china-action[aria-pressed='true']::before {
  content: '✓';
  margin-inline-end: 0.35em;
}
@media (max-width: 1100px) {
  .china-item-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .china-item-fields input[name='sku'] {
    max-width: 7rem;
  }
}

/* Identifica esta copia (v2) frente al proyecto original. */
.version-badge {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 1000;
  padding: 3px 11px;
  border-radius: 999px;
  background: #8b79aa;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px #4a2d5733;
  pointer-events: none;
}
/* Gestionar Tiendanube */
.live-note {
  border-color: #e7c9a0;
  background: #fdf6ea;
}
.live-note span {
  color: #c98a2b;
}
.sa-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 18px 20px;
}
.sa-toolbar label {
  margin: 0;
  min-width: 200px;
  flex: 1;
}
.sa-toolbar label:nth-child(2) {
  flex: 0 1 180px;
  min-width: 150px;
}
.sa-table td {
  vertical-align: middle;
}
.sa-table td small {
  display: block;
  color: var(--muted);
}
.sa-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sa-thumb.big {
  width: 72px;
  height: 72px;
}
.sa-noimg {
  color: #c4a74e;
}
.sa-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.sa-dialog {
  width: min(720px, calc(100vw - 32px));
  border: none;
  border-radius: 12px;
  padding: 0;
}
.sa-dialog::backdrop {
  background: #4a2d5755;
}
.sa-dialog-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sa-dialog-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.sa-dialog-head h2 {
  margin: 0;
}
.sa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.sa-check {
  flex-direction: row;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sa-check input {
  width: auto;
  min-height: 0;
}
.sa-dialog textarea {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
}
.sa-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.sa-diff .sa-before {
  color: #a26172;
  text-decoration: line-through;
}
.sa-diff .sa-after {
  color: #315d31;
  font-weight: 600;
}
.button-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
@media (max-width: 600px) {
  .sa-grid {
    grid-template-columns: 1fr;
  }
  .sa-table th:nth-child(4),
  .sa-table td:nth-child(4) {
    display: none;
  }
}

/* Página de producto (crear / editar) */
.sp-loading {
  padding: 40px;
  color: var(--muted);
}
.sp-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.sp-head h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 30px;
  color: #644875;
  margin: 0;
  flex: 1;
  min-width: 220px;
}
.sp-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
  margin-top: 18px;
}
.sp-main,
.sp-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.sp-side {
  position: sticky;
  top: 16px;
}
.sp-card {
  padding: 22px;
  margin: 0;
}
.sp-card h2 {
  font-size: 18px;
  margin: 0 0 14px;
  color: #65487a;
}
.sp-card label {
  margin-bottom: 14px;
}
.sp-card label small,
.sp-help {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
}
.sp-label {
  font-size: 15px;
  margin-bottom: 6px;
}
.sp-grid3,
.sp-grid4 {
  display: grid;
  gap: 0 14px;
}
.sp-grid3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sp-grid4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sp-margin {
  align-self: center;
  padding: 12px 14px;
  background: var(--sage);
  border-radius: 8px;
  font-size: 15px;
}
.sp-segment {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sp-segment label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0;
  cursor: pointer;
  background: #fff;
}
.sp-segment label:has(input:checked) {
  border-color: #8b79aa;
  background: #f3eefa;
}
.sp-segment input {
  width: auto;
  min-height: 0;
}
.sp-segment.vertical {
  flex-direction: column;
}
.sp-segment.vertical small {
  display: block;
}
.sp-url {
  display: flex;
  align-items: stretch;
  border: 1px solid #dfe3d5;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 6px;
}
.sp-url span {
  padding: 0 10px;
  display: flex;
  align-items: center;
  background: #f5f0fa;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.sp-url input {
  border: none;
  margin: 0;
  min-width: 0;
}
.sp-cat-search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 10px;
  font-size: 15px;
}
.sp-cats {
  max-height: 320px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-cats label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 4px;
  font-size: 15px;
}
.sp-cats input {
  width: auto;
  min-height: 0;
}
.sp-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.sp-image {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
/* Todas las fotos del mismo tamaño; la principal se distingue por el borde dorado. */
.sp-image.is-first {
  border: 2px solid #c4a74e;
}
.sp-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
}
.sp-image figcaption {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-top: 1px solid var(--line);
  justify-content: center;
  flex-wrap: wrap;
}
.sp-image figcaption button {
  background: transparent;
  color: #806598;
  font-size: 13px;
  padding: 4px 6px;
}
.sp-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #c4a74e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.sp-badge.pending {
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  bottom: 48px;
  white-space: nowrap;
  background: #8b79aa;
}
.sp-drop {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px;
  border: 2px dashed #c9bcdc;
  border-radius: 10px;
  background: #faf7fc;
  cursor: pointer;
  text-align: center;
  color: #6d5689;
}
.sp-drop.over {
  border-color: #8b79aa;
  background: #f0e9f8;
}
.sp-drop-icon {
  font-size: 26px;
  color: #8b79aa;
}

/* Botones de IA (✎ IA) */
.sp-ai-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sp-ai {
  background: #f5f0fa;
  color: #6d5689;
  border: 1px solid #d9cce4;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  min-height: 0;
  font-family: inherit;
  white-space: nowrap;
}
.sp-ai:hover:not(:disabled) {
  background: #ebe1f6;
  border-color: #8b79aa;
}
.sp-ai:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.sp-ai.sp-ai-all {
  background: linear-gradient(110deg, #8b79aa, #a28ac1);
  color: #fff;
  border-color: transparent;
  font-size: 14px;
  padding: 7px 16px;
  box-shadow: 0 2px 8px #4a2d5726;
}
.sp-ai.sp-ai-all:hover:not(:disabled) {
  background: linear-gradient(110deg, #74608f, #8b79aa);
}
.sp-web {
  margin-bottom: 12px;
}
.sp-web small {
  color: var(--muted);
}
.sp-sources {
  background: #faf7fc;
  border: 1px solid #e3d8ee;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 15px;
}
.sp-sources ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.sp-sources li {
  margin-bottom: 4px;
}
.sp-sources a {
  color: #6d5689;
}
.sp-conflicts {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fdf6ea;
  border: 1px solid #e7c9a0;
  border-radius: 8px;
}
.sp-ai-hint {
  margin: -6px 0 12px;
}
.sp-ai-filled {
  outline: 2px solid #c4a74e;
  outline-offset: 2px;
  transition: outline-color 0.6s;
}

/* Editor de texto visual */
.rt {
  border: 1px solid #dfe3d5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.rt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  padding: 6px;
  background: #faf7fc;
  border-bottom: 1px solid var(--line);
}
.rt-toolbar button {
  background: transparent;
  color: var(--ink);
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 15px;
}
.rt-toolbar button:hover {
  background: #ece4f5;
}
.rt-toolbar select {
  height: 32px;
  font-size: 14px;
  min-height: 0;
  width: auto;
  padding: 0 8px;
}
.rt-sep {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 4px;
}
.rt-area {
  min-height: 200px;
  max-height: 520px;
  overflow: auto;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.6;
  outline: none;
}
.rt-area:focus {
  box-shadow: inset 0 0 0 2px #d9cce4;
}
.rt-area p {
  margin: 0 0 10px;
}
.rt-area h2 {
  font-size: 22px;
  margin: 12px 0 8px;
}
.rt-area h3 {
  font-size: 18px;
  margin: 10px 0 6px;
}
.rt-area hr {
  border: none;
  border-top: 1px solid #e3d8ee;
  margin: 14px 0;
}
.rt-area ul,
.rt-area ol {
  padding-left: 24px;
  margin: 0 0 10px;
}
@media (max-width: 1000px) {
  .sp-layout {
    grid-template-columns: 1fr;
  }
  .sp-side {
    position: static;
  }
}
@media (max-width: 600px) {
  .sp-grid3,
  .sp-grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sp-url span {
    display: none;
  }
}

.version-badge.inline {
  position: static;
  box-shadow: none;
  flex-shrink: 0;
}
body:has(.topbar) > .version-badge {
  display: none;
}
@media print {
  .version-badge {
    display: none;
  }
}
/* Crear guidebook */
.gb-form {
  display: grid;
  gap: 18px;
}
.gb-step {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  display: grid;
  gap: 12px;
}
.gb-step h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin: 0;
}
.gb-step h2 span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--ink);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gb-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.gb-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.gb-fotos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gb-foto {
  width: 110px;
  height: 110px;
  padding: 4px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.gb-foto img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gb-foto.sel {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #79679933;
}
.gb-temas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.gb-tema {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.gb-tema:has(input:checked) {
  border-color: var(--green);
  background: var(--sage);
}
.gb-tema input {
  width: auto;
  justify-self: start;
}
.gb-tema small {
  color: var(--muted);
}
.gb-colores {
  display: flex;
  gap: 4px;
}
.gb-colores i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #0001;
}
.gb-c-6f4a93 {
  background: #6f4a93;
}
.gb-c-4f7fc0 {
  background: #4f7fc0;
}
.gb-c-bcd6ee {
  background: #bcd6ee;
}
.gb-c-6f9e4f {
  background: #6f9e4f;
}
.gb-c-f2b632 {
  background: #f2b632;
}
.gb-c-3aa6a0 {
  background: #3aa6a0;
}
.gb-c-e2533c {
  background: #e2533c;
}
.gb-c-f4a9b8 {
  background: #f4a9b8;
}
.gb-file input {
  margin-top: 6px;
}
.gb-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.gb-actions span {
  color: var(--muted);
  font-size: 14px;
}
.gb-subida {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.gb-preview {
  width: 160px;
  height: 200px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.gb-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.gb-subida-txt {
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}
.gb-subida-txt button {
  justify-self: start;
}
.gb-otras summary {
  cursor: pointer;
  color: var(--green);
  font-size: 14px;
}
.gb-otras .gb-fotos {
  margin-top: 10px;
}
.gb-buscar {
  position: relative;
}
.gb-res {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px #4a2d5726;
  max-height: 340px;
  overflow: auto;
}
.gb-res li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.gb-res li:hover {
  background: var(--sage);
}
.gb-res img,
.gb-res li > i {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 6px;
  background: #faf8f3;
  flex: none;
}
.gb-res li.gb-vacio {
  color: var(--muted);
  cursor: default;
}
.gb-res li.gb-vacio:hover {
  background: none;
}
.gb-dijital {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 16px 18px;
  border: 1px solid #cfe3d3;
  background: #f2f8f3;
  border-radius: 12px;
}
.gb-dijital p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.gb-dijital[hidden] {
  display: none;
}
.sa-dijital {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e6f2e8;
  border: 1px solid #b9d8bf;
  color: #2f6b3c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.sa-dijital:hover {
  background: #d4eadb;
}
/* Estadísticas web */
.ws-periodo {
  display: inline-flex;
  gap: 6px;
}
.ws-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ws-kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}
.ws-kpi small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.ws-kpi strong {
  font-family: 'Readex Pro', sans-serif;
  font-size: 26px;
  color: var(--ink);
  font-weight: 500;
}
.ws-kpi span {
  color: var(--muted);
  font-size: 12px;
}
.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.ws-grid .panel {
  margin: 0;
}
.ws-grid h3,
.ws-seo h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
.ws-sub {
  color: var(--muted);
  font-size: 12px;
  margin: -6px 0 10px;
}
.ws-barras {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 140px;
  border-bottom: 1px solid var(--line);
}
.ws-col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  cursor: default;
}
.ws-col i {
  display: block;
  width: 100%;
  background: #8b79aa;
  border-radius: 4px 4px 0 0;
}
.ws-col:hover i {
  background: #5d4a7d;
}
.ws-eje {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.ws-ranking {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.ws-ranking li {
  display: grid;
  grid-template-columns: minmax(90px, 38%) 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.ws-nombre {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-track {
  height: 10px;
  background: #f1edf6;
  border-radius: 5px;
  overflow: hidden;
}
.ws-track i {
  display: block;
  height: 100%;
  background: #8b79aa;
  border-radius: 5px;
}
.ws-ranking b {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.ws-vacio {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0;
}
.ws-nota {
  color: var(--muted);
  font-size: 12px;
}
.ws-seo .ws-kpis-4 {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.ws-tabla td:first-child {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-conectar {
  border: 1px solid #e7c9a0;
  background: #fdf8ef;
}
.ws-conectar h2 {
  font-size: 17px;
  margin: 0 0 8px;
}
.ws-checks {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 4px;
}
.ws-checks li::before {
  content: '○ ';
  color: var(--muted);
}
.ws-checks li.ok::before {
  content: '✓ ';
  color: #2f6b3c;
  font-weight: 700;
}
.ws-conectar ol {
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.ws-conectar summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
}
.ws-error {
  color: #963f43;
  font-size: 13px;
}
.ws-grid .panel,
.ws-conectar,
.ws-seo {
  padding: 18px 20px;
}
.ws-conectar {
  margin-bottom: 16px;
}

/* Estadísticas web · en vivo */
.ws-vivo {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 28px;
  padding: 20px 22px;
  margin-bottom: 16px;
  align-items: start;
}
.ws-vivo > * {
  min-width: 0;
}
.ws-vivo h2 {
  font-size: 15px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-vivo-total {
  padding-right: 24px;
  border-right: 1px solid var(--line);
}
.ws-vivo-total strong {
  font-family: 'Readex Pro', sans-serif;
  font-size: 40px;
  font-weight: 500;
  color: var(--ink);
  display: block;
  line-height: 1.1;
}
.ws-vivo-total > span,
.ws-vivo-total small {
  color: var(--muted);
  font-size: 12px;
  display: block;
}
.ws-vivo-total .ws-barras {
  height: 50px;
  margin-top: 12px;
}
.ws-punto {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3f9a5c;
  box-shadow: 0 0 0 3px rgba(63, 154, 92, 0.2);
}
.ws-mini-cab {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.ws-mini {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.ws-mini li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.ws-mini li:last-child {
  border-bottom: 0;
}
.ws-mini span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-mini b {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ws-vivo-lista .ws-vacio {
  margin-top: 8px;
}
.ws-embudo {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.ws-embudo h3 {
  font-size: 15px;
  margin: 0 0 12px;
  color: var(--ink);
}
.ws-embudo h3 span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
.ws-embudo ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.ws-embudo li {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ws-embudo small {
  color: var(--muted);
  font-size: 12px;
}
.ws-embudo strong {
  font-family: 'Readex Pro', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ws-embudo em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}
@media (max-width: 1000px) {
  .ws-embudo ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ws-grid-seo {
  margin-bottom: 12px;
}
@media (max-width: 1000px) {
  .ws-vivo {
    grid-template-columns: 1fr 1fr;
  }
  .ws-vivo-total {
    border-right: 0;
    padding-right: 0;
  }
}
@media (max-width: 560px) {
  .ws-vivo {
    grid-template-columns: 1fr;
  }
}

/* Header · personas en la web ahora */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.live-pill[hidden] {
  display: none;
}
.live-pill b {
  font-family: 'Readex Pro', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.live-pill:hover {
  border-color: #3f9a5c;
}
.live-pill .ws-punto {
  flex: none;
}
.live-pill.activo .ws-punto {
  animation: live-pulso 2s ease-in-out infinite;
}
@keyframes live-pulso {
  50% {
    box-shadow: 0 0 0 6px rgba(63, 154, 92, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-pill.activo .ws-punto {
    animation: none;
  }
}
@media (max-width: 700px) {
  .live-pill .live-label {
    display: none;
  }
}

/* Estadísticas web · pasos del embudo clicables y modal de detalle */
.ws-paso {
  all: unset;
  box-sizing: border-box;
  display: grid;
  gap: 4px;
  width: calc(100% + 20px);
  padding: 8px 10px;
  margin: -8px -10px;
  border-radius: 10px;
  cursor: pointer;
}
.ws-paso:hover {
  background: #f6f2fb;
}
.ws-paso:focus-visible {
  outline: 2px solid #8c72a5;
  outline-offset: 2px;
}
.ws-paso small span {
  color: #8c72a5;
  font-weight: 600;
}
dialog.ws-modal {
  width: min(920px, calc(100vw - 32px));
}
.ws-detalle h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin: 18px 0 10px;
}
.ws-detalle h3:first-child {
  margin-top: 4px;
}
.ws-tabla-modal th.n,
.ws-tabla-modal td.n {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ws-tabla-modal td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.ws-tabla-modal .ws-marca {
  background: #f3eefa;
  font-weight: 600;
}
.ws-detalle {
  padding: 4px 24px 24px;
}

/* Insumos digitales: stock ilimitado */
.material-infinite {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: #5d4a78;
  white-space: nowrap;
}
label .material-infinite {
  min-height: 44px;
  padding: 0 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #f6f2fb;
}

/* Insumos pendientes de revisión: primero y en color ámbar hasta que se marcan como revisados */
#content .material-inventory tbody tr.material-pendiente > td {
  background: #fff4e0;
}
#content .material-inventory tbody tr.material-pendiente:hover > td {
  background: #ffecc9;
}
.material-inventory tbody tr.material-pendiente > td:first-child {
  box-shadow: inset 4px 0 0 #e0a13a;
  font-weight: 600;
  color: #7a4f12;
}
.material-inventory tbody tr.material-pendiente .review-tag {
  display: inline-block;
  color: #8a5a10;
  background: #ffe3b3;
  font-weight: 600;
}

/* Ficha de insumo: Tipo de mazo y Uso en la misma línea; costo y revisión lado a lado */
@media (min-width: 851px) {
  .material-form-grid label:has([name='deck_type_id']) {
    grid-area: 5/1;
    max-width: none;
  }
  .material-form-grid .material-field-usage_type {
    grid-area: 5/2/6/4;
    max-width: 400px;
  }
  .material-form-grid label:has([name='cloth_type']) {
    grid-area: 5/1;
  }
  .material-form-grid:has(> label[hidden] > [name='deck_type_id']):has(> label[hidden] > [name='cloth_type'])
    .material-field-usage_type {
    grid-area: 5/1/6/3;
  }
}
.material-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin: 20px 0;
}
.material-footer > .factory-total {
  margin: 0;
  display: flex;
  align-items: center;
}
.material-checks {
  display: grid;
  gap: 10px;
  align-content: stretch;
}
.material-checks:empty {
  display: none;
}
.material-checks .review-confirm {
  margin: 0;
}
.material-checks .review-confirm[hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  .material-footer {
    grid-template-columns: 1fr;
  }
}
.material-form-grid label[hidden]:has([name='cloth_type']) {
  display: none !important;
}

.material-pend-count {
  font-size: 0.75em;
  font-weight: 500;
  color: #8a5a10;
  margin-left: 6px;
  white-space: nowrap;
}

/* Insumos · edición masiva */
.material-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 14px 16px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f4fc;
}
.material-bulk strong {
  font-size: 14px;
  color: #5d4a78;
  min-width: 210px;
}
.material-bulk select {
  width: auto;
  min-width: 0;
  max-width: 250px;
  font-size: 13px;
  padding: 8px 10px;
}
.material-bulk .bulk-review {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 0;
}
.material-bulk .bulk-review input,
.material-inventory .bulk-pick,
#bulk-all {
  width: 18px !important;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #8c72a5;
}
.material-bulk #bulk-result {
  flex-basis: 100%;
  margin: 0;
}
.material-bulk #bulk-result:empty {
  display: none;
}
.material-inventory th:first-child,
.material-inventory td:first-child {
  width: 34px;
  text-align: center;
}
#content .material-inventory tbody tr.bulk-selected > td {
  background: #ece3f7;
}
.material-inventory tbody tr.material-pendiente > td:nth-child(2) {
  font-weight: 600;
  color: #7a4f12;
}

/* Crear guidebook · diseño con imágenes propias */
.gb-modo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.gb-modo label {
  display: grid !important;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.gb-modo label:has(input:checked) {
  border-color: #8c72a5;
  background: #f6f2fb;
}
.gb-modo input {
  width: 18px !important;
  margin-top: 3px;
  grid-row: span 2;
  accent-color: #8c72a5;
}
.gb-modo small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}
.gb-sub {
  font-size: 14px;
  margin: 16px 0 8px;
}
.gb-sub small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
.gb-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.gb-slot {
  display: grid;
  gap: 4px;
  align-content: start;
  font-size: 12px;
}
.gb-slot small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.gb-slot .text-button {
  justify-self: start;
  font-size: 12px;
  padding: 0;
}
.gb-slot-img {
  all: unset;
  box-sizing: border-box;
  aspect-ratio: 210 / 297;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.gb-slot.vacio .gb-slot-img {
  border: 1.5px dashed #c8b8da;
  color: #8c72a5;
  font-weight: 600;
  background: #faf7fd;
}
.gb-slot.lleno .gb-slot-img {
  border: 1px solid var(--line);
}
.gb-slot-img:focus-visible {
  outline: 2px solid #8c72a5;
  outline-offset: 2px;
}
.gb-slot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gb-slot.subiendo {
  opacity: 0.5;
  pointer-events: none;
}
.gb-caps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.gb-cap {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 12px;
}
.gb-cap-tit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
}
.gb-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}
.gb-cap .gb-slots {
  grid-template-columns: 1fr 1fr;
}
.gb-aviso {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff4e0;
  border: 1px solid #f0c98a;
  color: #7a4f12;
  font-size: 13px;
}
.gb-aviso span {
  display: block;
  margin-top: 2px;
}
.gb-ok {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #edf6ee;
  color: #2f6b3d;
  font-size: 13px;
  font-weight: 600;
}
.gb-atenuado {
  opacity: 0.55;
}
.gb-nota-modo {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
.gb-step-portada:not(.modo-diseno) .gb-nota-modo {
  display: none;
}
.gb-step-portada.modo-diseno .gb-subida,
.gb-step-portada.modo-diseno .gb-otras {
  opacity: 0.55;
}

/* Crear guidebook · biblioteca de cartas */
.gb-biblio-resumen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f4fc;
}
.gb-biblio-resumen:empty {
  display: none;
}
.gb-biblio-resumen b {
  display: block;
  font-size: 14px;
}
.gb-biblio-resumen span {
  font-size: 13px;
  color: var(--muted);
}
.gb-biblio {
  padding: 20px 22px;
}
.gb-biblio-cab {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.gb-biblio-cab h2 {
  margin: 0 0 4px;
}
.gb-lista-origen {
  padding: 16px;
  border: 1px dashed #c8b8da;
  border-radius: 12px;
  background: #faf7fd;
}
.gb-lista-origen h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.gb-lista-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 6px;
}
.gb-biblio-barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
}
.gb-subir-cartas {
  display: inline-flex !important;
  align-items: center;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}
.gb-biblio-estado {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}
.gb-bandeja {
  border: 1px solid #f0c98a;
  background: #fff8ec;
  border-radius: 12px;
  padding: 10px 14px 14px;
  margin-bottom: 8px;
}
.gb-bandeja h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.gb-bandeja h3 small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
.gb-bandeja-fotos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gb-foto-libre {
  width: 92px;
  display: grid;
  gap: 2px;
  cursor: grab;
  font-size: 11px;
  border-radius: 8px;
  padding: 4px;
  border: 2px solid transparent;
}
.gb-foto-libre.sel {
  border-color: #8c72a5;
  background: #f3eefa;
}
.gb-foto-libre img {
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: cover;
  border-radius: 6px;
}
.gb-foto-libre small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gb-foto-libre .text-button {
  font-size: 11px;
  padding: 0;
  justify-self: start;
}
.gb-cartas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
}
.gb-carta {
  display: grid;
  gap: 3px;
  align-content: start;
  font-size: 12px;
  border-radius: 10px;
  padding: 5px;
  border: 2px solid transparent;
}
.gb-carta b {
  font-weight: 600;
  line-height: 1.25;
}
.gb-carta-img {
  aspect-ratio: 3 / 5;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf7fd;
  border: 1.5px dashed #d6c9e4;
  color: #a593ba;
  font-size: 11px;
}
.gb-carta-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gb-carta.sugerida .gb-carta-img {
  border: 2px solid #e0a13a;
}
.gb-carta.confirmada .gb-carta-img {
  border: 1px solid var(--line);
}
.gb-tag {
  justify-self: start;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
}
.gb-tag.sug {
  background: #ffe3b3;
  color: #8a5a10;
}
.gb-tag.ok {
  background: #e2f1e5;
  color: #2f6b3d;
}
.gb-carta-acc {
  display: flex;
  gap: 10px;
}
.gb-carta-acc .text-button {
  font-size: 11.5px;
  padding: 0;
}
.gb-biblio.asignando .gb-carta {
  cursor: pointer;
}
.gb-biblio.asignando .gb-carta:hover,
.gb-carta.sobre {
  border-color: #8c72a5;
  background: #f3eefa;
}

/* Crear guidebook · guía guardada y títulos e índice */
.gb-fuente {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f4fc;
  font-size: 13px;
}
.gb-fuente:empty {
  display: none;
}
.gb-fuente span {
  color: var(--muted);
}
.gb-tit-resumen {
  display: block;
  margin-top: 4px;
  color: var(--ink) !important;
}
.gb-tit-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr);
  gap: 22px;
  align-items: start;
}
.gb-tit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.gb-tit.sugerido {
  background: #fff8ec;
}
.gb-tit.eliminado .gb-tit-texto {
  color: var(--muted);
  text-decoration: line-through;
}
.gb-tit-texto {
  width: 100%;
  font-size: 14px;
  padding: 6px 8px !important;
}
.gb-tit-acc {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}
.gb-tit-acc .text-button,
.gb-propuesta .text-button {
  font-size: 12px;
  padding: 0;
}
.gb-tag.off {
  background: #ece9f0;
  color: #6c6478;
}
.gb-propuesta {
  grid-column: 2 / -1;
  font-size: 12.5px;
  color: #5d4a78;
  background: #f3eefa;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}
.gb-tit-orig {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 11.5px;
}
.gb-tit-nuevo {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.gb-tit-nuevo .gb-sub {
  margin-bottom: 0;
}
.gb-tit-nuevo button {
  justify-self: start;
}
.gb-indice-prev {
  position: sticky;
  top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fffdf9;
}
.gb-indice-prev h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.gb-indice-prev ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.gb-indice-prev .l1 {
  margin-top: 10px;
  font-weight: 700;
  color: #6b5a8a;
  border-bottom: 1px solid #ece3f7;
  padding-bottom: 2px;
}
.gb-indice-prev .l2 {
  padding: 2px 0 2px 12px;
}
@media (max-width: 900px) {
  .gb-tit-cols {
    grid-template-columns: 1fr;
  }
  .gb-indice-prev {
    position: static;
  }
}

/* Crear guidebook · textos de las cartas */
.gb-fuente-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gb-txt-config {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.gb-txt-config small {
  font-weight: 400;
  color: var(--muted);
}
.gb-txt-cols {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.gb-txt-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 70vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.gb-txt-lista button {
  all: unset;
  box-sizing: border-box;
  display: grid;
  width: 100%;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: 13px;
}
.gb-txt-lista button small {
  font-size: 11px;
  color: var(--muted);
}
.gb-txt-lista button.e-borrador small {
  color: #8a5a10;
}
.gb-txt-lista button.e-aprobado small {
  color: #2f6b3d;
}
.gb-txt-lista button.e-sin-fuente small {
  color: #963f43;
}
.gb-txt-lista button.sel {
  background: #f3eefa;
  font-weight: 600;
}
.gb-txt-lista button:focus-visible {
  outline: 2px solid #8c72a5;
  outline-offset: -2px;
}
.gb-txt-tit {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.gb-txt-tit h3 {
  margin: 0;
  font-size: 18px;
}
.gb-txt-par {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}
.gb-txt-fuente h4 {
  margin: 0 0 6px;
  font-size: 13px;
}
.gb-txt-fuente h4 small {
  font-weight: 400;
  color: var(--muted);
}
.gb-txt-fuente pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  max-height: 60vh;
  overflow: auto;
  background: #faf8f4;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: #4a4458;
}
.gb-txt-campos {
  display: grid;
  gap: 10px;
}
.gb-txt-campos label {
  font-size: 12.5px;
  font-weight: 600;
}
.gb-txt-campos label em {
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  color: #8a5a10;
  background: #ffe3b3;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
}
.gb-txt-campos textarea {
  width: 100%;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  resize: vertical;
}
.gb-txt-campos label.falta textarea {
  background: #fff8ec;
  border-color: #f0c98a;
}
.gb-txt-acc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 1000px) {
  .gb-txt-cols,
  .gb-txt-par {
    grid-template-columns: 1fr;
  }
  .gb-txt-lista {
    max-height: 240px;
  }
}
.gb-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-top: 8px;
}
.gb-check input {
  width: 18px !important;
  margin-top: 2px;
  accent-color: #8c72a5;
}

/* Pedidos de China: tablas sin desplazamiento lateral y entrega */
#content .china-tabla {
  overflow-x: visible;
}
#content .china-tabla table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}
#content .china-tabla th,
#content .china-tabla td {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: middle;
  padding-left: 10px;
  padding-right: 10px;
}
#content .china-tabla td small {
  display: block;
}
#content .china-tabla .china-acciones {
  white-space: normal;
}
#content .china-tabla .china-acciones > * {
  display: inline-flex;
  margin: 2px 4px 2px 0;
  white-space: nowrap;
}
.china-sub {
  font-size: 15px;
  margin: 18px 0 8px;
}
.china-entrega {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 18px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #b9d9c1;
  border-radius: 12px;
  background: #f1f8f2;
}
.china-entrega > div {
  display: grid;
  gap: 2px;
  flex: 1 1 260px;
}
.china-entrega span {
  font-size: 13px;
  color: var(--muted);
}
.china-entrega label {
  font-size: 13px;
}
.china-entrega.listo {
  align-items: center;
}
.china-estimado {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.china-sin-total {
  font-size: 13px;
  color: var(--muted);
}

/* Pedidos de China: recuadro Producto (nombre + descripción + detalle) y enlace que se puede abrir */
.china-item-fields {
  grid-template-columns: minmax(16rem, 1.6fr) minmax(6rem, 8rem) minmax(10rem, 1fr) minmax(10rem, 1fr);
}
.china-producto {
  grid-row: 1 / span 3;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px 14px;
  border: 1px solid #cbb9dc;
  border-radius: 10px;
  background: #fff;
  min-width: 0;
}
.china-producto-rotulo {
  font-size: 13px;
  color: var(--muted);
}
.china-producto .china-nombre {
  font-size: 18px;
  font-weight: 700;
  color: #372849;
}
.china-producto textarea {
  width: 100%;
  min-height: 7.5rem;
  resize: vertical;
  font-size: 14px;
  line-height: 1.45;
}
.china-producto label {
  font-size: 13px;
}
.china-enlace {
  grid-column: 2 / -1;
}
.china-enlace-fila {
  display: flex;
  gap: 8px;
  align-items: center;
}
.china-enlace-fila input {
  flex: 1;
}
.china-abrir {
  flex: none;
  white-space: nowrap;
  text-decoration: none;
}
.china-abrir[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}
@media (max-width: 1100px) {
  .china-producto {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .china-enlace {
    grid-column: 1 / -1;
  }
}

/* Pedidos de China: dentro de Producto, sin recuadros internos; montos en pesos */
.china-producto {
  grid-row: 1 / span 4;
  gap: 4px;
}
#content .china-producto input,
#content .china-producto textarea {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  border-radius: 0;
}
#content .china-producto input:focus,
#content .china-producto textarea:focus {
  outline: none;
  box-shadow: 0 1px 0 #8c72a5 !important;
}
#content .china-producto textarea {
  min-height: 6rem;
  color: #4a4458;
}
.china-producto label {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #e3d9ee;
  color: var(--muted);
}
.china-producto label input {
  flex: 1;
  color: #372849;
  font-size: 14px;
}
.china-monto {
  display: block;
  min-height: 2.6rem;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid #e3d9ee;
  border-radius: 10px;
  background: #f7f3fb;
  font-weight: 700;
  color: #372849;
}
.china-pesos-precio {
  grid-column: 3;
}
.china-pesos-sub {
  grid-column: 4;
}
.china-cotiz {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.china-totales {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}
.china-dolar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
}
.china-dolar input {
  width: 7rem !important;
}
@media (max-width: 1100px) {
  .china-pesos-precio,
  .china-pesos-sub {
    grid-column: auto;
  }
}

/* Pedidos de China: ficha en tres filas (Producto · datos y enlace · costos) */
#content .china-item-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
#content .china-item-fields .china-producto {
  grid-row: auto;
  grid-column: 1;
}
#content .china-producto textarea {
  min-height: 3.6rem;
}
.china-fila-datos {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) minmax(10rem, 16rem) minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: end;
}
.china-fila-datos .china-enlace {
  grid-column: auto;
}
.china-fila-datos .china-abrir {
  height: 2.9rem;
  display: inline-flex;
  align-items: center;
}
.china-fila-costos {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
}
.china-fila-costos label {
  min-width: 0;
}
.china-fila-costos .china-pesos-precio,
.china-fila-costos .china-pesos-sub {
  grid-column: auto;
}
.china-monto.chico {
  font-size: 12.5px;
  font-weight: 600;
  color: #6c6478;
}
.china-monto.fuerte {
  background: #efe7f8;
  border-color: #cbb9dc;
}
@media (max-width: 1100px) {
  .china-fila-datos {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .china-fila-datos .china-enlace {
    grid-column: 1 / -1;
  }
  .china-fila-costos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Pedidos de China: ajuste de la ficha (sin código, cantidad chica, costos por unidad y subtotales) */
.china-fila-datos {
  grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr);
}
.china-fila-datos .china-enlace-fila {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.china-fila-datos .china-enlace-fila input {
  flex: 1;
  min-width: 0;
}
.china-fila-datos .china-abrir {
  height: auto;
}
.china-fila-costos {
  grid-template-columns: 5.5rem 7.5rem 8rem 9rem 9.5rem minmax(14rem, 1fr);
  align-items: end;
}
.china-fila-costos label {
  white-space: nowrap;
  font-size: 13px;
}
.china-fila-costos input {
  width: 100% !important;
  padding-left: 10px !important;
  padding-right: 6px !important;
}
.china-fila-costos .china-monto {
  min-height: 2.6rem;
  padding: 9px 10px;
  font-size: 13.5px;
}
.china-fila-costos .china-cotiz {
  font-size: 11px;
}
.china-subtotales {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ece3f7;
  border: 1px solid #cbb9dc;
}
.china-subtotales div {
  display: grid;
  gap: 2px;
}
.china-subtotales span {
  font-size: 12px;
  color: #5d4a78;
  font-weight: 600;
}
.china-subtotales output {
  font-size: 16px;
  font-weight: 800;
  color: #372849;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .china-fila-costos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .china-subtotales {
    grid-column: 1 / -1;
  }
}
.china-fila-costos {
  grid-template-columns: 5.5rem 7.5rem 8rem 8.5rem 9rem minmax(12rem, 1fr);
  gap: 12px 10px;
}
.china-fila-costos {
  grid-template-columns: 5rem 7rem 7.5rem 8.5rem 8.5rem minmax(11rem, 1fr);
}
#content .china-fila-costos label {
  display: block !important;
}
#content .china-fila-costos label .china-cotiz {
  display: inline;
  margin-left: 3px;
}
#content .china-fila-costos label input,
#content .china-fila-costos label output {
  display: block;
  margin-top: 6px;
}
#content .china-fila-costos label {
  line-height: 18px;
}

/* Pedidos de China: ¿el producto ya está en Insumos? */
.china-producto-cab {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.china-insumo {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.china-insumo.existe {
  background: #e2f1e5;
  color: #2f6b3d;
}
.china-insumo.nuevo {
  background: #fff1d6;
  color: #8a5a10;
}

/* Pedidos de China: total del pedido siempre a la vista mientras se carga */
#content .china-totales {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 16px 0;
  padding: 10px 0;
  background: linear-gradient(to bottom, rgba(250, 248, 253, 0), #faf8fd 30%);
}
.china-total-pedido {
  flex: 1 1 26rem;
  max-width: 40rem;
  background: #ddd0ee;
  border-color: #b9a3d3;
  box-shadow: 0 4px 14px rgba(55, 40, 73, 0.12);
}
.china-total-pedido output {
  font-size: 19px;
}
/* "clip" recorta igual que "hidden" pero deja funcionar el total fijo (sticky) */
#content #china-view {
  overflow: clip;
}

/* Pedidos de China: costo U$S del insumo que ya existe, para comparar */
.china-fila-costos {
  grid-template-columns: 5rem 7rem 7rem 7.5rem 8.5rem 8.5rem minmax(11rem, 1fr);
}
.china-anterior {
  display: grid;
  align-content: end;
  min-width: 0;
}
.china-anterior:empty {
  visibility: hidden;
}
.china-anterior-tit {
  font-size: 13px;
  line-height: 18px;
  color: #2f6b3d;
  white-space: nowrap;
}
#content .china-anterior .china-anterior-valor {
  margin-top: 6px;
  background: #e2f1e5;
  border-color: #b9d9c1;
  color: #2f6b3d;
}
.china-anterior small {
  font-size: 10.5px;
  color: #4e7a59;
  margin-top: 2px;
  white-space: nowrap;
}
/* 7 columnas: más angostas, títulos en 12px y subtotales uno debajo del otro */
.china-fila-costos {
  grid-template-columns: 4.5rem 6.5rem 6rem 6.5rem 8rem 6.5rem minmax(9.5rem, 1fr);
}
#content .china-fila-costos label,
.china-anterior-tit {
  font-size: 12px;
}
.china-fila-costos .china-subtotales {
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 8px 12px;
}
.china-fila-costos .china-subtotales div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.china-fila-costos .china-subtotales output {
  font-size: 14.5px;
}

/* Pedidos de China: vincular a mano con un insumo */
.china-vincular {
  font-size: 12px;
  padding: 0 0 0 8px;
}
.china-vinculo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.china-vinculo input {
  width: 18rem;
  max-width: 100%;
  font-size: 13px;
  padding: 6px 10px;
}
.china-vinculo .secondary {
  padding: 6px 12px;
  font-size: 13px;
}
.china-vinculo .text-button {
  font-size: 12px;
}

/* Pedidos de China: agregar más productos al final de la lista */
.china-agregar-mas {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem;
  margin: 0.8rem 0 1rem;
  padding: 0.8rem;
  border: 1px dashed var(--line, #d9d2c3);
  border-radius: 10px;
}
.china-agregar-mas label {
  flex: 1 1 18rem;
  display: grid;
  gap: 0.25rem;
  font-size: 12px;
}

/* Pedidos de China: botón y ventana "cómo va el pedido" */
.china-ver-resumen {
  align-self: stretch;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(55, 40, 73, 0.12);
}
dialog:has(.china-resumen) {
  width: min(1000px, calc(100vw - 32px));
}
.china-resumen-datos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.china-resumen-datos > div {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #e3dcef;
  border-radius: 10px;
  background: #faf8fd;
}
.china-resumen-datos span {
  font-size: 12px;
  color: #6b5d7d;
}
.china-resumen-datos strong {
  font-size: 17px;
}
.china-resumen-tabla td.num,
.china-resumen-tabla th.num {
  text-align: right;
  white-space: nowrap;
}
.china-resumen-tabla tfoot td {
  border-top: 2px solid #b9a3d3;
  background: #ece4f6;
}
.china-resumen-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}
.china-resumen-tag.existe {
  background: #e3f3e6;
  color: #22663a;
}
.china-resumen-tag.nuevo {
  background: #fdf0d8;
  color: #8a5a00;
}
.china-falta {
  color: #a35b00;
  font-size: 12px;
}
.china-resumen-aviso {
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fdf0d8;
  color: #6e4800;
  font-size: 13px;
}
.china-resumen-pie {
  margin-top: 10px;
  font-size: 12px;
  color: #6b5d7d;
}

/* Tipos de mazo: botón y ventana con los mazos de cada tipo */
.deck-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.deck-mazos td.num,
.deck-mazos th.num {
  text-align: right;
  white-space: nowrap;
}
.deck-sin-stock {
  color: #a35b00;
  font-size: 12px;
}
.deck-vacio {
  padding: 12px;
  border-radius: 8px;
  background: #faf8fd;
}

/* Pedidos de China: solapa "Insumos y stock" */
.china-stock-tabla td.num,
.china-stock-tabla th.num {
  text-align: right;
  white-space: nowrap;
}
.china-stock-tabla td small {
  display: block;
  color: #6b5d7d;
}
.china-stock-cero {
  color: #a35b00;
  font-weight: 600;
}
#content .china-stock-tabla tr.china-stock-agotado td {
  background: #fff8ec;
}
.china-ya-esta {
  color: #22663a;
  font-size: 13px;
  white-space: nowrap;
}
.china-armado {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 12px;
  padding: 10px 14px;
  border: 1px solid #b9a3d3;
  border-radius: 12px;
  background: #ddd0ee;
  box-shadow: 0 4px 14px rgba(55, 40, 73, 0.12);
}
.china-armado[hidden] {
  display: none;
}

/* Insumos y stock: los que ya están en el pedido, en verde para no repetirlos */
#content .china-stock-tabla tr.china-stock-en-pedido td {
  background: #e9f6ec;
}
#content .china-stock-tabla tr.china-stock-en-pedido td:first-child {
  box-shadow: inset 4px 0 0 #3f9a5c;
}
.china-stock-resumen {
  margin: 4px 0 10px;
  font-size: 13px;
}

/* Pedidos de China: foto del producto (la misma que va al Excel) */
.china-producto {
  grid-template-columns: minmax(0, 1fr) 132px;
  column-gap: 14px;
}
.china-producto > * {
  grid-column: 1;
}
.china-producto > .china-producto-cab {
  grid-column: 1 / -1;
}
.china-producto > .china-foto {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: start;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.china-foto {
  position: relative;
}
/* Oculta pero con lugar en pantalla: si fuera display:none, la carga diferida (lazy) nunca la pediría */
.china-foto img {
  position: absolute;
  top: 0;
  opacity: 0;
  pointer-events: none;
  width: 120px;
  height: 120px;
  object-fit: contain;
  border: 1px solid #e3dcef;
  border-radius: 8px;
  background: #fff;
}
.china-foto.con-foto img {
  position: static;
  opacity: 1;
  pointer-events: auto;
}
.china-foto-vacia {
  display: grid;
  place-items: center;
  width: 120px;
  min-height: 72px;
  padding: 6px;
  border: 1px dashed #cbb9dc;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.3;
  color: #6b5d7d;
}
.china-foto.con-foto .china-foto-vacia {
  display: none;
}
.china-foto-subir {
  padding: 4px 10px !important;
  font-size: 12px !important;
  cursor: pointer;
}

/* Guidebook · paso 3: carátula con fondo y textos que se mueven */
.gb-caratula {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin: 14px 0 22px;
  padding: 16px;
  border: 1px solid #e3dcef;
  border-radius: 14px;
  background: #fbf9fe;
}
.gb-cara-hoja {
  position: relative;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  border: 1px solid #d8cde8;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(55, 40, 73, 0.14);
  touch-action: none;
  user-select: none;
}
.gb-cara-hoja.vacia {
  border-style: dashed;
}
.gb-cara-hoja.subiendo {
  opacity: 0.5;
}
.gb-cara-hoja > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.gb-cara-vacia {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #8a8094;
}
.gb-cara-txt {
  position: absolute;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 85.7%;
  padding: 0.1em 0.2em;
  text-align: center;
  color: #2f2a3f;
  outline: 1px dashed rgba(103, 85, 130, 0.55);
  outline-offset: 2px;
  cursor: grab;
}
.gb-cara-txt:hover,
.gb-cara-txt:focus-visible {
  outline: 2px solid #675582;
  background: rgba(255, 255, 255, 0.25);
}
.gb-cara-txt.moviendo {
  cursor: grabbing;
  outline: 2px solid #675582;
}
.gb-cara-txt.nom {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.05;
}
.gb-cara-txt.sub {
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.gb-cara-txt.claro {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.gb-cara-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}
.gb-cara-panel .gb-sub {
  margin: 0;
}
.gb-cara-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.gb-cara-tam output {
  margin-left: 6px;
  font-weight: 700;
  color: #675582;
}
.gb-cara-tam input[type='range'] {
  width: 100%;
  accent-color: #675582;
}
@media (max-width: 760px) {
  .gb-caratula {
    grid-template-columns: 1fr;
  }
  .gb-cara-hoja {
    max-width: 340px;
    width: 100%;
    margin: 0 auto;
  }
}

/* Mandarina: accesos de las aplicaciones */
.md-barra {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.md-buscar {
  flex: 1 1 18rem;
  max-width: 28rem;
}
.md-candado {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.md-estado {
  font-size: 13px;
  color: #6b5d7d;
}
.md-estado.abierto {
  color: #22663a;
  font-weight: 600;
}
.md-tabla td {
  vertical-align: top;
}
.md-tabla .md-enlace {
  display: block;
  font-size: 12px;
}
.md-usuario {
  display: block;
  overflow-wrap: anywhere;
}
.md-clave {
  display: inline-block;
  min-width: 6.5rem;
  margin-right: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f3eff8;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
  user-select: all;
}
.md-notas {
  max-width: 18rem;
  font-size: 13px;
  white-space: pre-line;
}
.md-acciones {
  white-space: nowrap;
}
.md-acciones small {
  display: block;
  margin-top: 4px;
  color: #8a8094;
  font-size: 11px;
  white-space: normal;
}
.md-personas h3 {
  margin: 0 0 4px;
}
.md-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 10px 0 12px;
}
.md-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.md-checks small {
  color: #8a8094;
}
.md-form {
  display: grid;
  gap: 12px;
}
.md-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 12px;
}
.md-clave-campo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.md-clave-campo input {
  flex: 1;
}
#content .md-checks label {
  flex-direction: row;
  display: inline-flex;
  font-size: 14px;
}
#content .md-checks input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

/* Medidas de envío (Tienda Nube) */
.env-aviso {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdf0d8;
  color: #6e4800;
}
.env-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
}
.env-tabla td {
  vertical-align: top;
}
.env-tabla td small,
.env-vista td small {
  display: block;
  color: #6b5d7d;
  font-size: 12px;
}
.env-tabla th small {
  display: block;
  font-weight: 400;
  font-size: 11px;
}
.env-neto {
  display: grid;
  grid-template-columns: repeat(4, 4.2rem);
  gap: 4px;
}
#content .env-neto input {
  min-height: 0;
  padding: 4px 6px;
  font-size: 13px;
}
.env-emb select {
  max-width: 17rem;
  font-size: 13px;
}
.env-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: 12px;
}
.env-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #ece4f6;
}
.env-estado {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.env-estado.gris {
  background: #eeeaf2;
  color: #6b5d7d;
}
.env-estado.ambar {
  background: #fdf0d8;
  color: #8a5a00;
}
.env-estado.verde {
  background: #e3f3e6;
  color: #22663a;
}
.env-regla {
  display: grid;
  gap: 12px;
}
.env-ok {
  color: #22663a;
  font-weight: 600;
}
.material-embalaje {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px dashed #cbb9dc;
  border-radius: 10px;
}
.material-embalaje-ayuda {
  margin: 4px 0 8px;
  font-size: 12px;
}
/* Medidas de envío: todo entra en la pantalla, sin barra para el costado */
#content .env-tabla {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
#content .env-tabla th,
#content .env-tabla td {
  white-space: normal;
  overflow-wrap: break-word;
  padding: 8px 6px;
}
#content .env-tabla th:nth-child(1) { width: 19%; }
#content .env-tabla th:nth-child(2) { width: 20%; }
#content .env-tabla th:nth-child(3) { width: 24%; }
#content .env-tabla th:nth-child(4) { width: 13%; }
#content .env-tabla th:nth-child(5) { width: 12%; }
#content .env-tabla th:nth-child(6) { width: 12%; }
.env-neto {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#content .env-neto input {
  width: 100%;
  min-width: 0;
  padding: 4px 3px;
}
#content .env-emb select {
  width: 100%;
  max-width: none;
}
.env-emb .text-button {
  font-size: 12px;
  text-align: left;
}
.env-estado {
  white-space: normal;
}
.material-embalaje-mark {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #e6eef8;
  color: #2c4f7a;
  font-size: 11px;
  white-space: nowrap;
}
/* En "Nuevo embalaje de envío" la sección de medidas va arriba de todo para que se vea */
.material-embalaje.destacado {
  border-style: solid;
  border-color: #675582;
  background: #faf8fd;
}
/* Embalaje de envío: foto al lado de nombre y categoría */
.material-cab-embalaje {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 12px;
}
.material-cab-foto {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.material-cab-foto .material-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.material-cab-foto #material-photo-preview {
  width: 180px;
  min-height: 120px;
  margin: 0;
  border: 1px dashed #cbb9dc;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.material-cab-foto #material-photo-preview:empty::after {
  content: 'Sin foto';
  color: #8a8094;
  font-size: 12px;
}
.material-cab-foto #material-photo-preview img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
}
.material-cab-datos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 12px;
  align-content: start;
}
@media (max-width: 640px) {
  .material-cab-embalaje {
    grid-template-columns: 1fr;
  }
}
.env-doble,
.material-embalaje-doble {
  display: block;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fdecea;
  color: #8a2b1d;
  font-size: 12px;
  line-height: 1.35;
}
.ficha-envio-emb small,
.ficha-envio small {
  color: #6b5d7d;
}
.ficha-envio {
  margin: 4px 0 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e6eef8;
  color: #2c4f7a;
  font-size: 14px;
}

/* Insumos: listado de embalajes de envío */
dialog:has(.emb-lista) {
  width: min(1000px, calc(100vw - 32px));
}
.emb-lista td {
  vertical-align: middle;
}
.emb-lista td small {
  display: block;
  color: #6b5d7d;
  font-size: 12px;
}
.emb-lista-foto {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: #f3eff8;
}
.emb-sin-stock {
  color: #a35b00;
  font-weight: 600;
}

/* Ventas directas */
.vd-aviso {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fdf0d8;
  color: #6e4800;
}
.vd-aviso.tn {
  background: #e6eef8;
  color: #2c4f7a;
}
.vd-canales {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.vd-canales > div {
  display: grid;
  gap: 2px;
  padding: 6px 12px;
  border: 1px solid #e3dcef;
  border-radius: 10px;
  background: #faf8fd;
}
.vd-canales span {
  font-size: 12px;
  color: #6b5d7d;
}
#content .vd-tabla {
  table-layout: fixed;
  width: 100%;
}
#content .vd-tabla td {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: break-word;
}
.vd-tabla td small {
  display: block;
  color: #6b5d7d;
  font-size: 12px;
}
.vd-tabla th:nth-child(1) { width: 12%; }
.vd-tabla th:nth-child(2) { width: 14%; }
.vd-tabla th:nth-child(3) { width: 26%; }
.vd-tabla th:nth-child(4) { width: 10%; }
.vd-tabla th:nth-child(5) { width: 11%; }
.vd-tabla th:nth-child(6) { width: 11%; }
.vd-tabla th:nth-child(7) { width: 16%; }
.vd-anulada td {
  opacity: 0.55;
  text-decoration: line-through;
}
.vd-anulada td:last-child {
  text-decoration: none;
}
.vd-tag-anulada {
  color: #8a2b1d !important;
  font-weight: 600;
}
.vd-cobrada {
  color: #22663a;
  font-weight: 600;
}
.vd-pendiente {
  color: #a35b00;
  font-weight: 600;
}
.vd-tn {
  margin-top: 4px;
  color: #8a5a00 !important;
}
.vd-acciones button {
  margin: 0 4px 4px 0;
}
dialog:has(.vd-form) {
  width: min(900px, calc(100vw - 32px));
}
.vd-form {
  display: grid;
  gap: 12px;
}
.vd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 12px;
  align-items: end;
}
.vd-bloque {
  padding: 10px 12px;
  border: 1px solid #e3dcef;
  border-radius: 10px;
}
.vd-bloque legend {
  padding: 0 6px;
  font-weight: 700;
}
.vd-agregar {
  display: flex;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}
.vd-agregar label {
  flex: 1;
}
#content .vd-num,
dialog .vd-num {
  width: 6.5rem;
  min-height: 0;
  padding: 4px 6px;
}
.vd-tienda {
  padding: 0 6px;
  border-radius: 999px;
  background: #e6eef8;
  color: #2c4f7a;
  font-size: 11px;
}
.vd-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}
.vd-check input {
  width: 18px;
  height: 18px;
}
.vd-total {
  text-align: right;
  font-size: 18px;
}
.vd-form [hidden] {
  display: none !important;
}

/* Venta directa: formulario por pasos, como el resto del panel */
.vd-form {
  gap: 14px;
}
.vd-paso {
  padding: 14px 16px 16px;
  border: 1px solid #e3dcef;
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.vd-paso:nth-of-type(even) {
  background: #faf8fd;
}
.vd-paso h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ece4f6;
  font-size: 16px;
  color: #372849;
}
.vd-paso h3 span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ece4f6;
  color: #675582;
  font-size: 13px;
  font-weight: 800;
}
.vd-paso h3 small {
  font-weight: 400;
  color: #8a8094;
}
.vd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vd-chip {
  position: relative;
  display: inline-flex !important;
  flex-direction: row !important;
  cursor: pointer;
}
.vd-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.vd-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #cbb9dc;
  border-radius: 999px;
  background: #fff;
  color: #4a3d5e;
  font-size: 14px;
  font-weight: 600;
}
.vd-chip span::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 1.5px solid #b9a3d3;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}
.vd-chip input:checked + span {
  border-color: #675582;
  background: #675582;
  color: #fff;
}
.vd-chip input:checked + span::before {
  content: '✓';
  border-color: #fff;
  background: #fff;
  color: #675582;
}
.vd-chip input:focus-visible + span {
  outline: 2px solid #372849;
  outline-offset: 2px;
}
.vd-extra:has(> label:not([hidden])) {
  margin-top: 2px;
}
.vd-subgrupo {
  display: grid;
  gap: 6px;
}
.vd-rotulo {
  font-size: 13px;
  color: #6b5d7d;
}
.vd-costo-envio {
  max-width: 16rem;
}
.vd-ayuda {
  margin: 0;
  font-size: 13px;
  color: #6b5d7d;
}
.vd-msg {
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.vd-msg.error {
  background: #fdecea;
  color: #8a2b1d;
}
.vd-msg.ok {
  background: #e3f3e6;
  color: #22663a;
}
.vd-lineas thead th {
  background: #ece4f6;
}
.vd-lineas td {
  vertical-align: middle;
}
.vd-pie {
  position: sticky;
  bottom: -1px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid #b9a3d3;
  border-radius: 14px;
  background: #ddd0ee;
  box-shadow: 0 -4px 14px rgba(55, 40, 73, 0.12);
}
.vd-pie .form-error {
  flex: 1 1 100%;
  margin: 0;
}
.vd-pie .form-error:empty {
  display: none;
}
.vd-pie .vd-total {
  font-size: 15px;
}
.vd-pie .vd-total b {
  margin-left: 8px;
  font-size: 22px;
}
/* Ventas directas: borradores y montos sin cortar */
.vd-aviso.borrador {
  background: #ece4f6;
  color: #4a3d5e;
}
#content .vd-tabla td.vd-monto {
  white-space: nowrap;
}
.vd-borrador td {
  background: #faf8fd;
}
.vd-tag-borrador {
  display: inline-block !important;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #ece4f6;
  color: #675582 !important;
  font-weight: 600;
}

/* Tipos de mazo › Ver mazos: idioma y guía editables */
.deck-mazos select {
  min-height: 0;
  padding: 4px 6px;
  font-size: 13px;
}
.deck-guia {
  text-align: center;
}
.deck-guia input {
  width: 18px;
  height: 18px;
}
.deck-mazos tr.guardado td {
  background: #e3f3e6;
  transition: background 0.3s;
}
.deck-nota {
  margin-top: 8px;
  font-size: 12px;
  color: #6b5d7d;
}
dialog:has(.deck-mazos) {
  width: min(900px, calc(100vw - 32px));
}
#content .material-guia {
  align-self: end;
}

/* Guidebooks creados */
.gc-barra {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.gc-buscar {
  flex: 1 1 18rem;
  max-width: 28rem;
}
.gc-resumen {
  color: #6b5d7d;
}
.gc-carpeta {
  margin: 10px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.gc-seccion h2 small,
.gc-seccion summary small {
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: #ece4f6;
  color: #675582;
  font-size: 13px;
}
.gc-seccion summary {
  cursor: pointer;
  list-style: none;
}
.gc-seccion summary h2 {
  display: inline;
}
.gc-grilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 14px;
}
.gc-guia {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #e3dcef;
  border-radius: 12px;
  background: #fff;
}
.gc-guia[hidden] {
  display: none;
}
.gc-tapa {
  display: block;
  align-self: start;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ece4f6;
  box-shadow: 0 3px 10px rgba(55, 40, 73, 0.12);
  background: #faf8fd;
  aspect-ratio: 210 / 297;
}
.gc-tapa img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gc-info {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}
.gc-info h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.gc-datos,
.gc-mazo {
  margin: 0;
  font-size: 12px;
  color: #6b5d7d;
}
.gc-mazo a {
  color: #675582;
  font-weight: 600;
  text-decoration: none;
}
.gc-mazo.sin {
  font-style: italic;
}
.gc-etiquetas {
  margin: 2px 0 0;
}
.gc-eti {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f3eff8;
  color: #6b5d7d;
  font-size: 11px;
}
.gc-eti.dijital {
  background: #e3f3e6;
  color: #22663a;
  font-weight: 600;
}
.gc-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.gc-acciones a.secondary {
  padding: 5px 12px;
  font-size: 13px;
}
.gc-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gc-abrir-panel {
  display: grid !important;
  gap: 2px;
  text-align: left;
}
.gc-abrir-panel small {
  font-weight: 400;
  color: #6b5d7d;
}
#content .gc-pagina > .panel {
  padding: 16px 18px;
  margin-bottom: 16px;
}
.gc-seccion h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.gc-ayuda {
  margin: -6px 0 12px;
}
.gc-falta {
  border-color: #ecd9a8;
  background: #fffcf3;
}
.gc-falta h2 {
  color: #8a6416;
}
.gc-eti.falta {
  background: #fbefd2;
  color: #8a6416;
  font-weight: 600;
}
.category-reference-grid .cat-listar {
  margin-left: auto;
  padding: 4px 12px;
  font-size: 13px;
  flex: none;
}
.cat-cod-resumen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.cat-cod-resumen > div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5effa;
  border: 1px solid #d7c9e4;
}
.cat-cod-resumen small {
  color: #6b5d7d;
  font-size: 12px;
}
.cat-cod-resumen b {
  font-size: 18px;
  color: #3e2f4f;
  overflow-wrap: anywhere;
}
.cat-cod-resumen .bien {
  background: #e3f3e6;
  border-color: #b9dcc1;
}
.cat-cod-resumen .mal {
  background: #fbefd2;
  border-color: #ecd9a8;
}
.cat-cod-resumen .mal b {
  color: #8a6416;
  font-size: 15px;
}
.cat-cod-lista tr.cat-cod-repetido td {
  background: #fffcf3;
}
.cat-cod-aviso {
  color: #8a6416;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 550px) {
  .cat-cod-resumen {
    grid-template-columns: 1fr;
  }
}
.cat-cod {
  padding: 4px 24px 20px;
}
.cat-cod .cat-cod-resumen b {
  font-size: 16px;
}
.cat-cod .cat-cod-resumen .mal b {
  font-size: 14px;
}
.cat-cod-lista {
  border: 1px solid #e3dcef;
  border-radius: 10px;
}
.cat-cod-lista table {
  font-size: 14px;
}
.cat-cod-lista th,
.cat-cod-lista td {
  padding: 8px 12px;
  border-bottom: 1px solid #e3dcef;
}
.cat-cod-lista tbody tr:last-child td {
  border-bottom: 0;
}
.cat-cod-lista tbody tr:nth-child(even) td {
  background: #faf8fd;
}
.cat-cod-lista td button {
  padding: 4px 12px;
  font-size: 13px;
}

/* Resumen después de actualizar desde Tiendanube */
.sync-resumen {
  display: grid;
  gap: 18px;
  padding: 4px 24px 20px;
}
.sync-resumen h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.sync-resumen h3 small {
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: #ece4f6;
  color: #675582;
  font-size: 13px;
}
.sync-resumen table {
  font-size: 14px;
}
.sync-resumen th,
.sync-resumen td {
  padding: 7px 12px;
  border-bottom: 1px solid #e3dcef;
}
.sync-resumen tr.baja td:last-child {
  color: #9a3b2e;
}
.sync-resumen tr.sube td:last-child {
  color: #22663a;
}
.sync-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.sync-msg {
  margin: 8px 0 0;
  font-weight: 600;
}
.sync-nuevos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.sync-nuevos li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #ecd9a8;
  border-radius: 10px;
  background: #fffcf3;
}
.sync-nuevos li div {
  display: grid;
  gap: 2px;
}
.sync-nuevos small {
  color: #6b5d7d;
}

.marketing-tabs[hidden] {
  display: none !important;
}

/* Marketing › Resultados de campaña */
.mr {
  display: grid;
  gap: 16px;
  padding: 4px 24px 22px;
}
.mr-sec {
  padding: 14px 16px;
  border: 1px solid #e3dcef;
  border-radius: 12px;
  background: #fff;
}
.mr-sec h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.mr-sec h3 small {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #6b5d7d;
}
.mr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 10px 14px;
  align-items: end;
}
.mr-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  grid-column: 1 / -1;
  margin-top: 4px;
}
.mr-msg {
  color: #594366;
  font-weight: 600;
  font-size: 14px;
}
.mr-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.mr-kpis article {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5effa;
  border: 1px solid #d7c9e4;
}
.mr-kpis small,
.mr-kpis span {
  color: #6b5d7d;
  font-size: 12px;
}
.mr-kpis b {
  font-size: 20px;
  color: #3e2f4f;
}
.mr-kpis .bien {
  background: #e3f3e6;
  border-color: #b9dcc1;
}
.mr-kpis .baja {
  background: #fbefd2;
  border-color: #ecd9a8;
}
.mr-entrega-form {
  display: grid;
  grid-template-columns: minmax(14rem, 2fr) 6rem minmax(10rem, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.mr-sec table {
  font-size: 14px;
}
.mr-sec th,
.mr-sec td {
  padding: 7px 10px;
  border-bottom: 1px solid #e3dcef;
}
.mr-sec td small {
  display: block;
  color: #6b5d7d;
  font-size: 12px;
}
.mr-alerta {
  color: #8a6416;
  font-weight: 600;
}
.mr-total {
  margin: 8px 0 0;
  text-align: right;
}
.mr-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.mr-capturas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}
.mr-capturas figure {
  margin: 0;
  display: grid;
  gap: 4px;
  justify-items: center;
}
.mr-capturas img {
  width: 110px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d7c9e4;
}
.mr-subir {
  display: grid;
  place-items: center;
  width: 130px;
  min-height: 150px;
  padding: 10px;
  text-align: center;
  border: 2px dashed #c8b6dc;
  border-radius: 10px;
  background: #faf8fd;
  color: #594366;
  font-weight: 600;
  cursor: pointer;
}
.mr-metricas {
  margin-top: 12px;
}
.mr-leido {
  background: #fff8e3;
  border-color: #e3c56f;
}
.mkt-kpis {
  color: #594366;
  font-weight: 600;
}
@media (max-width: 760px) {
  .mr-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mr-entrega-form {
    grid-template-columns: 1fr 1fr;
  }
  .mr-entrega-form .mr-prod {
    grid-column: 1 / -1;
  }
}

#modal:has(.mr) {
  width: min(980px, 96vw);
  max-width: 96vw;
}
.mr-kpis {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}
.mr .table-wrap {
  overflow-x: auto;
}
.mr-entrega-form {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}
.mr-entrega-form .mr-prod {
  grid-column: span 2;
}

/* Calendario de marketing: campañas como franjas de color e inversión del mes */
.marketing-calendar .mkt-cal-camp {
  display: block;
  width: 100%;
  margin: 2px 0;
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  text-align: left;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  color: #2f2440;
}
.mkt-cal-camp b {
  display: block;
  font-size: 12px;
}
.mkt-cal-camp small {
  display: block;
  font-size: 11px;
  opacity: 0.85;
}
.mkt-color-1 { background: #e6dbf3; }
.mkt-color-2 { background: #f6e7c1; }
.mkt-color-3 { background: #d9eedf; }
.mkt-color-4 { background: #f7d9dd; }
.mkt-color-5 { background: #d8e6f5; }
.mkt-punto {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.mkt-mes {
  margin-top: 16px;
}
.mkt-mes h3 small {
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #ece4f6;
  color: #3e2f4f;
  font-size: 14px;
}
.mkt-mes-redes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.mkt-mes-redes span {
  display: grid;
  padding: 6px 12px;
  border-radius: 10px;
  background: #f5effa;
  border: 1px solid #d7c9e4;
}
.mkt-mes-redes small {
  color: #6b5d7d;
  font-size: 12px;
}
.mkt-mes td small {
  display: block;
  color: #6b5d7d;
}
.mkt-thumb {
  display: inline-block;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid #d7c9e4;
}

/* Ficha de campaña y ventana de Resultados: cada sector con su color, para no mezclar la información */
#marketing-form .mkt-form-block,
.mr > .mr-sec {
  border-left-width: 6px;
  border-left-style: solid;
}
#marketing-form .mkt-form-block:nth-of-type(5n + 1),
.mr > .mr-sec:nth-of-type(5n + 1) {
  background: #f7f2fc;
  border-color: #d9c9ec;
  border-left-color: #8c6bb1;
}
#marketing-form .mkt-form-block:nth-of-type(5n + 2),
.mr > .mr-sec:nth-of-type(5n + 2) {
  background: #fdf8ea;
  border-color: #efdfb3;
  border-left-color: #c9a227;
}
#marketing-form .mkt-form-block:nth-of-type(5n + 3),
.mr > .mr-sec:nth-of-type(5n + 3) {
  background: #fcf1f3;
  border-color: #efd0d6;
  border-left-color: #c26a7e;
}
#marketing-form .mkt-form-block:nth-of-type(5n + 4),
.mr > .mr-sec:nth-of-type(5n + 4) {
  background: #eff8f1;
  border-color: #c8e3cf;
  border-left-color: #4f9a68;
}
#marketing-form .mkt-form-block:nth-of-type(5n + 5),
.mr > .mr-sec:nth-of-type(5n + 5) {
  background: #eef5fb;
  border-color: #c9dcee;
  border-left-color: #4f7fae;
}
#marketing-form .mkt-form-block > h3,
.mr > .mr-sec > h3 {
  color: #3e2f4f;
}
.mr > .mr-sec input,
.mr > .mr-sec select,
#marketing-form .mkt-form-block input,
#marketing-form .mkt-form-block select,
#marketing-form .mkt-form-block textarea {
  background: #fff;
}

/* Marketing › Campañas en tarjetas */
.mkt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  gap: 14px;
  margin-top: 14px;
}
.mkt-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e3dcef;
  border-left: 6px solid #8c6bb1;
  border-radius: 14px;
  background: #fff;
  min-width: 0;
}
.mkt-card header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
.mkt-card header > div {
  min-width: 0;
}
.mkt-card-img {
  flex: none;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d7c9e4;
}
.mkt-card-img.vacia {
  display: grid;
  place-items: center;
  background: #f5effa;
  color: #b49ad3;
  font-size: 24px;
}
.mkt-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #3e2f4f;
  overflow-wrap: anywhere;
}
.mkt-card header p {
  margin: 2px 0 0;
  color: #6b5d7d;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.mkt-card-meta .pill {
  font-size: 12px;
}
.mkt-card-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mkt-card-kpis span {
  display: grid;
  padding: 6px 12px;
  border-radius: 10px;
  background: #f5effa;
  font-size: 12px;
  color: #6b5d7d;
}
.mkt-card-kpis b {
  font-size: 17px;
  color: #3e2f4f;
}
.mkt-card-plata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed #e3dcef;
}
.mkt-card-plata span {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.mkt-card-plata small {
  color: #6b5d7d;
  font-size: 12px;
}
.mkt-card-plata b {
  font-size: 15px;
  color: #3e2f4f;
}
.mkt-card-plata .pendiente {
  color: #8a6416;
  font-size: 13px;
}
.mkt-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Usuarios: campos de vendedor ocultos para administración y botón eliminar */
.user-comision[hidden] {
  display: none !important;
}
.user-comision {
  display: contents;
}
.user-delete {
  color: #9a3b2e;
  border-color: #e6c3bd;
}
.confirmar-borrado {
  padding: 4px 24px 20px;
}
.confirmar-borrado .danger {
  background: #9a3b2e;
  border-color: #9a3b2e;
  color: #fff;
}

/* Campañas: próximas arriba, finalizadas abajo */
.mkt-grupo {
  margin-top: 18px;
}
.mkt-grupo > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 18px;
}
.mkt-grupo > h3 small {
  padding: 1px 10px;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
}
.mkt-grupo-proximas > h3 {
  background: #ede3f8;
  color: #4b3566;
}
.mkt-grupo-hechas {
  margin-top: 28px;
}
.mkt-grupo-hechas > h3 {
  background: #eef0ec;
  color: #4d5a4f;
}
.mkt-card-hecha {
  border-left-color: #9aa79c;
  background: #fbfbf9;
}
.mkt-card-activa {
  border-left-color: #4f9a68;
}
.mkt-en-curso {
  background: #e3f3e6;
  color: #22663a;
  font-weight: 700;
}

/* Ficha de campaña › Productos de la promoción */
.mkt-sub {
  margin: 14px 0 4px;
  font-size: 15px;
  color: #594366;
}
.mkt-promo-tabla table {
  font-size: 14px;
}
.mkt-promo-tabla th,
.mkt-promo-tabla td {
  padding: 7px 10px;
  border-bottom: 1px solid #e3dcef;
  background: #fff;
}
.mkt-promo-tabla td small {
  display: block;
  color: #6b5d7d;
  font-size: 12px;
}
.mkt-tipo {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.mkt-tipo-kit { background: #ede3f8; color: #4b3566; }
.mkt-tipo-producto { background: #e3f3e6; color: #22663a; }
.mkt-tipo-insumo { background: #fbefd2; color: #8a6416; }
.mkt-promo-agregar {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) minmax(14rem, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.mkt-promo-msg {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #594366;
}
.mkt-promo-resumen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.mkt-promo-resumen span {
  display: grid;
  padding: 6px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #efdfb3;
}
.mkt-promo-resumen small {
  color: #6b5d7d;
  font-size: 12px;
}
.mkt-manual {
  margin: 10px 0;
}
.mkt-manual summary {
  cursor: pointer;
  color: #6b5d7d;
  font-size: 13px;
}
@media (max-width: 700px) {
  .mkt-promo-agregar {
    grid-template-columns: 1fr;
  }
}

/* Carritos abandonados de Tiendanube */
.ct-panel { margin-bottom: 24px; }
.ct-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ct-head h2 { margin: 0 0 4px; }
.ct-subtitulo { margin: 8px 0 12px; font-size: 1.15rem; }
.ct-filtros { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.ct-lista { display: grid; gap: 14px; }
.ct-card { display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.ct-card.is-done { opacity: 0.72; }
.ct-fotos { display: grid; gap: 6px; align-content: start; }
.ct-fotos img, .ct-sinfoto { width: 132px; height: 132px; object-fit: cover; border-radius: 10px; background: var(--sage); display: grid; place-items: center; font-size: 2rem; }
.ct-fotos img + img { width: 63px; height: 63px; }
.ct-fotos { grid-template-columns: repeat(2, 63px); }
.ct-fotos > :first-child { grid-column: 1 / -1; }
.ct-info { display: grid; gap: 6px; min-width: 0; }
.ct-info small { color: var(--muted); overflow-wrap: anywhere; }
.ct-titulo { display: flex; justify-content: space-between; gap: 12px; font-size: 1.05rem; }
.ct-total { font-weight: 700; color: var(--ink); white-space: nowrap; }
.ct-productos { margin: 4px 0; padding-left: 18px; }
.ct-productos li span { color: var(--muted); }
.ct-etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-etiquetas span { font-size: 0.78rem; padding: 3px 9px; border-radius: 999px; background: var(--sage); color: var(--ink); }
.ct-etiquetas .ct-warn, .ct-warn { background: var(--rose); color: #8a5a1c; }
.ct-etiquetas .ct-ok { background: #e3f1e6; color: #2f6b3c; }
.ct-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ct-acciones button[disabled] { opacity: 0.45; cursor: not-allowed; }
.ct-mensajes { display: grid; gap: 10px; margin-top: 8px; padding: 12px; border-radius: 10px; background: var(--paper); }
.ct-mensajes textarea, .ct-editor textarea { width: 100%; font-family: inherit; }
.ct-editor { margin: 12px 0; display: grid; gap: 10px; }
.ct-editor-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) {
  .ct-card { grid-template-columns: 1fr; }
  .ct-fotos img:first-child, .ct-sinfoto { width: 100%; height: 180px; }
  .ct-editor-cols { grid-template-columns: 1fr; }
}
.ct-mensajes h4 { margin: 0; font-size: 0.95rem; color: var(--ink); }
.ct-seguimiento:empty { display: none; }
.ct-seguimiento .marketing-editor { margin: 10px 0 0; box-shadow: none; border: 1px solid var(--line); }
.ct-card > .ct-mensajes, .ct-card > .ct-seguimiento { grid-column: 1 / -1; }
.ct-wa-solapas { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-enviado { margin: 0; color: #2f6b3c; font-weight: 600; }

/* Resumen: ventas de hoy y carritos abandonados arriba de todo */
.hoy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; margin-bottom: 22px; }
.hoy-panel { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hoy-total { font-size: 2.6rem; color: var(--ink); line-height: 1.1; }
.hoy-lista { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; max-height: 330px; overflow-y: auto; }
.hoy-lista li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.hoy-lista li > span:first-child { display: grid; gap: 3px; min-width: 0; }
.hoy-lista small { color: var(--muted); overflow-wrap: anywhere; }
.hoy-monto { display: grid; justify-items: end; align-content: start; font-weight: 700; white-space: nowrap; color: var(--ink); }
.hoy-pagado { color: #2f6b3c !important; font-weight: 600; }
.hoy-pendiente { color: #8a5a1c !important; font-weight: 600; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ct-chip { font-size: 0.74rem; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); white-space: nowrap; }
.ct-chip.is-on { border-style: solid; border-color: #b9dcc1; background: #e3f1e6; color: #2f6b3c; }
.ct-baja { margin-left: auto; color: var(--muted); }
@media (max-width: 900px) { .hoy-grid { grid-template-columns: 1fr; } }
.hoy-panel { padding-bottom: 16px; }
.hoy-panel > :not(.panel-heading) { margin-left: 23px; margin-right: 23px; }
.hoy-panel > button.text-button { align-self: flex-start; }

/* Tarjeta de carrito: columna derecha con lo enviado (WhatsApp y mail 1 y 2) y la baja */
.ct-card { grid-template-columns: 132px minmax(0, 1fr) 250px; }
.ct-card.is-done { opacity: 1; }
.ct-estado { display: grid; gap: 10px; align-content: start; padding: 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.ct-est-fila { display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; align-items: center; }
.ct-est-canal { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.ct-est { display: grid; justify-items: center; padding: 6px 4px; border-radius: 10px; border: 1px dashed var(--line); background: #fff; color: var(--muted); }
.ct-est b { font-size: 1.25rem; line-height: 1.1; }
.ct-est small { font-size: 0.72rem; white-space: nowrap; }
.ct-est.is-on { border: 1px solid #9fd0ab; background: #e3f1e6; color: #2f6b3c; }
.ct-estado .ct-baja { width: 100%; margin: 4px 0 0; justify-content: center; }
@media (max-width: 900px) {
  .ct-card { grid-template-columns: 132px minmax(0, 1fr); }
  .ct-estado { grid-column: 1 / -1; }
}
@media (max-width: 700px) { .ct-card { grid-template-columns: 1fr; } }
.ct-card { grid-template-columns: 132px minmax(0, 1fr) 280px; }
.ct-est-canal { white-space: nowrap; }
@media (max-width: 900px) { .ct-card { grid-template-columns: 132px minmax(0, 1fr); } }
@media (max-width: 700px) { .ct-card { grid-template-columns: 1fr; } }
/* ¿Ya es cliente? */
.ct-cliente { padding: 8px 12px; border-radius: 10px; background: var(--sage); color: var(--ink); font-size: 0.92rem; }
.ct-cliente .text-button { margin-left: 6px; }
.ct-cliente.is-habitual { background: #f4ecd8; color: #6b5420; }
.ct-cliente.is-compro { background: #e3f1e6; color: #24572f; border: 1px solid #9fd0ab; }
.ct-despues td { background: #e3f1e6; }
.hoy-badge { font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #f4ecd8; color: #6b5420; margin-left: 4px; white-space: nowrap; }
.hoy-badge.is-compro { background: #e3f1e6; color: #24572f; }
/* Sello de cliente en la columna derecha del carrito */
.ct-sello { display: grid; gap: 2px; justify-items: center; width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font: inherit; }
.ct-sello b { font-size: 1.05rem; }
.ct-sello small { color: inherit; opacity: 0.8; font-size: 0.78rem; }
.ct-sello[disabled] { cursor: default; color: var(--muted); }
.ct-sello.is-habitual { background: #f4ecd8; border-color: #e0cd9c; color: #6b5420; }
.ct-sello.is-compro { background: #e3f1e6; border-color: #9fd0ab; color: #24572f; }
/* Ojito de contraseña en campos que no lo traían (ingreso, Mandarina) */
.ojito-field { width: 100%; }
.ojito-field input { width: 100%; padding-right: 46px; }
