/*
 * SmartOrder overrides, loaded after the Cuba theme stylesheets.
 * Brand tokens and the accessibility fixes the theme does not ship:
 * WCAG AA contrast, visible keyboard focus and reduced motion.
 */
:root {
  /*
   * Palette: Cuba theme base (primary #7366FF, secondary #838383, success
   * #65C15C, info #40B8F5, warning #FFB829, danger #FC564A). Exact values
   * are used for fills, soft backgrounds, borders and gradients; where text
   * sits on or is drawn in a colour, a darker step of the same hue keeps
   * WCAG AA (4.5:1). Ratios are against white unless noted.
   */
  --so-primary-fill: #7366ff;
  --so-primary-gradient: linear-gradient(26deg, #7366ff 0%, #a26cf8 100%);
  --so-primary-soft: #e8e5ff;
  /* White text on primary buttons: #7366ff is 4.1:1, this step is 4.7:1 */
  --theme-deafult: #6759ff;
  --so-primary: #6759ff;
  --so-primary-hover: #4635ff;
  /* Primary as text or outline: 5.7:1 on white, 4.6:1 on the soft lilac */
  --so-primary-text: #5545ff;
  --so-focus-ring: #5545ff;

  /* Secondary actions ("Seguir comprando"): #838383 is 3.8:1, this is 4.6:1 */
  --so-secondary: #757575;
  --so-secondary-hover: #636363;
  --so-secondary-soft: #f2f2f2;

  /* Status: exact hue for dots and soft fills, AA steps for text and buttons */
  --so-success-fill: #65c15c;
  --so-success: #398332;
  --so-success-hover: #2e6928;
  --so-success-soft: #dcf1da;
  --so-success-text: #33762d;
  --so-info-soft: #d5f5fe;
  --so-info-text: #0970a5;
  --so-warning-fill: #ffb829;
  --so-warning-soft: #fff7e5;
  --so-warning-text: #996600;
  --so-danger-fill: #fc564a;
  --so-danger-soft: #ffe8e6;
  --so-danger-text: #d21103;

  /* Text: subtitle #75758a is 4.2:1 on the page; this step is 5.4:1 there */
  --so-heading-text: #242934;
  --so-muted-text: #656577;

  /* Surfaces and hairlines */
  --so-divider: #e9edf1;
  /* Flat page colour behind the account pages; dark input edge (3.5:1 on dark cards);
     "inactive" status dot; landing nav accent (5.4:1 on white) */
  --so-page-bg: #f8f9fe;
  --so-input-border: #e9edf1;
  --so-status-off: #838383;
  --so-nav-accent: #047a45;
  --so-danger-text-on-dark: #ff8a80;
  --so-card-bg: #fff;
  --so-primary-tint: var(--so-primary-soft);
  --so-primary-tint-line: rgba(115, 102, 255, 0.25);
}

/*
 * Dark mode (body.dark-only, toggled by the theme). Cards are #262932 and the
 * page #1d1e26, so text tokens get light variants:
 * primary text 5.7:1, muted text 6.0:1, focus ring 5.7:1 on cards.
 */
body.dark-only {
  --so-primary-text: #9d95ff;
  --so-muted-text: #a3a6b0;
  --so-focus-ring: #9d95ff;
  --so-divider: #374558;
  --so-page-bg: #1d1e26;
  --so-input-border: #787d8e;
  --so-card-bg: #262932;
  --so-primary-tint: rgba(157, 149, 255, 0.14);
  --so-primary-tint-line: rgba(157, 149, 255, 0.3);
  --so-success-soft: #1f3a24;
  --so-success-text: #a8e0ad;
}

/*
 * Tailwind theme: it paints text from RGB-triplet variables. Scope the AA step to
 * the components that carry text so fills elsewhere keep the exact palette hue.
 * Sidebar links and outline buttons: primary text 5.7:1 (#5545ff); dark #9d95ff.
 */
:root {
  /* subtitles #75758a are 4.2:1 on the page; #656577 is 5.4:1 */
  --theme-body-sub-title-color: 101, 101, 119;
}

.sidebar-wrapper,
.btn-outline-primary {
  --theme-default: 85, 69, 255;
}

body.dark-only .sidebar-wrapper,
body.dark-only .btn-outline-primary {
  --theme-default: 157, 149, 255;
}

/* The theme's page title bleeds 27px past the page padding (4px beyond the viewport
   at 1440 px). Clip it so the page never scrolls sideways. */
.page-body-wrapper .page-body {
  overflow-x: clip;
}

/* Plain links and pagination: the theme's #7366ff text is 4.1:1; use the AA text step */
a,
a:hover {
  color: var(--so-primary-text);
}

.pagination .page-link {
  color: var(--so-primary-text);
}

.pagination .page-item.active .page-link {
  border-color: var(--so-primary);
  background-color: var(--so-primary);
  color: #fff;
}

/* Sidebar submenu links are drawn at 60% alpha (3.4:1) */
.sidebar-wrapper .sidebar-submenu li a:not(.active) {
  color: var(--so-muted-text) !important;
}

.sidebar-wrapper .sidebar-submenu li a:not(.active):hover {
  color: var(--so-primary-text) !important;
}

/* Header username subtitle: the theme draws it at 70% alpha (4.3:1) */
.page-wrapper .page-header .header-wrapper .nav-right.right-header ul li .profile-media .profile-content p {
  color: var(--so-muted-text);
}

/* The theme draws sidebar link text at 80% alpha (about 3.4:1); keep it opaque */
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links li a span {
  color: rgba(var(--theme-body-sub-title-color), 1);
}

/* Contrast ----------------------------------------------------------------- */

.btn-success,
.btn-success.disabled,
.btn-success:disabled {
  background-color: var(--so-success) !important;
  border-color: var(--so-success) !important;
}

.btn-success:hover,
.btn-success:active {
  background-color: var(--so-success-hover) !important;
  border-color: var(--so-success-hover) !important;
}

.badge-success {
  background-color: var(--so-success);
}

/* White badge text: palette danger #fc564a is 3.2:1, the text step is 5.9:1 */
.badge-danger {
  background-color: var(--so-danger-text);
}

.btn-primary.disabled,
.btn-primary:disabled {
  background-color: var(--so-primary) !important;
  border-color: var(--so-primary) !important;
}

.f-light {
  color: var(--so-muted-text);
}

.font-primary,
.txt-primary {
  color: var(--so-primary-text) !important;
}

.btn-outline-primary {
  color: var(--so-primary-text);
  border-color: var(--so-primary-text);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
  color: #fff;
  background-color: var(--so-primary) !important;
  border-color: var(--so-primary) !important;
}

body.dark-only .page-body a:not(.btn):not(.badge):not(.page-link):not(.nav-link):not(.dropdown-item) {
  color: var(--so-primary-text);
}

.product-price,
.sidebar-wrapper .sidebar-links a.active,
.sidebar-wrapper .sidebar-links a.active span {
  color: var(--so-primary-text) !important;
}

.sidebar-wrapper .sidebar-links a.active svg.stroke-icon {
  stroke: var(--so-primary-text) !important;
}

/* Theme dark inputs share the page colour and have no visible edge: 3.5:1 border */
body.dark-only .page-wrapper .page-body-wrapper .page-body .form-control {
  border-color: var(--so-input-border);
}

/* Keyboard focus: the theme removes outlines in many places ------------------ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--so-focus-ring) !important;
  outline-offset: 2px;
}

[role="button"] {
  cursor: pointer;
}

/* Skip link: first tab stop on app pages, visible only while focused */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  background-color: var(--so-primary);
  color: #fff;
  font-weight: 500;
  transform: translateY(-200%);
}

.skip-link:focus {
  color: #fff;
  transform: none;
}

