/*
 * Sanctron CRM — the client's logo, authentication pages and the monthly lead forecast.
 *
 * Plain CSS on purpose: the Admin Tailwind build ships precompiled, so classes
 * that are not already in it would not exist. Every rule here is scoped to a
 * `sanctron-` class.
 */

/* Brand mark ------------------------------------------------------------- */

/*
 * The client's logo keeps its colours and proportion, fitted in a box per place. The same image serves both themes:
 * a transparent logo too dark for the dark theme, or too light for the light one, gets a plate (data-tone is set by
 * the brand component once the image has loaded).
 */
.sanctron-brand {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}

.sanctron-brand__logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 180px;
    max-height: 36px;
    object-fit: contain;
    /* A plate's padding stays inside the same box: the header keeps its height in both themes. */
    box-sizing: border-box;
}

.dark .sanctron-brand[data-tone="dark"] .sanctron-brand__logo {
    padding: 3px 8px;
    border-radius: 6px;
    background: #f9fafb;
}

html:not(.dark) .sanctron-brand[data-tone="light"] .sanctron-brand__logo {
    padding: 3px 8px;
    border-radius: 6px;
    background: #1f2937;
}

/* Without a logo: a neutral text mark. */
.sanctron-brand__neutral {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 28px;
    color: #374151;
}

.dark .sanctron-brand__neutral {
    color: #f3f4f6;
}

@media (max-width: 639.98px) {
    .sanctron-brand--header .sanctron-brand__logo {
        max-width: 140px;
        max-height: 32px;
    }
}

.sanctron-brand--drawer .sanctron-brand__logo {
    max-width: 200px;
    max-height: 48px;
}

/* Sign in and password pages: always light, so the logo stands on the light card background. */
.sanctron-brand--auth {
    justify-content: center;
}

.sanctron-brand--auth .sanctron-brand__logo {
    max-width: 240px;
    /* Room for a vertical lockup (symbol over the name), whose name stays readable at about 170px wide. */
    max-height: 140px;
}

.sanctron-brand--auth .sanctron-brand__neutral {
    font-size: 24px;
    color: #374151;
}

/* Configuração → Geral: the preview of the saved logo, whole and in proportion (Krayin draws a 33px square). */
img[alt="general[general][admin_logo][logo_image]"] {
    width: auto !important;
    max-width: 200px;
    height: 48px !important;
    object-fit: contain;
    background: #ffffff;
}

/* Authentication pages ----------------------------------------------------- */

/*
 * The page takes what is left of the window: a fixed min-height of 100vh on the panel added up with the margin the
 * debug bar reserves in the body. Content taller than the window makes the page grow, and scroll.
 */
html:has(.sanctron-auth) {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    background: #f3f4f6;
}

body:has(.sanctron-auth),
body:has(.sanctron-auth) > #app {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

.sanctron-auth {
    box-sizing: border-box;
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: #f3f4f6;
}

.sanctron-auth__panel {
    display: flex;
    width: 100%;
    max-width: 400px;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.sanctron-auth__card {
    box-sizing: border-box;
    width: 100%;
    padding: 32px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
}

.sanctron-auth__title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: #1f2937;
}

.sanctron-auth__submit {
    width: 100%;
    min-height: 40px;
    margin-top: 8px;
}

.sanctron-auth__link {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--brand-color);
}

.sanctron-auth__link:hover,
.sanctron-auth__link:focus-visible {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .sanctron-auth__logo {
        width: 128px;
    }

    .sanctron-auth__card {
        padding: 24px 20px;
    }
}

/* Monthly lead forecast -------------------------------------------------- */

.sanctron-forecast__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sanctron-forecast__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.sanctron-forecast__button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.sanctron-forecast__button:hover,
.sanctron-forecast__button:focus-visible {
    border-color: #9ca3af;
}

.sanctron-forecast__button--active {
    border-color: var(--brand-color);
    background: #e0f2fe;
    color: #0369a1;
}