/* The skip link target is focused programmatically; it needs no ring */
#main-content:focus,
#main-content:focus-visible {
  outline: none !important;
}

/* Icon actions in tables (Mis Clientes) and DataTables paging: 32px hit area */
.action a,
.dataTables_paginate .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}

@media (pointer: coarse) {
  .action a,
  .dataTables_paginate .page-link {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Browser surfaces ---------------------------------------------------------- */

::selection {
  background-color: rgba(115, 102, 255, 0.22);
}

/* Brand logos: templates pair logo.svg (.for-light) with logo-dark.svg (.for-dark);
   the theme shows one or the other from the body's dark-* class. */

/* Reduced motion: keep state changes, drop decorative movement ---------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .animated,
  [class*="animate__"],
  .loader-index span {
    animation: none !important;
  }

  .btn,
  .sidebar-link,
  .card {
    transition-duration: 0.01s !important;
  }
}

/* DataTables (Bootstrap 4 integration markup) ------------------------------------
   The Tailwind theme has no .row/.col-* nor the DataTables skin that places the
   length/search controls and the sort arrows, so they are laid out here. */

.dataTables_wrapper > .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.dataTables_wrapper > .row:last-child {
  margin-bottom: 0;
}

.dataTables_wrapper > .row > [class*="col-"] {
  width: auto;
  max-width: 100%;
}

.dataTables_wrapper > .row > .col-sm-12:only-child {
  width: 100%;
  overflow-x: auto;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  width: auto;
  margin: 0;
}

.dataTables_wrapper .dataTables_paginate .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  position: relative;
  padding-right: 2rem;
  cursor: pointer;
}

table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::before,
table.dataTable thead th.sorting_desc::after {
  position: absolute;
  right: 0.75rem;
  bottom: auto;
  display: block;
  font-size: 0.75rem;
  line-height: 1;
  opacity: 0.3;
}

table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_desc::before {
  top: calc(50% - 0.8em);
  right: 1.25rem;
  content: "\2191";
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
  top: calc(50% - 0.8em);
  right: 0.75rem;
  content: "\2193";
}

table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_desc::after {
  opacity: 1;
}

/* Responsive child-row control: room for the +/- icon before the first cell */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
  padding-left: 2.25rem !important;
}

/* Forms: Bootstrap help text is a fixed #6c757d (3.1:1 on dark cards) */
.form-text,
.form-text li {
  color: var(--so-muted-text);
}

/* The theme greys typed values (#898989, 3.5:1); use the form's text colour */
.page-body .form-control,
.page-body .form-select,
.page-body .theme-form input,
.page-body .theme-form textarea,
.page-body .theme-form select {
  color: inherit;
}

/* Checkboxes: 24px box (WCAG 2.5.8); the label stays part of the hit area */
.page-body .form-check-input {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0;
}

.page-body .form-check {
  min-height: 2rem;
  padding-left: 2.25rem;
}

.page-body .form-check .form-check-input {
  margin-left: -2.25rem;
}

/* Links inside forms (current file, password help) get a comfortable hit area */
.page-body form a:not(.btn) {
  display: inline-block;
  padding-block: 0.25rem;
}

/* The theme fixes checkboxes at 1em with !important (14px) */
.page-body .form-check-input[type="checkbox"] {
  width: 1.5rem !important;
  height: 1.5rem !important;
}

/* Django/crispy renders groups of checkboxes in a fieldset; the theme boxes it */
.page-body fieldset {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.page-body fieldset legend {
  float: none;
  width: auto;
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: inherit;
}

/* Product cards (templates/core/products/components/product_list.html) -------- */

/* Theme sets these spans to #898989 (3.5:1) and names to an unloaded Roboto */
.product-box .product-details span {
  color: var(--so-muted-text);
}

.product-box .product-details .product-name {
  margin: 5px 0 4px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.modal .product-box .product-details .product-name {
  font-size: 22px;
}

/* Equal-height cards per row */
.product-cards > div {
  display: flex;
}

.product-cards > div > .card {
  flex: 1 1 auto;
  width: 100%;
}

/* Code and package lines: the theme dims paragraphs to 80% opacity */
.product-box .product-details .product-meta {
  margin: 0;
  color: var(--so-muted-text);
  opacity: 1;
}

/* Business list (templates/core/business/components/business_list.html) -------
   A bordered board holds a list of compact business cards: initial on a
   per-business tone, contact rows with icons, totals led by the number, and a
   footer with the action on the right. */

/* Board: one bordered card groups the business list */
.business-board {
  border: 1px solid var(--so-divider);
}

.business-board .business-board__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--so-divider);
}

.business-board__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.business-board .business-board__body {
  padding: 1.5rem;
}

.business-board__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.business-board__list > li {
  display: flex;
}

/* Business card: brand cover with status, initials avatar, totals panel,
   labelled info rows and a footer action */
.business-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border-radius: 1rem;
  background-color: var(--so-card-bg);
  box-shadow: 0 6px 24px rgba(20, 20, 43, 0.08);
}

.business-card__cover {
  position: relative;
  height: 5.5rem;
  overflow: hidden;
  background: var(--so-primary-gradient);
}

/* Decorative circles, as in the reference card */
.business-card__cover::before,
.business-card__cover::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
}

.business-card__cover::before {
  top: -3.5rem;
  right: -2.5rem;
  width: 9rem;
  height: 9rem;
}

.business-card__cover::after {
  bottom: -2.5rem;
  left: 0.75rem;
  width: 5.5rem;
  height: 5.5rem;
}

.business-card__status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background-color: #fff;
  color: var(--so-heading-text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.business-card__status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--so-success-fill);
}

.business-card__status--off::before {
  background-color: var(--so-status-off);
}

.business-card__mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-self: center;
  width: 4.75rem;
  height: 4.75rem;
  margin-top: -2.375rem;
  border: 4px solid var(--so-card-bg);
  border-radius: 50%;
  background-color: var(--so-primary);
  color: #fff;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.business-card__identity {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 0;
  text-align: center;
}

.business-card__name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.business-card__identity .business-card__email {
  max-width: 100%;
  padding-block: 0.25rem;
  overflow: hidden;
  color: var(--so-muted-text);
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-card__identity .business-card__email:hover {
  color: var(--so-primary-text);
}

.business-card__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 1.125rem 1.25rem 0;
  padding: 0.75rem 0;
  border-radius: 0.75rem;
  background-color: var(--so-primary-tint);
}

.business-card__stats > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 0 0.5rem;
  text-align: center;
}

.business-card__stats > div + div {
  border-left: 1px solid var(--so-primary-tint-line);
}

.business-card__stats dt {
  margin-top: 0.125rem;
  color: var(--so-muted-text);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.business-card__stats dd {
  margin: 0;
  color: var(--so-primary-text);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.business-card__info {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 1rem;
  margin: 1.25rem 1.25rem 0;
}

.business-card__info > div {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: 0.75rem;
  align-items: center;
}

.business-card__icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background-color: var(--so-primary-tint);
  color: var(--so-primary-text);
}

.business-card__icon svg {
  width: 1rem;
  height: 1rem;
}

.business-card__info dt {
  color: var(--so-muted-text);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.business-card__info dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.business-card__info dd a {
  display: inline-block;
  padding-block: 0.25rem;
  color: inherit;
}

/* The dark-mode link rule (7-class selector) would turn these purple */
body.dark-only .page-body .business-card__identity .business-card__email {
  color: var(--so-muted-text) !important;
}

body.dark-only .page-body .business-card__info dd a {
  color: inherit !important;
}

.business-card__footer {
  display: flex;
  align-items: center;
  padding: 1.25rem;
}

.business-card__footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.business-card__footer .btn svg {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 575.98px) {
  .page-body .business-board .business-board__header {
    padding: 1rem;
  }

  .page-body .business-board .business-board__body {
    padding: 0.75rem;
  }

  .business-card__footer .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }
}

/* Error pages (templates/errors/base_error.html) ------------------------------ */

.error-page {
  min-height: 100vh;
  max-width: 34rem;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* The theme gives a bare .btn-lg square right corners (split-button style) */
.error-page .btn-lg {
  border-radius: 0.5rem;
}

.error-page__brand {
  margin-bottom: 3rem;
}

.error-page__code {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--so-muted-text);
  font-variant-numeric: tabular-nums;
}

.error-page__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

.error-page__text {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--so-muted-text);
  max-width: 60ch;
}