.sanctron-forecast__counter {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

.sanctron-forecast__range {
    margin-left: 6px;
    color: #4b5563;
    font-size: 14px;
}

.dark .sanctron-forecast__range {
    color: #d1d5db;
}

/* Four months fit; the rest of the period is further on. */
.sanctron-forecast__board {
    display: grid;
    grid-auto-columns: minmax(max(15rem, (100% - 30px) / 4), 1fr);
    grid-auto-flow: column;
    gap: 10px;
    padding-bottom: 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.sanctron-forecast__board > * {
    scroll-snap-align: start;
}

.sanctron-forecast__board:focus-visible,
.sanctron-forecast__totals:focus-visible,
.sanctron-forecast__option:focus-visible {
    outline: 2px solid #0e90d9;
    outline-offset: 1px;
}

.sanctron-forecast__column,
.sanctron-forecast__list {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

.sanctron-forecast__column--current {
    border-top: 3px solid var(--brand-color);
}

.sanctron-forecast__column-header,
.sanctron-forecast__list-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.sanctron-forecast__column-header,
.sanctron-forecast__list-header {
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
}

/* Open, won and both, at the right of the month. */
.sanctron-forecast__totals {
    position: relative;
    flex-shrink: 0;
    border-radius: 4px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    cursor: help;
}

.sanctron-forecast__sum {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: #4b5563;
}

.sanctron-forecast__sum + .sanctron-forecast__sum {
    margin-top: 8px;
}

.sanctron-forecast__sum-won {
    color: #15803d;
}

.sanctron-forecast__sum-total {
    padding: 2px 0 0 16px;
    border-top: 1px solid #9ca3af;
    color: #111827;
    font-weight: 600;
}

.sanctron-forecast__tip {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    display: none;
    width: max-content;
    max-width: 14rem;
    padding: 8px 10px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sanctron-forecast__tip dt {
    font-weight: 700;
}

.sanctron-forecast__tip dl + dl {
    margin-top: 8px;
}

.sanctron-forecast__totals:hover .sanctron-forecast__tip,
.sanctron-forecast__totals:focus-visible .sanctron-forecast__tip {
    display: block;
}

.sanctron-forecast__month {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.sanctron-forecast__month::first-letter {
    text-transform: uppercase;
}

.sanctron-forecast__total {
    font-size: 18px;
    font-weight: 700;
    color: #15803d;
}

.sanctron-forecast__meta {
    font-size: 12px;
    color: #6b7280;
}

.sanctron-forecast__cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 330px);
    min-height: 180px;
    padding: 8px;
    overflow-y: auto;
}

.sanctron-forecast__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    padding: 8px;
}

.sanctron-forecast__empty {
    padding: 24px 8px;
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
}

.sanctron-forecast__card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sanctron-forecast__card:hover,
.sanctron-forecast__card:focus-visible {
    border-color: var(--brand-color);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.sanctron-forecast__card--overdue {
    border-left: 3px solid #f59e0b;
}

.sanctron-forecast__card--won {
    border-left: 3px solid #16a34a;
}

.sanctron-forecast__card-title {
    font-weight: 600;
    color: #111827;
    overflow-wrap: anywhere;
}

.sanctron-forecast__card-line {
    font-size: 12px;
    color: #6b7280;
}

.sanctron-forecast__card-value {
    font-weight: 700;
    color: #111827;
}

.sanctron-forecast__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sanctron-forecast__chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 12px;
}

.sanctron-forecast__card-date {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.sanctron-forecast__overdue {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.sanctron-forecast__more {
    margin: 4px 8px 8px;
    padding: 6px;
    border-radius: 6px;
    color: var(--brand-color);
    font-weight: 600;
}

.sanctron-forecast__more:hover,
.sanctron-forecast__more:focus-visible {
    background: #f3f4f6;
}

/* Below desktop width the months scroll sideways, one column at a time. */
@media (max-width: 1023.98px) {
    .sanctron-forecast__board {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }

    .sanctron-forecast__column {
        flex: 0 0 min(300px, 85%);
        scroll-snap-align: start;
    }

    .sanctron-forecast__cards {
        max-height: none;
    }
}

@media (max-width: 639.98px) {
    .sanctron-forecast__list-header {
        flex-direction: column;
    }

    .sanctron-forecast__picker {
        width: 100%;
    }
}

.dark .sanctron-forecast__button,
.dark .sanctron-forecast__column,
.dark .sanctron-forecast__list {
    border-color: #1f2937;
    background: #111827;
    color: #d1d5db;
}

.dark .sanctron-forecast__button--active {
    border-color: var(--brand-color);
    background: #0c4a6e;
    color: #fff;
}

.dark .sanctron-forecast__column-header,
.dark .sanctron-forecast__list-header {
    border-color: #1f2937;
}

.dark .sanctron-forecast__month,
.dark .sanctron-forecast__card-title,
.dark .sanctron-forecast__card-value {
    color: #f9fafb;
}

.dark .sanctron-forecast__total,
.dark .sanctron-forecast__sum-won {
    color: #4ade80;
}

.dark .sanctron-forecast__sum {
    color: #d1d5db;
}

.dark .sanctron-forecast__sum-total {
    color: #f9fafb;
}

.dark .sanctron-forecast__tip {
    background: #374151;
}

.dark .sanctron-forecast__card {
    border-color: #374151;
    background: #1f2937;
    color: #d1d5db;
}

.dark .sanctron-forecast__counter,
.dark .sanctron-forecast__chip {
    background: #374151;
    color: #e5e7eb;
}

.dark .sanctron-forecast__more:hover,
.dark .sanctron-forecast__more:focus-visible {
    background: #1f2937;
}

/* Organization registration: three blocks side by side, as far as the page or the dialog has room. */
.sanctron-registration {
    container-type: inline-size;
    margin-bottom: 1rem;
}

.sanctron-registration__blocks {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.sanctron-registration__block {
    min-width: 0;
    padding: 0.5rem 1rem 0;
}

.sanctron-address {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1rem;
}

.sanctron-address > * {
    grid-column: 1 / -1;
}

.sanctron-address > .sanctron-address__cep {
    grid-column: 1 / span 6;
}

.sanctron-address__status {
    margin: -0.5rem 0 1rem;
}

.sanctron-address__status:empty {
    display: none;
}

.sanctron-address > .sanctron-address__number {
    grid-column: 1 / span 5;
}

.sanctron-address > .sanctron-address__no-number {
    display: flex;
    grid-column: span 7;
    align-items: center;
    align-self: start;
    gap: 0.5rem;
    margin: 2.3rem 0 0;
    cursor: pointer;
}

.sanctron-address > .sanctron-address__city {
    grid-column: span 8;
}

.sanctron-address > .sanctron-address__state {
    grid-column: span 4;
}

@container (min-width: 40rem) {
    .sanctron-registration__blocks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sanctron-registration__address {
        grid-column: 1 / -1;
    }
}

@container (min-width: 56rem) {
    .sanctron-registration__blocks {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr);
    }

    .sanctron-registration__address {
        grid-column: auto;
    }
}

/* Contact registration: two blocks, and the repeated rows of e-mails and numbers. */
@container (min-width: 56rem) {
    .sanctron-registration__blocks--two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sanctron-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
    column-gap: 1rem;
}

.sanctron-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem auto;
    align-items: center;
    gap: 0.5rem;
}

@container (max-width: 30rem) {
    .sanctron-entry {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .sanctron-entry > input {
        grid-column: 1 / -1;
    }
}

/* Contact record: the organization with its CNPJ takes as many lines as it needs. */
.sanctron-contact-record .group > .flex {
    height: auto;
    min-height: 34px;
}

.sanctron-contact-record .group > .flex > .relative {
    height: auto;
}

.sanctron-contact-record .group .truncate {
    white-space: normal;
}

/* Contact listing: the whole value, in as many lines as it needs. */
.sanctron-contacts {
    display: grid;
    grid-template-columns: 1.4fr 1.3fr 1fr 1.6fr 1.1fr 1.1fr 0.6fr 7rem;
    align-items: center;
    gap: 0.75rem;
}

.sanctron-contacts > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1023px) {
    .sanctron-contacts {
        display: none;
    }
}

/* Organization registration over the contact form. */
.sanctron-dialog {
    width: min(80rem, calc(100% - 1rem));
    max-height: calc(100dvh - 1rem);
    margin: auto;
    padding: 1rem 1rem 0;
    overflow-y: auto;
    border-radius: 0.5rem;
}

.sanctron-dialog::backdrop {
    background: rgb(0 0 0 / 50%);
}

.sanctron-dialog__actions {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    padding: 0.75rem 0;
}

/* Columns of OrganizationDataGrid::ORDER and the actions, with room for a whole CNPJ. The original widths are inline. */
@media (min-width: 1024px) {
    .sanctron-organizations-grid .row.grid[style*="repeat(8"] {
        grid-template-columns: 1fr 1.7fr 1.7fr 9.5rem 7rem 0.6fr 1fr 5rem !important;
    }

    .sanctron-organizations-grid .row.grid > * {
        min-width: 0;
    }
}

/* Number of contacts: heading and numbers end at the same line, with the arrow of the order before the heading. */
@media (min-width: 1024px) {
    .sanctron-organizations-grid .row.grid > :has(.sanctron-count) {
        padding-inline-end: 1.5rem;
        text-align: end;
        font-variant-numeric: tabular-nums;
    }

    .sanctron-organizations-grid .row.grid > div:has(.sanctron-count) {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }
}

/* Organization of the contact: the shortcut next to the label, and the new organization not saved yet. */
.sanctron-organization-label,
.sanctron-pending__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
}

.sanctron-pending {
    overflow-wrap: anywhere;
    border-style: dashed;
}

.sanctron-pending__actions {
    margin-top: 0.5rem;
}

/* Units of a CNPJ root: a table, or one block per unit on phones. */
.sanctron-group__name,
.sanctron-units td {
    overflow-wrap: anywhere;
}

.sanctron-group__rename {
    display: flex;
    gap: 0.625rem;
    max-width: 40rem;
}

/* Cards of the Dashboard, three to a line while there is room; those of the last line fill it. */
.sanctron-group__totals {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.sanctron-group__totals > div {
    box-sizing: border-box;
    flex: 1 1 max(14rem, (100% - 2rem) / 3);
    min-width: 0;
    overflow-wrap: anywhere;
}

.sanctron-units th,
.sanctron-units td {
    padding: 0.625rem 0.5rem;
}

.sanctron-units td > span {
    display: block;
}

@media (max-width: 767px) {
    .sanctron-units thead {
        display: none;
    }

    .sanctron-units tr {
        display: block;
        padding: 0.5rem 0;
    }

    .sanctron-units td {
        display: block;
        padding: 0.125rem 0;
    }

    .sanctron-units td[data-label]::before {
        content: attr(data-label) ': ';
        opacity: 0.75;
    }
}

.sanctron-group__rename button {
    flex-shrink: 0;
}

/* Organizations by group: an expandable table of native <details>. */
.sanctron-views,
.sanctron-groups__search,
.sanctron-groups__pages,
.sanctron-groups__pages nav,
.sanctron-groups__pages label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sanctron-views [aria-current] {
    border-color: currentColor;
    font-weight: 600;
}

.sanctron-groups__search input[type='search'] {
    flex: 1 1 14rem;
    max-width: 28rem;
}

.sanctron-groups {
    overflow: hidden;
}

.sanctron-groups__row {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr) 5.5rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
}

.sanctron-groups__head a:first-child {
    grid-column: 2;
}

.sanctron-groups__head a:last-child,
.sanctron-groups__count {
    text-align: center;
}

summary.sanctron-groups__row {
    cursor: pointer;
    list-style: none;
}

summary.sanctron-groups__row::-webkit-details-marker {
    display: none;
}

summary.sanctron-groups__row:hover {
    background: rgba(148, 163, 184, 0.12);
}

summary.sanctron-groups__row:focus-visible,
.sanctron-views a:focus-visible,
.sanctron-groups a:focus-visible,
.sanctron-groups__pages a:focus-visible {
    outline: 2px solid #0e90d9;
    outline-offset: -2px;
}

.sanctron-groups__arrow {
    transition: transform 0.15s;
}

[open] > summary .sanctron-groups__arrow {
    transform: rotate(90deg);
}

.sanctron-groups__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.75rem;
    overflow-wrap: anywhere;
}

.sanctron-groups__unit {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) 10rem 5rem 6rem;
    align-items: center;
    gap: 0.25rem 0.75rem;
    padding: 0.5rem 1rem 0.5rem 4rem;
    overflow-wrap: anywhere;
}

.sanctron-groups__group-link {
    display: block;
}

.sanctron-groups__labels {
    padding-block: 0.25rem;
}

.sanctron-groups__single {
    padding-left: 3rem;
}

.sanctron-groups__open {
    text-align: end;
}

.sanctron-groups__code {
    font-family: ui-monospace, Consolas, monospace;
}

.sanctron-groups__found {
    background: rgba(250, 204, 21, 0.22);
    box-shadow: inset 4px 0 0 #ca8a04;
}

.sanctron-groups__status {
    justify-self: start;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #065f46;
    background: #d1fae5;
}

.sanctron-groups__status--inactive {
    color: #374151;
    background: #e5e7eb;
}

/* The units of a group: a table or, without room for it, one block per unit. */
.sanctron-groups__panel {
    container-type: inline-size;
    padding: 0.75rem 1rem 1rem 3rem;
}

.sanctron-groups__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.sanctron-groups__units {
    width: 100%;
    table-layout: fixed;
    text-align: start;
}

.sanctron-groups__units :is(th, td) {
    padding: 0.5rem;
    overflow-wrap: anywhere;
}

.sanctron-groups__units th {
    font-weight: 600;
    text-align: start;
}

.sanctron-groups__units [data-column='code'] {
    width: 6.5rem;
}