/* Account pages (templates/account/base.html) --------------------------------- */

/* The Tailwind theme paints a photo behind the login card; keep the flat page colour */
.login-card {
  background: var(--so-page-bg);
}

body.dark-only .login-card .login-main {
  background-color: var(--so-card-bg);
}

/* Theme greys (#898989, 3.5:1) and the #7366ff link colour (4.1:1) fall below AA on
   the account pages; text takes the app tokens, fills keep the palette hue */
.login-card .login-main .theme-form p {
  color: var(--so-muted-text);
}

.login-card .login-main .theme-form a:not(.btn),
.login-card .login-main a:not(.btn) {
  color: var(--so-primary-text);
}

/* Error text: palette danger #fc564a is 3.2:1 on white; use the AA step */
.txt-danger,
.login-card .login-main .txt-danger {
  color: var(--so-danger-text) !important;
}

body.dark-only .txt-danger,
body.dark-only .login-card .login-main .txt-danger {
  color: var(--so-danger-text-on-dark) !important;
}

/* Standalone text links on the account pages get a comfortable hit area */
.login-card .login-main .theme-form > p a {
  display: inline-block;
  padding-block: 0.375rem;
}

.login-card .login-main .form-check-input[type="checkbox"] {
  width: 1.5rem !important;
  height: 1.5rem !important;
  flex-shrink: 0;
}

.login-card .login-main h1.h4 {
  margin-bottom: 0.75rem;
}

.so-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.so-alert--error {
  background-color: var(--so-danger-soft);
  color: var(--so-danger-text);
}

.so-alert--info {
  background-color: var(--so-primary-soft);
  color: var(--so-primary-text);
}

.so-alert--warning {
  background-color: var(--so-warning-soft);
  color: var(--so-warning-text);
}


/* Mi plan ------------------------------------------------------------------ */

.mp {
  display: grid;
  gap: 1.25rem;
}

.mp--narrow {
  max-width: 52rem;
}

.mp-sub,
.mp-meta,
.mp-text {
  color: var(--so-muted-text);
  margin: 0.25rem 0 0;
}

.mp-meta {
  font-size: 0.875rem;
}

.mp-support {
  text-align: right;
}