.sanctron-groups__units [data-column='cnpj'] {
    width: 11rem;
    white-space: nowrap;
}

.sanctron-groups__units [data-column='status'] {
    width: 6.5rem;
}

.sanctron-groups__units [data-column='actions'] {
    width: 8rem;
    text-align: end;
    white-space: nowrap;
}

.sanctron-groups__units .sanctron-groups__status {
    display: inline-block;
}

@container (max-width: 43.99rem) {
    .sanctron-groups__units,
    .sanctron-groups__units tbody {
        display: block;
    }

    .sanctron-groups__units thead {
        display: none;
    }

    .sanctron-groups__units tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.25rem 0.75rem;
        padding: 0.5rem;
    }

    .sanctron-groups__units tr > td {
        width: auto;
        padding: 0;
    }

    .sanctron-groups__units tr > [data-column='name'] {
        flex: 1 0 calc(100% - 5rem);
        max-width: calc(100% - 5rem);
    }

    .sanctron-groups__units tr > [data-column='cnpj'] {
        flex: 1 0 100%;
    }

    .sanctron-groups__units tr > [data-column='actions'] {
        margin-inline-start: auto;
    }

    .sanctron-groups__units td[data-label]::before {
        content: attr(data-label) ': ';
        color: #4b5563;
    }

    .dark .sanctron-groups__units td[data-label]::before {
        color: #d1d5db;
    }
}

.sanctron-groups__pages {
    justify-content: flex-end;
    gap: 0.5rem 1rem;
}

.sanctron-groups__pages > span {
    margin-inline-end: auto;
}

@media (max-width: 767px) {
    .sanctron-groups__row {
        grid-template-columns: 1.5rem minmax(0, 1fr) 5.5rem;
        padding: 0.625rem 0.75rem;
    }

    .sanctron-groups__unit.sanctron-groups__labels {
        display: none;
    }

    /* Code and name, then CNPJ or country, status and the link. */
    .sanctron-groups__unit {
        display: flex;
        flex-wrap: wrap;
        padding: 0.5rem 0.75rem 0.5rem 2.75rem;
    }

    .sanctron-groups__name {
        flex: 1 0 calc(100% - 5rem);
        max-width: calc(100% - 5rem);
    }

    .sanctron-groups__open {
        margin-inline-start: auto;
    }

    .sanctron-groups__panel {
        padding-inline: 0.75rem;
    }
}

/* Tips of the controls that show only an icon (see icons.blade.php). */
@media (hover: hover) {
    [data-sanctron-tip]:hover::after {
        content: attr(aria-label);
    }
}

[data-sanctron-tip]:focus-visible::after {
    content: attr(aria-label);
}

[data-sanctron-tip]::after {
    position: absolute;
    z-index: 10060;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font: 500 12px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dark [data-sanctron-tip]::after {
    background: #f9fafb;
    color: #111827;
}

[data-sanctron-tip~='up']::after {
    top: auto;
    bottom: calc(100% + 6px);
}

[data-sanctron-tip~='start']::after {
    left: 0;
    transform: none;
}

[data-sanctron-tip~='end']::after {
    left: auto;
    right: 0;
    transform: none;
}

[data-sanctron-tip~='right']::after {
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%);
}

/* With the menu open its names are already there. */
.sidebar-not-collapsed #admin-sidebar [data-sanctron-tip]::after {
    content: none;
}

[data-sanctron-key]:focus-visible {
    outline: 2px solid #0e90d9;
    outline-offset: 1px;
    border-radius: 6px;
}

/* A finger needs about 44 pixels. */
@media (max-width: 1023px) {
    [data-sanctron-key]:not(.hidden):not([class*='max-lg:hidden']),
    a[data-sanctron-tip]:not(.hidden),
    button[data-sanctron-tip]:not(.hidden) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }
}