.mp-support__link {
  color: var(--so-primary-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.mp [hidden] {
  display: none !important;
}

.mp-back {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
}

.mp-h {
  font-size: 1.125rem;
  margin: 0.5rem 0 0;
}

.mp-card {
  background: var(--so-card-bg);
  border: 1px solid var(--so-divider);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}

.mp-card h2,
.mp-card h3,
.mp-notice h2 {
  color: var(--so-heading-text);
  font-size: 1.25rem;
  margin: 0;
}

.mp-chip {
  background: var(--so-secondary-soft);
  border-radius: 999px;
  color: var(--so-heading-text);
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  padding: 0.125rem 0.625rem;
  vertical-align: middle;
  white-space: nowrap;
}

.mp-chip--ok {
  background: var(--so-success-soft);
  color: var(--so-success-text);
}

.mp-chip--info {
  background: var(--so-info-soft);
  color: var(--so-info-text);
}

.mp-chip--warning {
  background: var(--so-warning-soft);
  color: var(--so-warning-text);
}

.mp-notice {
  background: var(--so-card-bg);
  border: 1px solid var(--so-divider);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}

.mp-notice p {
  margin: 0.5rem 0 0;
}

.mp-notice--info {
  background: var(--so-info-soft);
  border-color: transparent;
  color: var(--so-info-text);
}

.mp-notice--warning {
  background: var(--so-warning-soft);
  border-color: transparent;
  color: var(--so-warning-text);
}

.mp-notice--danger {
  background: var(--so-danger-soft);
  border-color: transparent;
  color: var(--so-danger-text);
}

.mp-notice--info h2,
.mp-notice--warning h2,
.mp-notice--danger h2 {
  color: inherit;
}

.mp-notice .mp-meta {
  color: inherit;
}

.mp-notice__row {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.mp-notice__row > .btn {
  flex: none;
  white-space: nowrap;
}

.mp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.mp-pills li {
  background: var(--so-secondary-soft);
  border-radius: 999px;
  color: var(--so-heading-text);
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
}

.mp-plan {
  align-items: center;
  border-color: var(--so-primary-tint-line);
  box-shadow: 0 1px 2px rgba(36, 41, 52, 0.06), 0 10px 28px rgba(85, 69, 255, 0.1);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1.75rem 2rem;
}

.mp-plan .mp-price strong {
  color: var(--so-primary-text);
  font-size: 2.5rem;
}

.mp-plan__actions {
  display: grid;
  gap: 0.5rem;
  min-width: 12rem;
}

.mp-price {
  margin: 0.5rem 0 0;
}

.mp-price strong {
  color: var(--so-heading-text);
  font-size: 2rem;
  line-height: 1.2;
}

.mp-price span {
  color: var(--so-muted-text);
}

.mp-usage {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-usage__item {
  background: transparent;
  overflow-wrap: anywhere;
  padding: 1rem 1.25rem;
}

.mp-usage__item.is-near,
.mp-usage__item.is-full {
  background: var(--so-card-bg);
}

.mp-usage__item.is-near {
  border-color: var(--so-warning-fill);
}

.mp-usage__item.is-full {
  border-color: var(--so-danger-fill);
}

.mp-usage__label {
  color: var(--so-muted-text);
  margin: 0;
}

.mp-usage__count {
  margin: 0.25rem 0 0.5rem;
}

.mp-usage__count strong {
  color: var(--so-heading-text);
  font-size: 1.75rem;
}

.mp-usage__count span {
  color: var(--so-muted-text);
}

.mp-usage__note {
  color: var(--so-muted-text);
  font-size: 0.875rem;
  margin: 0.5rem 0 0;
}

.mp-usage__item.is-near .mp-usage__note {
  color: var(--so-warning-text);
}

.mp-usage__item.is-full .mp-usage__note {
  color: var(--so-danger-text);
}

.mp-bar {
  appearance: none;
  background: var(--so-secondary-soft);
  border: 0;
  border-radius: 999px;
  display: block;
  height: 0.5rem;
  overflow: hidden;
  width: 100%;
}

.mp-bar::-webkit-progress-bar {
  background: var(--so-secondary-soft);
}

.mp-bar::-webkit-progress-value {
  background: var(--so-primary);
  border-radius: 999px;
}

.mp-bar::-moz-progress-bar {
  background: var(--so-primary);
  border-radius: 999px;
}

.mp-usage__item.is-near .mp-bar::-webkit-progress-value {
  background: var(--so-warning-fill);
}

.mp-usage__item.is-near .mp-bar::-moz-progress-bar {
  background: var(--so-warning-fill);
}

.mp-usage__item.is-full .mp-bar::-webkit-progress-value {
  background: var(--so-danger-fill);
}

.mp-usage__item.is-full .mp-bar::-moz-progress-bar {
  background: var(--so-danger-fill);
}

.mp-choices-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
}

.mp-toggle {
  background: var(--so-secondary-soft);
  border-radius: 999px;
  display: inline-flex;
  padding: 0.25rem;
}

.mp-toggle__btn {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--so-muted-text);
  cursor: pointer;
  font-weight: 600;
  min-height: 2.5rem;
  padding: 0 1.25rem;
}

.mp-toggle__btn.is-on {
  background: var(--so-card-bg);
  box-shadow: 0 1px 3px rgba(36, 41, 52, 0.15);
  color: var(--so-primary-text);
}

.mp-toggle__btn:focus-visible {
  outline: 2px solid var(--so-focus-ring);
  outline-offset: 2px;
}

.mp-choices {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mp-choice {
  display: grid;
  gap: 0.75rem;
}

.mp-choice.is-current {
  border-color: var(--so-primary);
}

.mp-choice h3 {
  font-size: 1.125rem;
}

.mp-checks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-checks li {
  margin-bottom: 0.375rem;
  padding-left: 1.5rem;
  position: relative;
}

.mp-checks li::before {
  color: var(--so-success-text);
  content: "✓";
  font-weight: 700;
  left: 0;
  position: absolute;
}

.mp-history h2 {
  margin-bottom: 1rem;
}

.mp-table-wrap {
  overflow-x: auto;
}

.mp-table {
  border-collapse: collapse;
  width: 100%;
}

.mp-table th {
  color: var(--so-muted-text);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.mp-table td {
  border-top: 1px solid var(--so-divider);
  padding: 0.75rem;
}

.mp-table .is-num {
  text-align: right;
  white-space: nowrap;
}

.mp-history__foot {
  border-top: 1px solid var(--so-divider);
  margin-top: 1rem;
  padding-top: 1rem;
}

.mp-step__head {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.mp-step__n {
  align-items: center;
  background: var(--so-primary);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.875rem;
  height: 1.75rem;
  justify-content: center;
  width: 1.75rem;
}

.mp-periods {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.mp-period {
  cursor: pointer;
  display: block;
  position: relative;
}

.mp-period input {
  opacity: 0;
  position: absolute;
}

.mp-period__box {
  border: 1px solid var(--so-divider);
  border-radius: 0.75rem;
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
}

.mp-period input:checked + .mp-period__box {
  background: var(--so-primary-tint);
  border-color: var(--so-primary);
}

.mp-period input:focus-visible + .mp-period__box {
  outline: 2px solid var(--so-focus-ring);
  outline-offset: 2px;
}

.mp-period__name {
  font-weight: 600;
}

.mp-period__price strong {
  font-size: 1.5rem;
}

.mp-period__hint {
  color: var(--so-muted-text);
  font-size: 0.875rem;
}

.mp-account {
  background: var(--so-page-bg);
  border-radius: 0.75rem;
  margin: 1rem 0 0.5rem;
  padding: 0.25rem 1rem;
}

.mp-account > div {
  align-items: center;
  display: grid;
  gap: 0.25rem 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.75rem 0;
}

.mp-account > div + div {
  border-top: 1px solid var(--so-divider);
}

.mp-account dt {
  color: var(--so-muted-text);
  font-size: 0.875rem;
  grid-column: 1;
}

.mp-account dd {
  color: var(--so-heading-text);
  font-weight: 600;
  grid-column: 1;
  margin: 0;
}

.mp-account button {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 2.75rem;
  min-width: 5.5rem;
}

.mp-amount-note {
  margin-top: 0;
}

.mp-linkbtn {
  background: none;
  border: 0;
  color: var(--so-primary-text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.mp-fields input[readonly] {
  background: var(--so-page-bg);
}

.mp-account__code {
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.mp-fields {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.mp-submit {
  margin: 0.5rem 0;
  width: 100%;
}

.mp-error {
  color: var(--so-danger-text);
  margin: 0.5rem 0 0;
}

@media (max-width: 991px) {
  .mp-usage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .mp-usage__item {
    padding: 0.875rem;
  }

  .mp-usage__count strong {
    font-size: 1.5rem;
  }
}

@media (max-width: 767px) {
  .mp-support {
    margin-top: 0.75rem;
    text-align: left;
  }

  .mp-notice__row,
  .mp-plan {
    align-items: stretch;
    flex-direction: column;
  }

  .mp-choices,
  .mp-periods,
  .mp-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .mp-plan {
    padding: 1.25rem;
  }

  .mp-plan__main h2 .mp-chip,
  .mp-notice h2 .mp-chip {
    display: block;
    margin: 0.5rem 0 0;
    width: fit-content;
  }

  .mp-table thead {
    display: none;
  }

  .mp-table tr {
    border-top: 1px solid var(--so-divider);
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem 0;
  }

  .mp-table td {
    border: 0;
    display: flex;
    justify-content: space-between;
    padding: 0.125rem 0;
  }

  .mp-table td::before {
    color: var(--so-muted-text);
    content: attr(data-label);
  }
}

.repeat-line--gone .product-name,
.repeat-line--gone td {
  color: var(--so-muted-text);
}

.repeat-line--gone .product-name {
  text-decoration: line-through;
}

.repeat-line__note {
  color: var(--so-muted-text);
  font-size: 0.8125rem;
  font-weight: 400;
}

/* Primary buttons hard-code #7366ff in the theme; use the AA-safe token */
.btn-primary {
  background-color: var(--so-primary) !important;
  border-color: var(--so-primary) !important;
}

.btn-primary:hover,
.btn-primary:active {
  background-color: var(--so-primary-hover) !important;
  border-color: var(--so-primary-hover) !important;
}

/* Order confirmation (templates/core/order/order-history.html) ---------------- */

.order-confirmation__status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--so-success-soft);
  color: var(--so-success-text);
}

.order-confirmation__status svg {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.order-confirmation__status h2 {
  color: inherit;
}

.order-confirmation__code {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.order-confirmation__thumb {
  object-fit: cover;
  border-radius: 0.375rem;
}

.order-confirmation__items td,
.order-confirmation__items th {
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.order-history .order-confirmation__items td,
.order-history .order-confirmation__items th {
  text-align: left;
}

.order-history .order-confirmation__items .text-end {
  text-align: right;
}

.order-confirmation__items .order-items__thumb {
  width: 64px;
}

/* Landing page (templates/pages/index.html) ------------------------------------ */

/* Theme greys (#777, #6f8ba4) and the #06e07f nav accent fall below 4.5:1 */
.center-text p,
.left-text p,
.features-small-item p,
.contact-text p {
  color: var(--so-muted-text);
}

.header-area .main-nav .nav li a:hover,
.header-area.header-sticky .nav li a.active {
  color: var(--so-nav-accent);
}

.contact-text a {
  color: var(--so-primary-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mini .mini-content .info h2 {
  color: #fff;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0.25px;
  margin-bottom: 30px;
}

/* Order line items (order.html, order-update.html) ---------------------------- */

/* The dark theme draws card-header paragraphs at 40% alpha (2.2:1) */
.order-card-header p,
.order-card-header p span {
  color: var(--so-muted-text) !important;
}

/* Order header: logo beside the order details (replaces the Bootstrap media object) */
.order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.5rem;
}

/* Supplier edit box (observations and status) */
.order-edit-box {
  margin-bottom: 1.5rem;
  padding: 1rem 1rem 0.25rem;
  border: 1px solid var(--so-divider);
  border-radius: 0.5rem;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.order-actions--start {
  justify-content: flex-start;
  margin-top: 1.5rem;
}

.order-items td,
.order-items th {
  font-variant-numeric: tabular-nums;
}

/* The theme forces order tables to 900px below 1200px; five columns fit without it */
.order-history table.order-items {
  width: 100%;
}

/* Phones: each line becomes a compact block instead of a 900px table */
@media (max-width: 767.98px) {
  .order-history.table-responsive {
    overflow: visible;
  }

  .order-items thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .order-items,
  .order-items tbody {
    display: block;
  }

  .order-items tbody tr {
    display: grid;
    grid-template-columns: 60px 1fr;
    column-gap: 0.75rem;
    row-gap: 0.125rem;
    padding: 0.875rem 0.25rem;
    border-bottom: 1px solid var(--so-divider);
  }

  /* The theme pads table cells with !important */
  .order-history .order-items td,
  .order-history .order-items th {
    display: block;
    padding: 0 !important;
    border: 0;
    text-align: left;
  }

  .order-items .order-items__thumb {
    grid-row: 1 / span 4;
  }

  .order-items .order-items__name .product-name {
    font-weight: 500;
  }

  /* Bootstrap's .text-end utility is !important; stacked lines read left to right */
  .order-history .order-items td.text-end,
  .order-history .order-items th.text-end {
    text-align: left !important;
  }

  .order-items td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--so-muted-text);
  }

  .order-items tbody tr.order-items__total {
    grid-template-columns: 1fr auto;
    border-bottom: 0;
  }

  .order-history .order-items tr.order-items__total th {
    text-align: left;
  }

  .order-actions {
    justify-content: stretch;
  }

  .order-actions .btn {
    flex: 1 1 100%;
    min-height: 44px;
  }
}

/* Dashboard (templates/core/dashboard.html) ------------------------------------ */

.dashboard__filter {
  margin-bottom: 1.5rem;
  max-width: 28rem;
}

.dashboard__filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dashboard__filter-controls .form-control {
  flex: 1 1 12rem;
}

.dashboard__section-title {
  margin: 0.5rem 0 1rem;
}

.dashboard__select {
  margin-bottom: 0.75rem;
}

.dashboard__hint {
  color: var(--so-muted-text);
  font-size: 0.8125rem;
  margin: 0.25rem 0 0;
}

.dashboard__change {
  color: var(--so-success-text);
  font-weight: 500;
}

.dashboard__change--down {
  color: var(--so-danger-text);
}

.dashboard__row {
  border-bottom: 1px solid var(--so-divider);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.dashboard__row:last-of-type {
  border-bottom: 0;
}

.dashboard__row-name {
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Dashboard widgets in the style of the theme's Logistics dashboard (widget-13): icon tile, label,
   figure and a footer line */
.dash-widget .card-body {
  padding: 1.25rem;
}

.dash-widget__top {
  align-items: center;
  display: flex;
  gap: 0.875rem;
}

.dash-widget__icon {
  align-items: center;
  border-radius: 0.5rem;
  display: flex;
  flex: none;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.dash-widget__icon svg {
  fill: currentColor;
  height: 1.5rem;
  width: 1.5rem;
}

.dash-widget__icon--stroke svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.dash-widget__icon--primary {
  background: var(--so-primary-soft);
  color: var(--so-primary-text);
}

.dash-widget__icon--secondary {
  background: var(--so-info-soft);
  color: var(--so-info-text);
}

.dash-widget__icon--success {
  background: var(--so-success-soft);
  color: var(--so-success-text);
}

.dash-widget__icon--warning {
  background: var(--so-warning-soft);
  color: var(--so-warning-text);
}

.dash-widget__icon--danger {
  background: var(--so-danger-soft);
  color: var(--so-danger-text);
}

.dash-widget__label {
  color: var(--so-muted-text);
  font-size: 0.875rem;
  margin: 0 0 0.125rem;
}

.dash-widget__value {
  color: var(--so-heading-text);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

.dash-widget__value--alert {
  color: var(--so-danger-text);
}

.dash-widget__foot {
  border-top: 1px solid var(--so-divider);
  color: var(--so-muted-text);
  font-size: 0.8125rem;
  margin: 1rem 0 0;
  padding-top: 0.75rem;
}

.dash-widget__foot strong {
  color: var(--so-heading-text);
}

.dashboard .dash-summary {
  color: var(--so-muted-text);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  gap: 0 0.875rem;
  margin: 0.25rem 0 0;
}

.dash-table {
  overflow-x: auto;
}

.dash-table .table {
  margin: 0;
  width: 100%;
}

.dash-table th,
.dash-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.dash-table th:first-child,
.dash-table td:first-child {
  padding-left: 1.25rem;
}

.dash-table th:last-child,
.dash-table td:last-child {
  padding-right: 1.25rem;
}

.dash-table .dash-table__num {
  text-align: right;
}

.dash-table .order-status {
  margin: 0;
}

.dash-more {
  color: var(--so-muted-text);
  font-size: 0.8125rem;
  margin: 0.75rem 1.25rem 0;
}

.dash-bars {
  align-items: flex-end;
  display: flex;
  gap: 3px;
  height: 11rem;
}

.dash-bars__col {
  align-items: flex-end;
  display: flex;
  flex: 1 1 0;
  height: 100%;
  min-width: 0;
}

.dash-bars__bar {
  background: var(--so-primary-fill);
  border-radius: 3px 3px 0 0;
  display: block;
  width: 100%;
}

.dash-bars__bar--empty {
  background: var(--so-divider);
  height: 3px !important;
}

.dash-bars__axis {
  color: var(--so-muted-text);
  display: flex;
  font-size: 0.75rem;
  justify-content: space-between;
  margin-top: 0.375rem;
}

.dash-kpis {
  border-top: 1px solid var(--so-divider);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 1rem 0 0;
  padding: 1rem 0 0;
}

.dash-kpis div {
  color: var(--so-muted-text);
  display: block;
  font-size: 0.8125rem;
}

.dash-kpis strong {
  color: var(--so-heading-text);
  display: block;
  font-size: 1.0625rem;
  font-weight: 500;
}

.dash-big {
  color: var(--so-heading-text);
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.dash-big small {
  color: var(--so-muted-text);
  font-size: 0.9375rem;
  font-weight: 400;
}

.dash-meter {
  background: var(--so-divider);
  border-radius: 999px;
  height: 0.5rem;
  margin-bottom: 0.625rem;
  overflow: hidden;
}

.dash-meter span {
  background: var(--so-success-fill);
  display: block;
  height: 100%;
}

.dash-sub {
  font-size: 0.9375rem;
  font-weight: 500;
  margin: 1rem 0 0.25rem;
}

.dashboard__row small {
  color: var(--so-muted-text);
  font-size: 0.75rem;
  font-weight: 400;
  margin-left: 0.25rem;
}

/* Filter: day stepper and quick chips, applied on change */
.dashboard__filter {
  max-width: none;
}

.dash-filter {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.dash-filter__field {
  min-width: 12rem;
}

.dash-filter__field .col-form-label {
  display: block;
  padding-top: 0;
}

.dash-days {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.dash-days .dash-days__date,
.dash-days .flatpickr-input.form-control {
  flex: none;
  width: 9.5rem;
}

/* Day chips and steps: same height as the date field, rectangular like the app's buttons */
/* display and padding carry !important: the theme forces its own on anchors inside forms */
.dashboard .dash-days a {
  align-items: center;
  background: var(--so-card-bg);
  border: 1px solid var(--so-input-border);
  border-radius: 0.5rem;
  color: var(--so-primary-text);
  display: inline-flex !important;
  font-size: 0.875rem;
  font-weight: 500;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-height: 2.75rem;
  padding: 0 1rem !important;
  text-decoration: none;
}

.dashboard .dash-days a:hover {
  background: var(--so-primary-tint);
}

.dashboard .dash-days a[aria-current="true"] {
  background: var(--so-primary-tint);
  border-color: var(--so-primary-text);
  box-shadow: inset 0 0 0 1px var(--so-primary-text);
  font-weight: 700;
}

.dashboard .dash-days .dash-days__step {
  font-size: 1.25rem;
  min-width: 2.75rem;
  padding: 0 !important;
}

.dash-filter__apply {
  min-height: 2.5rem;
}

/* Needs attention: the orders themselves, not just a count */
.dashboard .dash-attention__count {
  color: var(--so-heading-text);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1;
}

.dashboard .dash-attention__count--alert {
  color: var(--so-danger-text);
}

.dash-attention__head {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.dash-order {
  align-items: center;
  border-bottom: 1px solid var(--so-divider);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.625rem 0;
}

.dash-order:last-of-type {
  border-bottom: 0;
}

.dash-order__who {
  flex: 1;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dash-order__who small {
  color: var(--so-muted-text);
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
}

.dash-order a {
  flex: none;
  font-weight: 500;
}

/* More analysis: folded under what needs action */
.dash-more-analysis {
  margin-top: 0.5rem;
}

.dash-more-analysis > summary {
  align-items: center;
  background: var(--so-card-bg);
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  padding: 1rem 1.25rem;
}

.dash-more-analysis > summary::-webkit-details-marker {
  display: none;
}

.dash-more-analysis > summary::after {
  color: var(--so-primary-text);
  content: "Mostrar";
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: auto;
}

.dash-more-analysis[open] > summary::after {
  content: "Ocultar";
}

.dash-more-analysis__title {
  color: var(--so-heading-text);
  font-weight: 600;
}

.dash-more-analysis__hint {
  color: var(--so-muted-text);
  font-size: 0.875rem;
}

.dash-more-analysis__body {
  margin-top: 1rem;
}

/* The theme dims card-header text in dark mode (40% alpha); keep the AA steps there */
body.dark-only .dashboard .card .card-header .dash-summary,
body.dark-only .dashboard .card .card-header .dash-summary span {
  color: var(--so-muted-text);
}

body.dark-only .dashboard .card .card-header .dash-attention__count {
  color: var(--so-heading-text);
}

body.dark-only .dashboard .card .card-header .dash-attention__count--alert {
  color: var(--so-danger-text);
}

/* Client dashboard: stats and the main action on top, then rows of orders */
.dash-top {
  align-items: center;
  background: var(--so-card-bg);
  border-radius: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.dash-top__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
}

.dash-top__label {
  color: var(--so-muted-text);
  font-size: 0.875rem;
}

.dash-top__value {
  color: var(--so-heading-text);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.2;
}

.dash-top__hint {
  color: var(--so-muted-text);
  font-size: 0.8125rem;
}

.dash-top .dash-top__cta {
  min-height: 2.75rem;
}

.dash-order .order-status {
  flex: none;
  margin: 0;
}

.dash-due {
  font-weight: 500;
}

.dash-due--late {
  color: var(--so-danger-text);
}

.dash-due--today,
.dash-due--soon {
  color: var(--so-primary-text);
}

.dash-supplier h3 {
  font-size: 1.0625rem;
}

.dash-supplier__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (max-width: 575px) {
  .dash-top__cta {
    width: 100%;
  }
}

/* Unclosed old orders: listed apart, folded, never counted as work */
.dash-stale {
  margin-bottom: 1.5rem;
}

.dash-stale > summary {
  align-items: center;
  background: var(--so-card-bg);
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  padding: 0.875rem 1.25rem;
}

.dash-stale > summary::-webkit-details-marker {
  display: none;
}

.dash-stale > summary::after {
  color: var(--so-primary-text);
  content: "Mostrar";
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: auto;
}

.dash-stale[open] > summary::after {
  content: "Ocultar";
}

.dash-stale__title {
  color: var(--so-heading-text);
  font-weight: 600;
}

.dash-stale__hint {
  color: var(--so-muted-text);
  font-size: 0.875rem;
}

.dash-stale__body {
  background: var(--so-card-bg);
  border-radius: 0 0 0.5rem 0.5rem;
  margin-top: 2px;
  padding: 0.5rem 1.25rem 1rem;
}

/* Dark mode: the widgets' text and tinted tiles need their own steps */
body.dark-only .dashboard {
  --so-heading-text: #e9ecf1;
  --so-danger-text: #ff8a80;
  --so-warning-text: #ffd27a;
  --so-info-text: #8fd3f5;
  --so-primary-soft: rgba(157, 149, 255, 0.16);
  --so-info-soft: rgba(143, 211, 245, 0.16);
  --so-warning-soft: rgba(255, 184, 41, 0.16);
  --so-danger-soft: rgba(252, 86, 74, 0.16);
}

/* Keep widget labels clear of the decorative icon in the top-right corner */
.small-widget .card-body > .dashboard__widget-label {
  display: block;
  padding-right: 3.75rem;
}

/* Heading scale: the page title leads and has room under the header; card titles
   (the theme renders h2/h5 at 24px) stay below it */
.page-wrapper .page-body-wrapper .page-title {
  padding-bottom: 1.375rem;
  padding-top: 1.375rem;
}

.page-wrapper .page-body-wrapper .page-title h1 {
  font-size: 1.625rem;
  font-weight: 500;
}

.page-body .card > .card-header > :is(h1, h2, h3, h4, h5, h6) {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Page titles are the page's h1; mirror the theme's .page-title h3 sizing */
.page-wrapper .page-body-wrapper .page-title .row h1 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .page-wrapper .page-body-wrapper .page-title .row h1 {
    font-size: 20px;
  }
}

.btn-secondary,
.btn-secondary.disabled,
.btn-secondary:disabled {
  background-color: var(--so-secondary) !important;
  border-color: var(--so-secondary) !important;
}

.btn-secondary:hover,
.btn-secondary:active {
  background-color: var(--so-secondary-hover) !important;
  border-color: var(--so-secondary-hover) !important;
}

/* Roboto is no longer loaded; the username in the header uses the app font */
.font-roboto {
  font-family: inherit;
}

/* Sidebar groups stay closed until sidebar-menu.js takes over (it sets inline display) */
.compact-wrapper .sidebar-wrapper .sidebar-submenu:not([style]) {
  display: none;
}

/* Header dropdowns opened by tap or keyboard (theme toggles .active on click) */
.onhover-dropdown .onhover-show-div.active {
  opacity: 1;
  transform: translateY(0px);
  visibility: visible;
  border-radius: 5px;
  overflow: hidden;
}

@media (pointer: coarse) {
  .page-header .nav-menus > li > .mode,
  .page-header .nav-menus .cart-box {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .page-header .nav-menus .profile-media {
    min-height: 44px;
  }
}

/* Profile page: identity card (Leko banner, avatar, facts) beside the stacked account cards */
.profile-identity {
  overflow: hidden;
}

.profile-identity__banner {
  aspect-ratio: 2058 / 764;
  background-color: #dff4fb;
  background-image: url("../images/brand/profile-banner.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.profile-identity__body {
  padding: 0 1.5rem 1.5rem;
}

.profile-identity__avatar {
  background-color: var(--so-card-bg);
  border: 4px solid var(--so-card-bg);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(36, 41, 52, 0.18);
  display: block;
  height: 72px;
  margin-top: -36px;
  object-fit: cover;
  position: relative;
  width: 72px;
}

.profile-identity__name {
  color: var(--so-heading-text);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
}

body.dark-only .profile-identity__name {
  color: #fff;
}

.profile-role {
  background-color: var(--so-info-soft);
  border-radius: 999px;
  color: var(--so-info-text);
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.5rem;
  padding: 0.125rem 0.75rem;
}

body.dark-only .profile-role {
  background-color: rgba(143, 211, 245, 0.16);
  color: #8fd3f5;
}

.profile-facts {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: max-content 1fr;
  margin: 1.5rem 0 1.25rem;
}

.profile-facts dt {
  color: var(--so-muted-text);
  font-weight: 400;
}

.profile-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-note {
  color: var(--so-muted-text);
  font-size: 0.875rem;
}

.profile-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-stack > .card {
  margin-bottom: 0;
}

.profile-security {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-list li {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
}

.profile-list li + li {
  margin-top: 0.25rem;
}

/* Links in lists are their own targets: 24px minimum (WCAG 2.5.8) */
.profile-list a,
.profile-more summary {
  align-items: center;
  display: inline-flex;
  min-height: 1.75rem;
}

.profile-list__meta {
  color: var(--so-muted-text);
  font-size: 0.875rem;
}

.profile-more {
  margin-top: 0.75rem;
}

.profile-more summary {
  color: var(--so-primary-text);
  cursor: pointer;
  padding: 0.25rem 0;
  width: fit-content;
}

.profile-more ul {
  margin-top: 0.5rem;
}

@media (max-width: 575px) {
  .profile-security {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-stack form .btn,
  .profile-security .btn {
    width: 100%;
  }
}

/* Order detail: status pill, workflow actions and history */
.order-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin: 0.25rem 0 0.75rem;
  padding: 0.125rem 0.75rem;
}

.order-status--b {
  background-color: var(--so-secondary-soft);
  color: var(--so-muted-text);
}

.order-status--p {
  background-color: var(--so-warning-soft);
  color: var(--so-warning-text);
}

.order-status--a {
  background-color: var(--so-info-soft);
  color: var(--so-info-text);
}

.order-status--ep {
  background-color: var(--so-primary-soft);
  color: var(--so-primary-text);
}

.order-status--en {
  background-color: var(--so-success-soft);
  color: var(--so-success-text);
}

.order-status--r {
  background-color: var(--so-danger-soft);
  color: var(--so-danger-text);
}

body.dark-only .order-status--b { background-color: rgba(163, 166, 176, 0.16); }
body.dark-only .order-status--p { background-color: rgba(255, 184, 41, 0.16); color: #ffd27a; }
body.dark-only .order-status--a { background-color: rgba(143, 211, 245, 0.16); color: #8fd3f5; }
body.dark-only .order-status--ep { background-color: var(--so-primary-tint); }
body.dark-only .order-status--r { background-color: rgba(252, 86, 74, 0.16); color: var(--so-danger-text-on-dark); }

.order-workflow {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.order-workflow__reject summary {
  cursor: pointer;
  display: inline-block;
  list-style: none;
  margin: 0;
}

.order-workflow__reject summary::-webkit-details-marker {
  display: none;
}

.order-workflow__reject form {
  margin-top: 0.75rem;
  max-width: 28rem;
}

.order-workflow__reject form .btn {
  margin-top: 0.75rem;
}

.order-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-timeline li + li {
  margin-top: 0.75rem;
}

.order-timeline__note {
  color: var(--so-muted-text);
  font-size: 0.875rem;
}

.order-edit-box .btn {
  margin-top: 0.75rem;
}

.order-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
}

/* Leko, the helper mascot: a hint inside a page (.leko--tip) or an empty state (.leko--empty) */
:root {
  --so-leko-bg: #eaf7fb;
  --so-leko-line: #bfe6f1;
}

body.dark-only {
  --so-leko-bg: rgba(143, 211, 245, 0.1);
  --so-leko-line: rgba(143, 211, 245, 0.28);
}

.leko {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.leko__img {
  flex: none;
  height: auto;
  max-width: none;
}

.leko__title {
  color: var(--so-heading-text);
  font-weight: 600;
  margin: 0 0 0.25rem;
}

body.dark-only .leko__title {
  color: #fff;
}

.leko__text {
  margin: 0;
}

.leko__text > p {
  margin: 0;
}

.leko__text > p + p {
  margin-top: 0.5rem;
}

.leko--tip {
  background-color: var(--so-leko-bg);
  border: 1px solid var(--so-leko-line);
  border-radius: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1.25rem 0.75rem 0.75rem;
}

.leko--tip .leko__img {
  width: 4.5rem;
}

.leko--empty {
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

.leko--empty .leko__img {
  width: 8rem;
}

.leko--empty .leko__body {
  color: var(--so-muted-text);
  max-width: 42ch;
}

.leko--empty .leko__title {
  font-size: 1.0625rem;
}

@media (max-width: 575px) {
  .leko--tip .leko__img {
    width: 3.5rem;
  }
}

.leko--plain .leko__img {
  width: 5.5rem;
}

.leko-news {
  margin-top: 1rem;
}

.leko-news__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.leko-news-item {
  margin-bottom: 1.5rem;
}

@media (max-width: 575px) {
  .leko--plain .leko__img {
    width: 4rem;
  }
}

/* Shareable catalogs: the supplier's list */
.catalog-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.catalog-new {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.catalog-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-link {
  align-items: center;
  border-top: 1px solid var(--so-divider);
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem 0;
}

.catalog-link:first-child {
  border-top: 0;
  padding-top: 0;
}

.catalog-link__title {
  color: var(--so-heading-text);
  font-weight: 600;
}

body.dark-only .catalog-link__title {
  color: #fff;
}

.catalog-link__meta {
  color: var(--so-muted-text);
  font-size: 0.875rem;
}

.catalog-link__actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

.catalog-link__actions .order-workflow__reject form {
  margin-top: 0.75rem;
}

.catalog-link__actions .order-workflow__reject form .btn {
  margin-top: 0.5rem;
}

.catalog-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.125rem 0.75rem;
}

.catalog-status--active {
  background-color: var(--so-success-soft);
  color: var(--so-success-text);
}

.catalog-status--expired {
  background-color: var(--so-warning-soft);
  color: var(--so-warning-text);
}

.catalog-status--exhausted {
  background-color: var(--so-info-soft);
  color: var(--so-info-text);
}

.catalog-status--disabled {
  background-color: var(--so-secondary-soft);
  color: var(--so-muted-text);
}

body.dark-only .catalog-status--expired { background-color: rgba(255, 184, 41, 0.16); color: #ffd27a; }
body.dark-only .catalog-status--exhausted { background-color: rgba(143, 211, 245, 0.16); color: #8fd3f5; }
body.dark-only .catalog-status--disabled { background-color: rgba(163, 166, 176, 0.16); }

.catalog-pin-once__pin {
  font-size: 1.5rem;
  letter-spacing: 0.2em;
}

/* Form errors (crispy): the theme hides .invalid-feedback and its icon file is not shipped */
.invalid-feedback {
  color: var(--so-danger-text);
  display: block;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.invalid-feedback p,
.invalid-feedback strong {
  color: inherit !important;
  font-weight: 500;
  margin: 0;
}

body.dark-only .invalid-feedback {
  color: var(--so-danger-text-on-dark);
}

.form-control.is-invalid,
.form-select.is-invalid {
  background-image: none;
  border-color: var(--so-danger-text) !important;
}

body.dark-only .form-control.is-invalid,
body.dark-only .form-select.is-invalid {
  border-color: var(--so-danger-text-on-dark) !important;
}

.form-check-input.is-invalid {
  border-color: var(--so-danger-text);
}

.form-check-input.is-invalid ~ .form-check-label {
  color: var(--so-danger-text);
}

body.dark-only .form-check-input.is-invalid ~ .form-check-label {
  color: var(--so-danger-text-on-dark);
}

.form-errors ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.form-errors,
.form-errors li,
.form-errors strong,
.form-errors a {
  color: var(--so-danger-text) !important;
}

.form-errors a {
  text-decoration: underline;
}

body.dark-only .so-alert--error {
  background-color: rgba(252, 86, 74, 0.14);
  color: var(--so-danger-text-on-dark);
}

body.dark-only .form-errors,
body.dark-only .form-errors li,
body.dark-only .form-errors strong,
body.dark-only .form-errors a {
  color: var(--so-danger-text-on-dark) !important;
}

/* Illustrated panel beside the login form. The art is 1090x930 and its subject sits in the
   middle, so the panel is wide enough (7 of 12 columns) that `cover` only trims the edges. */
.login-panel {
  background-color: #075c5c;
  height: 100vh;
  overflow: hidden;
}

.login-panel img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}


/* "Nuevo" tag next to a sidebar entry. A <div>, not a <span>: the theme forces display and colour on spans.
   White on --so-primary keeps AA contrast. */
.so-new-badge {
  background-color: var(--so-primary);
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-left: 8px;
  padding: 3px 7px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Catalog link rows: one main action (share), one secondary (copy), the rest under "Más" */
.catalog-link__url {
  color: var(--so-muted-text);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-link__actions .btn,
.catalog-link__more-panel .btn {
  min-height: 2.75rem;
}

.catalog-link__actions {
  align-items: center;
  gap: 0.75rem;
}

.catalog-link__more summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 0.5rem;
  list-style: none;
}

.catalog-link__more summary::-webkit-details-marker {
  display: none;
}

/* A drawn chevron instead of a glyph: it turns when the menu is open */
.catalog-link__more summary::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  height: 0.4rem;
  transform: rotate(45deg) translateY(-0.1rem);
  transition: transform 0.15s ease-out;
  width: 0.4rem;
}

.catalog-link__more[open] summary::after {
  transform: rotate(-135deg) translateY(-0.1rem);
}

.catalog-link__more[open] {
  flex-basis: 100%;
}

.catalog-link__more-panel {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-link__more summary::after {
    transition-duration: 0.01s;
  }
}

/* The one-time PIN sits inside the row of its link, right above the buttons that share it */
.catalog-link > .catalog-pin-once {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.catalog-pin-once__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.catalog-pin-once__actions .btn {
  min-height: 2.75rem;
}

/* Catalog form: two groups, the PIN field only with "Escribir uno", a note for prices without PIN */
.catalog-group {
  border: 0;
  margin: 0 0 1.5rem;
  min-width: 0;
  padding: 0;
}

.catalog-group legend {
  color: var(--so-heading-text);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding: 0;
}

body.dark-only .catalog-group legend {
  color: #fff;
}

.catalog-more-options summary {
  color: var(--so-primary-text);
  cursor: pointer;
  font-weight: 500;
  padding: 0.5rem 0;
}

.catalog-more-options__body {
  padding-top: 0.5rem;
}

.catalog-prices-note {
  margin-bottom: 1rem;
}

/* Where :has() is not supported everything stays visible and still works */
@supports selector(:has(a)) {
  .catalog-pin-input,
  .catalog-prices-note {
    display: none;
  }

  .catalog-group:has(input[name="pin_action"][value="custom"]:checked) .catalog-pin-input {
    display: block;
  }

  .catalog-pin-input:has(.is-invalid),
  .catalog-pin-input:has(.invalid-feedback) {
    display: block;
  }

  form:has(#id_show_prices:checked):has(input[name="pin_action"][value="none"]:checked) .catalog-prices-note,
  form:has(#id_show_prices:checked):has(input[name="pin_action"][value="remove"]:checked) .catalog-prices-note {
    display: block;
  }
}

/* Radios: the theme resets them (appearance: none) and only styles :checked for checkboxes, so a
   chosen radio looked identical to an empty one. Its ::after draws the dot; this supplies the fill. */
.form-check-input[type="radio"]:checked {
  background-color: var(--so-primary);
  border-color: var(--so-primary);
}

.form-check-input[type="radio"]:focus-visible {
  outline: 2px solid var(--so-focus-ring);
  outline-offset: 2px;
}

.form-check-input[type="radio"]:not(:checked)::after {
  display: none;
}

.form-check:has(.form-check-input[type="radio"]) {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding-left: 0;
}

.form-check:has(.form-check-input[type="radio"]) .form-check-input {
  float: none;
  flex-shrink: 0;
  height: 1.25rem;
  margin: 0;
  width: 1.25rem;
}

.form-check:has(.form-check-input[type="radio"]) .form-check-label {
  cursor: pointer;
  flex: 1;
}

/* Why a link is closed, and what "Desactivar" will do */
.catalog-link__note {
  color: var(--so-muted-text);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.catalog-link__hint {
  color: var(--so-muted-text);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  max-width: 16rem;
}

/* "Nuevo catálogo": a business select next to the button when the supplier has several */
.catalog-new-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.catalog-new-form .btn,
.catalog-new-form__select,
.catalog-empty-action .btn {
  min-height: 2.75rem;
}

.catalog-new-form__select {
  max-width: 100%;
  width: auto;
}

.catalog-empty-action {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

/* Polish ------------------------------------------------------------------ */

/* The business select needs its arrow: the theme's form-control draws it like a text input */
.catalog-new-form__select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23656577' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 0.875rem center;
  background-repeat: no-repeat;
  background-size: 0.75rem;
  padding-right: 2.5rem;
}

body.dark-only .catalog-new-form__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a3a6b0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.catalog-empty-action .catalog-new-form {
  justify-content: center;
  width: 100%;
}

.catalog-empty-action .catalog-new-form__select {
  flex: 1 1 14rem;
  max-width: 22rem;
}

/* The one-time PIN needs air before the title of its own row */
.catalog-link > .catalog-pin-once {
  margin-bottom: 0.75rem;
}

/* Phones: status above the title (it no longer squeezes the text), main action full width */
@media (max-width: 575px) {
  .catalog-link {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-link > .catalog-pin-once {
    order: -2;
  }

  .catalog-link__status {
    justify-self: start;
    order: -1;
  }

  .catalog-link__actions > :first-child {
    flex: 1 1 100%;
  }

  .catalog-link__actions > .btn:first-child,
  .catalog-link__actions > form:first-child .btn {
    width: 100%;
  }
}

/* The select must shrink with its card instead of overflowing it */
.catalog-new-form {
  max-width: 100%;
}

.catalog-new-form__select {
  box-sizing: border-box;
  min-width: 0;
}

@media (max-width: 575px) {
  .catalog-head .catalog-new,
  .catalog-head .catalog-new-form {
    width: 100%;
  }

  .catalog-head .catalog-new-form__select {
    flex: 1 1 100%;
  }
}

/* Link facts as chips: the privacy risk (prices without PIN) and the visitors stand out */
.catalog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.catalog-chip {
  background-color: var(--so-secondary-soft);
  border-radius: 999px;
  color: var(--so-heading-text);
  font-size: 0.8125rem;
  line-height: 1.25;
  padding: 0.25rem 0.75rem;
}

.catalog-chip--count {
  font-weight: 600;
}

.catalog-chip--warn {
  background-color: var(--so-warning-soft);
  color: var(--so-warning-text);
  font-weight: 600;
}

body.dark-only .catalog-chip {
  background-color: rgba(163, 166, 176, 0.16);
  color: #fff;
}

body.dark-only .catalog-chip--warn {
  background-color: rgba(255, 184, 41, 0.16);
  color: #ffd27a;
}

.catalog-preview-link {
  color: var(--so-primary-text);
  display: inline-block;
  font-weight: 500;
  margin-top: 0.5rem;
}

.catalog-new-form__label {
  color: var(--so-heading-text);
  font-weight: 500;
  margin: 0;
}

body.dark-only .catalog-new-form__label {
  color: #fff;
}