/* The way to the record, apart from the arrow that unfolds the units. */
.sanctron-groups__open {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.sanctron-groups__head [class*='icon-'],
.sanctron-groups__pages [class*='icon-'],
.sanctron-groups__search [class*='icon-'] {
    display: inline-flex;
    font-size: 1.125rem;
    vertical-align: middle;
}

.sanctron-groups__pages a,
.sanctron-groups__pages nav > span[aria-hidden] {
    display: inline-flex;
    align-items: center;
}

/* Leads of each group in Empresas → Por grupo: columns on wide screens, a labelled line below the group on others. */
.sanctron-groups__metric,
.sanctron-groups__metric-head {
    text-align: center;
}

.sanctron-groups__metric-value {
    font-variant-numeric: tabular-nums;
}

@media (min-width: 1280px) {
    .sanctron-groups--metrics .sanctron-groups__row {
        grid-template-columns: 1.5rem minmax(0, 1fr) 5.5rem 7.5rem 11rem 7.5rem 6.5rem;
    }

    .sanctron-groups__metrics {
        display: contents;
    }

    /* A company without CNPJ: its five columns, then the dashes under the metrics of the head. */
    .sanctron-groups--metrics .sanctron-groups__single {
        grid-template-columns: 4.5rem minmax(0, 1fr) 10rem 5rem 6rem 7.5rem 11rem 7.5rem 6.5rem;
        column-gap: 0.5rem;
    }

    .sanctron-groups__metric-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 1279px) {
    .sanctron-groups__metric-head {
        display: none;
    }

    .sanctron-groups__metrics {
        grid-column: 2 / -1;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.25rem 0.75rem;
    }

    .sanctron-groups__metric {
        display: flex;
        flex-direction: column;
        text-align: start;
    }

    .sanctron-groups__metric-label {
        font-size: 0.75rem;
        color: #4b5563;
    }

    .dark .sanctron-groups__metric-label {
        color: #d1d5db;
    }
}

@media (max-width: 767px) {
    .sanctron-groups__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sanctron-groups__unit .sanctron-groups__metrics {
        flex: 1 0 100%;
    }
}

/* Period of the forecast: the kinds of period, the year and the periods in it. */
.sanctron-forecast__nav {
    position: relative;
}

.sanctron-forecast__picker {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    width: 24rem;
    max-width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.sanctron-forecast__years {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.sanctron-forecast__year {
    font-size: 1rem;
}

.sanctron-forecast__units,
.sanctron-forecast__options {
    display: grid;
    gap: 6px;
    margin-bottom: 8px;
}

.sanctron-forecast__units {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sanctron-forecast__options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sanctron-forecast__options:is([data-unit='quarter'], [data-unit='semester']) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sanctron-forecast__option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.sanctron-forecast__option small {
    font-weight: 400;
}

.sanctron-forecast__option:hover {
    border-color: #9ca3af;
}

.sanctron-forecast__option--active {
    border-color: var(--brand-color);
    background: var(--brand-color);
    color: #fff;
}

.dark .sanctron-forecast__picker,
.dark .sanctron-forecast__option:not(.sanctron-forecast__option--active) {
    border-color: #374151;
    background: #111827;
    color: #e5e7eb;
}

/* Histórico do cadastro: four read-only values side by side, two by two in a narrow column or on phones. */
.sanctron-history__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    gap: 0.75rem 1.5rem;
    overflow-wrap: anywhere;
}

/* Opportunity form: the sections of its pipeline, their fields in the order they are read. */
.sanctron-opportunity {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sanctron-opportunity__section {
    padding: 1rem;
}

.sanctron-opportunity__section > h2 {
    margin-bottom: 0.75rem;
}

.sanctron-opportunity__grid,
.sanctron-opportunity__row,
.sanctron-opportunity__facts {
    display: grid;
    align-items: start;
    gap: 0.75rem 1rem;
}

/* Bar of a stage of the kanban, over the currency it compares. */
.sanctron-kanban__bar {
    flex: 0 1 9rem;
    min-width: 5rem;
    color: #6b7280;
    font-size: 10px;
    line-height: 1.2;
    text-align: right;
}

.sanctron-kanban__bar > span {
    display: block;
    margin-top: 3px;
}

.dark .sanctron-kanban__bar {
    color: #d1d5db;
}

/* The value and its currency. */
.sanctron-opportunity__value {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem;
    align-items: start;
    gap: 0 0.5rem;
}

.sanctron-opportunity__grid > *,
.sanctron-opportunity__row > * {
    min-width: 0;
}

/* Two lines that grow with the text, or by hand. */
.sanctron-opportunity__area textarea {
    display: block;
    min-height: calc(2lh + 1rem + 2px);
    max-height: 60vh;
    field-sizing: content;
    resize: vertical;
}

.sanctron-opportunity__solutions > p {
    grid-column: 1 / -1;
}

.sanctron-opportunity__solutions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
    gap: 0.5rem 1rem;
    max-height: 12rem;
    overflow-y: auto;
}

.sanctron-opportunity__notes {
    padding: 0.75rem;
    border: 1px solid #fcd34d;
    border-left-width: 4px;
    border-radius: 0.375rem;
    background: #fffbeb;
    color: #78350f;
}

.dark .sanctron-opportunity__notes {
    border-color: #b45309;
    background: #1c1917;
    color: #fde68a;
}

.sanctron-opportunity__link {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sanctron-opportunity__link > input {
    flex: 1 1 16rem;
}

.sanctron-opportunity__open {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.sanctron-opportunity__chip {
    display: inline-block;
    margin: 0 0.25rem 0.25rem 0;
    padding: 0.125rem 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
}

.sanctron-opportunity__text {
    overflow-wrap: anywhere;
    white-space: pre-line;
}

/* Fields of a section, in as many columns as fit; the long ones, the whole width. */
.sanctron-opportunity__fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    align-items: start;
    gap: 0.75rem 1rem;
}

.sanctron-opportunity__fields > * {
    min-width: 0;
}

.sanctron-opportunity__wide {
    grid-column: 1 / -1;
}

.sanctron-opportunity__pipeline {
    max-width: 24rem;
}

/* Important or locked, beside the name of a field; pending, in the record and in the kanban. */
.sanctron-opportunity__mark {
    padding: 0 0.5rem;
    border: 1px solid #f59e0b;
    border-radius: 999px;
    background: #fffbeb;
    color: #78350f;
    font-size: 11px;
    line-height: 1.6;
    width: fit-content;
}

.dark .sanctron-opportunity__mark {
    background: #1c1917;
    color: #fde68a;
}

.sanctron-opportunity__record {
    display: grid;
    gap: 0.75rem;
}

.sanctron-opportunity__record dd {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    overflow-wrap: anywhere;
}

.sanctron-opportunity__record dd > span:first-child {
    min-width: 0;
    white-space: pre-line;
}

.sanctron-opportunity__edit {
    flex: none;
    font-size: 1.25rem;
    line-height: 1;
}

.sanctron-dialog--small {
    width: min(34rem, calc(100% - 1rem));
}

.sanctron-opportunity__inputs {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.sanctron-opportunity__history {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: 1rem;
}

.sanctron-opportunity__history ul {
    display: grid;
    gap: 0.5rem;
    max-height: 20rem;
    overflow-y: auto;
}

/* Settings: the form of a pipeline. */
.sanctron-form-config .custom-select {
    padding-right: 2rem;
}

#form_pipeline {
    max-width: 60vw;
}

.sanctron-form-config__section,
.sanctron-form-config__option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sanctron-form-config__section > input,
.sanctron-form-config__toggle {
    flex: 1 1 14rem;
}

.sanctron-form-config__section {
    justify-content: space-between;
}

.sanctron-form-config__toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    min-width: 0;
    padding: 0.25rem 0;
    text-align: left;
}

.sanctron-form-config__chevron {
    width: 1rem;
}

.sanctron-form-config__unsaved {
    padding: 0 0.5rem;
    border: 1px solid #fb923c;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 600;
}

.dark .sanctron-form-config__unsaved {
    background: transparent;
    color: #fdba74;
}

.sanctron-form-config__menu {
    position: relative;
}

.sanctron-form-config__menu > summary {
    list-style: none;
    cursor: pointer;
}

.sanctron-form-config__menu > summary::-webkit-details-marker {
    display: none;
}

.sanctron-form-config__menu-list {
    position: absolute;
    right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-width: 12rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgb(0 0 0 / 12%);
}

.sanctron-form-config__menu-list > button {
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.sanctron-form-config__menu-list > button:hover:not(:disabled),
.sanctron-form-config__menu-list > button:focus-visible {
    background: #f3f4f6;
}

.dark .sanctron-form-config__menu-list > button:hover:not(:disabled),
.dark .sanctron-form-config__menu-list > button:focus-visible {
    background: #1f2937;
}

.sanctron-form-config__menu-list > button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Field | Appears from | Rules | Actions, readable before any click. */
.sanctron-form-config__fields {
    width: 100%;
    margin-top: 0.75rem;
}

.sanctron-form-config__fields > thead th {
    padding: 0.375rem 0.5rem;
    border-bottom: 1px solid #d1d5db;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.sanctron-form-config__fields > thead th:nth-child(1) { width: 30%; }
.sanctron-form-config__fields > thead th:nth-child(2) { width: 17%; }

.sanctron-form-config__fields > tbody > tr > td {
    padding: 0.625rem 0.5rem;
    vertical-align: top;
}

.sanctron-form-config__fields > tbody + tbody > tr:first-child > td {
    border-top: 1px solid #e5e7eb;
}

.dark .sanctron-form-config__fields > thead th,
.dark .sanctron-form-config__fields > tbody + tbody > tr:first-child > td {
    border-color: #1f2937;
    color: inherit;
}

.sanctron-form-config__fields > tbody.is-editing {
    background: #f9fafb;
}

.dark .sanctron-form-config__fields > tbody.is-editing {
    background: #030712;
}

.sanctron-form-config__fields .sanctron-form-config__actions {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .sanctron-form-config__fields,
    .sanctron-form-config__fields > tbody,
    .sanctron-form-config__fields > tbody > tr,
    .sanctron-form-config__fields > tbody > tr > td {
        display: block;
        width: 100%;
    }

    .sanctron-form-config__fields > thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .sanctron-form-config__fields > tbody > tr > td {
        padding: 0.25rem 0;
    }

    .sanctron-form-config__fields > tbody > tr:first-child > td:first-child {
        padding-top: 0.75rem;
    }

    .sanctron-form-config__fields > tbody + tbody > tr:first-child > td + td {
        border-top: 0;
    }

    .sanctron-form-config__fields > tbody > tr > td[data-label]:not(:first-child)::before {
        content: attr(data-label);
        display: block;
        color: #4b5563;
        font-size: 12px;
    }

    .sanctron-form-config__fields .sanctron-form-config__actions {
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }
}

.sanctron-form-config__option {
    margin-top: 0.5rem;
}

.sanctron-form-config__option > input[type='text'] {
    flex: 1 1 10rem;
    min-width: 0;
}

.sanctron-form-config__field {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

/* A field: what it is and its rules, readable at once; its controls open under it on demand. */
.sanctron-form-config__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.sanctron-form-config__row > :first-child {
    flex: 1 1 16rem;
}

.sanctron-form-config__actions,
.sanctron-form-config__rules-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
}

.sanctron-form-config__actions {
    align-items: center;
}

.sanctron-form-config__rules-line {
    margin-top: 0.125rem;
}

.sanctron-form-config__rules-line > details[open] {
    flex-basis: 100%;
}

.sanctron-form-config__rules-line summary {
    cursor: pointer;
    width: fit-content;
}

.sanctron-form-config__forecast {
    display: inline-block;
    width: fit-content;
    margin-top: 0.25rem;
    padding: 0 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.sanctron-form-config__forecast[data-default='true'] {
    border-color: #fb923c;
    background: #fff7ed;
}

.dark .sanctron-form-config__forecast[data-default='true'] {
    background: transparent;
}

.sanctron-form-config__panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.dark .sanctron-form-config__panel {
    border-color: #1f2937;
    background: #030712;
}

.sanctron-form-config__choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 0.5rem 1rem;
}

.sanctron-form-config__choices select {
    width: 100%;
}

.sanctron-form-config__add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #d1d5db;
}

.sanctron-form-config__add select {
    max-width: 100%;
}

.sanctron-form-config__rules th,
.sanctron-form-config__rules td,
.sanctron-form-config__catalog th,
.sanctron-form-config__catalog td {
    padding: 0.375rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.dark .sanctron-form-config__rules :is(th, td),
.dark .sanctron-form-config__catalog :is(th, td) {
    border-color: #1f2937;
}

.sanctron-form-config__rules {
    width: fit-content;
    max-width: 100%;
}

.sanctron-form-config__rules td {
    text-align: center;
}

/* On a phone, each stage is a card with the name of each rule beside its box. */
@media (max-width: 640px) {
    .sanctron-form-config__rules,
    .sanctron-form-config__rules :is(tbody, tr, th, td) {
        display: block;
        width: 100%;
    }

    .sanctron-form-config__rules thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .sanctron-form-config__rules tr {
        margin-bottom: 0.5rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.375rem;
    }

    .sanctron-form-config__rules th[scope='row'] {
        font-weight: 600;
    }

    .sanctron-form-config__rules td {
        text-align: left;
    }

    .sanctron-form-config__rules td:has(> span) {
        display: none;
    }

    .sanctron-form-config__check {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
    }

    .sanctron-form-config__rules .sanctron-form-config__check-label {
        position: static;
        width: auto;
        height: auto;
        clip: auto;
    }
}

/* Its name is the column above it, until the matrix becomes cards. */
.sanctron-form-config__check-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.sanctron-form-config__catalog {
    width: 100%;
    min-width: 40rem;
}

.sanctron-form-config__chip {
    padding: 0 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    font-size: 11px;
}

.sanctron-form-config :disabled {
    cursor: not-allowed;
}

.sanctron-form-config button:disabled {
    opacity: 0.5;
}

@media (min-width: 1024px) {
    .sanctron-opportunity__row--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sanctron-opportunity__conflict {
        grid-column: 1 / -1;
    }
}

/* Search that picks one record. */
.sanctron-picker,
.sanctron-picker__field {
    position: relative;
}

.sanctron-picker__field > input {
    padding-right: 2.25rem;
    text-overflow: ellipsis;
}

.sanctron-picker__clear {
    position: absolute;
    top: 0;
    right: 0.375rem;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 0.125rem;
}

.sanctron-picker__list {
    position: absolute;
    z-index: 20;
    margin-top: 0.25rem;
    right: 0;
    left: 0;
    max-height: 16rem;
    overflow-y: auto;
    border-radius: 0.375rem;
    box-shadow: 0 8px 24px rgb(15 23 42 / 15%);
}

/* Registration in a window over the opportunity form. */
.sanctron-dialog--registration[open] {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 1rem);
    padding: 0;
    overflow: hidden;
}

.sanctron-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1rem;
}

.sanctron-dialog--registration iframe {
    flex: 1;
    width: 100%;
    border: 0;
}

.sanctron-embedded header.sticky,
.sanctron-embedded #admin-sidebar,
.sanctron-embedded nav[aria-label=''] {
    display: none !important;
}

.sanctron-embedded .group\/container > .flex-1 > div {
    padding-left: 1rem !important;
}

.sanctron-embedded .scroll-reactive-sticky {
    top: 0 !important;
}

/* Numbering of the opportunities. */
.sanctron-numbering {
    display: grid;
    gap: 1rem 2rem;
}

.sanctron-numbering__format {
    font-family: ui-monospace, Consolas, monospace;
}

.sanctron-numbering__result {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: rgb(107 114 128 / 10%);
}

.sanctron-numbering__result[aria-busy='true'] output {
    opacity: 0.4;
}

.sanctron-numbering__tags {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.sanctron-numbering__tags button {
    width: 100%;
    font-family: ui-monospace, Consolas, monospace;
}

.sanctron-numbering__preview {
    display: block;
    margin: 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.sanctron-numbering__rules {
    display: grid;
    gap: 0.375rem;
    padding-left: 1.25rem;
    list-style: disc;
}

@media (min-width: 1024px) {
    .sanctron-numbering {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Prospections: a column of the kanban that is not a stage, their status, record and list. */
.sanctron-kanban__prospects {
    border: 1px dashed #9ca3af;
    background: #f9fafb;
}

.dark .sanctron-kanban__prospects {
    border-color: #4b5563;
    background: #030712;
}

.sanctron-prospect__status {
    padding: 0 0.5rem;
    border: 1px solid #93c5fd;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    font-weight: 600;
}

.sanctron-prospect__status[data-status='converted'] {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.sanctron-prospect__status[data-status='discarded'] {
    border-color: #d1d5db;
    background: #f3f4f6;
    color: #374151;
}

.dark .sanctron-prospect__status {
    background: transparent;
    color: inherit;
}

.sanctron-prospect__data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 0.75rem 1.5rem;
}

.sanctron-prospect__wide {
    grid-column: 1 / -1;
}

/* The record of a prospection, read top down; long names and reasons wrap, and actions wrap instead of scrolling. */
.sanctron-prospect__card,
.sanctron-prospect__break,
.sanctron-prospect dd,
.sanctron-prospect__event {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sanctron-prospect__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: 0.75rem 1.5rem;
}

.sanctron-prospect__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

/* Discarding stands apart from converting and editing. */
.sanctron-prospect__separator {
    align-self: stretch;
    width: 1px;
    margin: 0 0.25rem;
    background: #d1d5db;
}

.sanctron-prospect__discard {
    border-color: #b91c1c;
    color: #b91c1c;
}

.dark .sanctron-prospect__discard {
    border-color: #f87171;
    color: #f87171;
}

@media (max-width: 640px) {
    .sanctron-prospect__header,
    .sanctron-prospect__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sanctron-prospect__actions > * {
        width: 100%;
        text-align: center;
    }

    .sanctron-prospect__actions .sanctron-prospect__discard {
        width: 100%;
    }

    .sanctron-prospect__separator {
        width: 100%;
        height: 1px;
        margin: 0.25rem 0;
    }
}

.sanctron-prospect__table {
    width: 100%;
    min-width: 48rem;
}

.sanctron-prospect__table :is(th, td) {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.dark .sanctron-prospect__table :is(th, td) {
    border-color: #1f2937;
}
