.chart-area {
    position: relative;
    height: 18rem;
    width: 100%;
}

.chart-bar {
    position: relative;
    height: 18rem;
    width: 100%;
}

.chart-pie {
    position: relative;
    height: 16rem;
    width: 100%;
}

:root {
    --envia-primary: #02adf2;
    --envia-secondary: #51cfed;
    --envia-light: #f8f2f0;
    --envia-dark: #060315;
    --envia-ink: #223044;
    --envia-surface: #ffffff;
    --envia-border: rgba(2, 173, 242, 0.12);
    --envia-shadow: 0 18px 48px rgba(6, 3, 21, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top right, rgba(81, 207, 237, 0.16), transparent 24%),
        linear-gradient(180deg, #f6fbff 0%, #f8fafc 52%, #f5f7fb 100%);
    color: var(--envia-ink);
}

#wrapper #content-wrapper {
    background: transparent;
}

.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

.table td,
.table th {
    vertical-align: middle;
}

.app-sidebar {
    background:
        linear-gradient(180deg, var(--envia-dark) 0%, color-mix(in srgb, var(--envia-dark) 72%, var(--envia-primary)) 48%, var(--envia-primary) 100%);
    box-shadow: 10px 0 34px rgba(6, 3, 21, 0.18);
}

.app-sidebar .sidebar-brand {
    height: auto;
    min-height: 5.75rem;
    padding: 1.15rem 1rem;
    gap: 0.85rem;
    text-transform: none;
}

.sidebar-brand-logo {
    width: 3.15rem;
    min-width: 3.15rem;
    height: 3.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    padding: 0.45rem;
}

.sidebar-brand-logo img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.brand-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0;
    line-height: 1.15;
}

.brand-title {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.brand-subtitle {
    font-size: 0.72rem;
    opacity: 0.72;
}

.sidebar .nav-item .nav-link {
    padding: 0.95rem 1.1rem;
    border-radius: 0.9rem;
    margin: 0.16rem 0.75rem;
    color: rgba(255, 255, 255, 0.86);
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.sidebar .nav-item .nav-link:hover,
.sidebar .nav-item.active .nav-link {
    background: rgba(255, 255, 255, 0.13);
    transform: translateX(2px);
    color: #fff;
}

.sidebar .sidebar-heading {
    color: rgba(255, 255, 255, 0.66);
    letter-spacing: 0.08em;
}

.sidebar .nav-item .nav-link i {
    color: rgba(255, 255, 255, 0.92);
}

.sidebar .sidebar-divider {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.app-topbar {
    height: auto;
    min-height: 5.15rem;
    border-top: 5px solid var(--envia-primary);
    border-bottom: 1px solid rgba(2, 173, 242, 0.08);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.topbar-content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.topbar-main {
    min-width: 0;
    flex: 1 1 auto;
}

.topbar-user {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.topbar-user-menu {
    flex: 0 0 auto;
}

.topbar-user-button {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(2, 173, 242, 0.12);
    background: #fff;
    color: var(--envia-ink);
    padding: 0.35rem 0.7rem 0.35rem 0.45rem;
}

.topbar-user-button:hover,
.topbar-user-button:focus {
    background: rgba(2, 173, 242, 0.06);
    border-color: rgba(2, 173, 242, 0.28);
    color: var(--envia-ink);
}

.topbar-user-avatar {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    background: rgba(2, 173, 242, 0.1);
    color: var(--envia-primary);
}

.topbar-user-label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.topbar-user-label strong {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--envia-ink);
    font-size: 0.86rem;
}

.topbar-user-label small {
    color: #7b8aa0;
    font-size: 0.72rem;
    font-weight: 700;
}

.topbar-user-caret {
    color: #8a98aa;
    font-size: 0.72rem;
}

.topbar-user-dropdown {
    min-width: 14rem;
    overflow: hidden;
    border: 1px solid rgba(2, 173, 242, 0.1);
    border-radius: 1rem;
    padding: 0.4rem 0;
}

.topbar-user-dropdown-header {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(2, 173, 242, 0.08);
}

.topbar-user-dropdown-header strong {
    color: var(--envia-ink);
    font-size: 0.92rem;
}

.topbar-user-dropdown-header small {
    color: #7b8aa0;
    font-size: 0.78rem;
}

.profile-info-item {
    min-height: 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid rgba(2, 173, 242, 0.1);
    border-radius: 1rem;
    background: #fbfdff;
}

.profile-info-item span {
    color: #7b8aa0;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-info-item strong {
    color: var(--envia-ink);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.topbar-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.topbar-icon-button {
    position: relative;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    border: 1px solid rgba(2, 173, 242, 0.12);
    color: var(--envia-primary);
    background: #f8fbff;
}

.topbar-icon-button:hover,
.topbar-icon-button:focus {
    color: #007ec1;
    background: rgba(2, 173, 242, 0.08);
    border-color: rgba(2, 173, 242, 0.28);
}

.topbar-notification-badge {
    position: absolute;
    top: -0.28rem;
    right: -0.24rem;
    min-width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 0.32rem;
    background: #e74a3b;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0.28rem 0.7rem rgba(231, 74, 59, 0.28);
}

.topbar-notification-menu {
    width: min(21rem, calc(100vw - 2rem));
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(2, 173, 242, 0.1);
    border-radius: 1rem;
}

.topbar-notification-header {
    padding: 0.85rem 1rem;
    background: #f1f8fd;
    color: #48627c;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.topbar-notification-empty {
    padding: 1rem;
    color: #7b8aa0;
    font-size: 0.9rem;
}

.topbar-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    white-space: normal;
}

.topbar-notification-icon {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    background: rgba(2, 173, 242, 0.1);
    color: var(--envia-primary);
}

.topbar-notification-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.topbar-notification-copy strong {
    color: var(--envia-ink);
    font-size: 0.9rem;
}

.topbar-notification-copy small {
    color: #7b8aa0;
    font-size: 0.78rem;
}

.topbar-kicker {
    color: var(--envia-primary);
    font-size: 0.73rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
}

.topbar-description {
    color: #7b8aa0;
    font-size: 0.95rem;
}

.card {
    border: 0;
    border-radius: 1.1rem;
    box-shadow: var(--envia-shadow);
}

.card-header {
    background: linear-gradient(180deg, rgba(2, 173, 242, 0.02) 0%, rgba(81, 207, 237, 0.06) 100%);
    border-bottom: 1px solid rgba(2, 173, 242, 0.08);
}

.home-hero {
    background:
        linear-gradient(135deg, rgba(6, 3, 21, 0.98) 0%, rgba(12, 42, 88, 0.95) 45%, rgba(2, 173, 242, 0.88) 100%);
    color: #fff;
    overflow: hidden;
}

.home-hero-badge,
.cadastro-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-hero-title,
.cadastro-hero-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.home-hero-text,
.cadastro-hero-text {
    color: rgba(255, 255, 255, 0.82);
    max-width: 46rem;
}

.home-hero-panel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.2rem;
    padding: 1.25rem;
    backdrop-filter: blur(8px);
}

.home-hero-logo {
    max-width: 15rem;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.home-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.home-hero-stat {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.9rem;
}

.home-hero-stat strong {
    display: block;
    font-size: 1rem;
    color: #fff;
}

.home-hero-stat span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.74);
}

.module-card {
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--envia-primary);
}

.module-card::after {
    content: '';
    position: absolute;
    inset: auto -30% -30% auto;
    width: 9rem;
    height: 9rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(81, 207, 237, 0.18) 0%, transparent 70%);
}

.module-card-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(2, 173, 242, 0.14) 0%, rgba(81, 207, 237, 0.28) 100%);
    color: var(--envia-primary);
}

.cadastro-shell {
    padding-bottom: 1rem;
}

.cadastro-hero-card {
    background:
        linear-gradient(135deg, rgba(6, 3, 21, 0.97) 0%, rgba(13, 40, 82, 0.94) 48%, rgba(2, 173, 242, 0.84) 100%);
    color: #fff;
}

.cadastro-hero-status {
    display: flex;
    align-items: center;
}

.cadastro-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.cadastro-status-pill.is-edit {
    color: #fff4cc;
}

.cadastro-status-pill.is-create {
    color: #defcff;
}

.cadastro-form-card .card-body {
    background: rgba(255, 255, 255, 0.98);
}

.cadastro-section {
    border: 1px solid var(--envia-border);
    border-radius: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 255, 0.92) 100%);
}

.cadastro-section-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--envia-dark);
}

.cadastro-section-description {
    color: #7a8ba3;
    font-size: 0.92rem;
}

.cadastro-label {
    font-weight: 700;
    color: #425066;
    margin-bottom: 0.45rem;
}

.cadastro-input,
.cadastro-select,
.cadastro-textarea,
.cadastro-filter-form .form-control {
    min-height: 3.05rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(2, 173, 242, 0.16);
    background: #fff;
    color: var(--envia-ink);
    box-shadow: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.cadastro-textarea {
    min-height: 7rem;
    resize: vertical;
}

.cadastro-input:focus,
.cadastro-select:focus,
.cadastro-textarea:focus,
.cadastro-filter-form .form-control:focus {
    border-color: rgba(2, 173, 242, 0.55);
    box-shadow: 0 0 0 0.22rem rgba(2, 173, 242, 0.12);
}

.cadastro-input.success,
.cadastro-select.success,
.cadastro-textarea.success {
    border-color: #3cc17a !important;
    box-shadow: 0 0 0 0.18rem rgba(60, 193, 122, 0.13) !important;
}

.cadastro-input.error,
.cadastro-select.error,
.cadastro-textarea.error,
.cadastro-input.is-invalid,
.cadastro-select.is-invalid,
.cadastro-textarea.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.18rem rgba(220, 53, 69, 0.12) !important;
}

.cadastro-form .error {
    font-size: inherit !important;
    line-height: inherit !important;
    position: static !important;
    width: auto !important;
}

.cadastro-form .error::before,
.cadastro-form .error::after {
    content: none !important;
    animation: none !important;
    background: transparent !important;
    text-shadow: none !important;
}

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    min-height: 3.05rem;
    border-radius: 0.9rem !important;
    border: 1px solid rgba(2, 173, 242, 0.16) !important;
    display: flex !important;
    align-items: center;
    padding: 0.2rem 0.85rem;
    background: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--envia-ink) !important;
    line-height: 1.4 !important;
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #7a8ba3 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 0.8rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8392a7;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: rgba(2, 173, 242, 0.55) !important;
    box-shadow: 0 0 0 0.22rem rgba(2, 173, 242, 0.12) !important;
}

.select2-dropdown {
    border: 1px solid rgba(2, 173, 242, 0.18) !important;
    border-radius: 1rem !important;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(6, 3, 21, 0.14);
}

.select2-search--dropdown {
    padding: 0.75rem;
}

.select2-search--dropdown .select2-search__field {
    border-radius: 0.75rem !important;
    border: 1px solid rgba(2, 173, 242, 0.18) !important;
    min-height: 2.7rem;
    padding: 0.55rem 0.75rem !important;
}

.select2-results__option {
    padding: 0.7rem 0.95rem !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: linear-gradient(135deg, var(--envia-primary) 0%, #0094db 100%) !important;
}

.select2-container--default .select2-results__option--selected {
    background: rgba(2, 173, 242, 0.08) !important;
    color: var(--envia-ink) !important;
}

.select2-container--default.select2-container--disabled .select2-selection--single {
    background: #eef3f8 !important;
    opacity: 0.8;
}

.cadastro-actions {
    border-top: 1px solid rgba(2, 173, 242, 0.08);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

.btn {
    border-radius: 0.9rem;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary,
.btn-info {
    background: linear-gradient(135deg, var(--envia-primary) 0%, var(--envia-secondary) 100%);
    border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-info:hover,
.btn-info:focus {
    background: linear-gradient(135deg, var(--envia-secondary) 0%, var(--envia-primary) 100%);
    border-color: transparent;
    box-shadow: 0 0.6rem 1.4rem rgba(2, 173, 242, 0.2);
}

.theme-color-control .theme-color-picker {
    flex: 0 0 3.25rem;
    max-width: 3.25rem;
    padding: 0.2rem;
}

.theme-preview {
    min-height: 15rem;
    display: grid;
    grid-template-columns: minmax(6rem, 38%) 1fr;
    overflow: hidden;
    border: 1px solid rgba(34, 48, 68, 0.12);
    border-radius: 0.5rem;
    background: var(--preview-light);
    color: var(--preview-ink);
}

.theme-preview-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    text-align: center;
    background: linear-gradient(180deg, var(--preview-dark), var(--preview-primary));
    color: #fff;
}

.theme-preview-sidebar img {
    width: 3.5rem;
    max-height: 3.5rem;
    object-fit: contain;
}

.theme-preview-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
}

.theme-preview-content span {
    display: block;
    height: 0.75rem;
    border-radius: 0.25rem;
    background: color-mix(in srgb, var(--preview-ink) 14%, transparent);
}

.theme-preview-content span:nth-child(2) {
    width: 72%;
}

.theme-preview-content button {
    border: 0;
    border-radius: 0.4rem;
    padding: 0.55rem 0.75rem;
    background: var(--preview-primary);
    color: #fff;
    font-weight: 700;
}

.operation-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.operation-summary-grid > div {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid var(--envia-border);
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--envia-primary) 4%, #fff);
}

.operation-summary-grid small,
.operation-summary-grid strong {
    display: block;
}

.operation-summary-grid small {
    color: #6c788a;
    margin-bottom: 0.25rem;
}

.operation-summary-grid strong {
    color: var(--envia-ink);
    overflow-wrap: anywhere;
}

.freight-volume-row {
    display: grid;
    grid-template-columns: 0.8fr repeat(3, 1fr) auto;
    gap: 0.6rem;
    align-items: end;
    padding: 0.75rem;
    margin-bottom: 0.65rem;
    border: 1px solid var(--envia-border);
    border-radius: 0.45rem;
}

.freight-volume-row label {
    min-width: 0;
    margin: 0;
}

.freight-volume-row label span {
    display: block;
    margin-bottom: 0.25rem;
    color: #6c788a;
    font-size: 0.75rem;
    font-weight: 700;
}

.freight-remove-volume {
    width: 2.5rem;
    height: 2.5rem;
}

@media (max-width: 767.98px) {
    .operation-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .freight-volume-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .freight-remove-volume {
        grid-column: 2;
        justify-self: end;
    }

    .freight-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.btn-outline-primary {
    color: var(--envia-primary);
    border-color: rgba(2, 173, 242, 0.28);
}

.btn-outline-primary:hover {
    background: rgba(2, 173, 242, 0.08);
    color: #007ec1;
    border-color: rgba(2, 173, 242, 0.4);
}

.cadastro-list-header .small {
    font-weight: 700;
}

.cadastro-list-action {
    min-width: 13rem;
    justify-content: center;
}

.cadastro-filter-form {
    width: 100%;
}

#cardsContainer-clientes,
#cardsContainer-destinatarios,
#cardsContainer-fornecedores,
#cardsContainer-transportadoras,
#cardsContainer-mercados,
#cardsContainer-regioes,
#cardsContainer-centros-custo {
    margin-top: 1rem;
}

.card-hover,
.entity-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(2, 173, 242, 0.08);
}

.card-hover:hover,
.entity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.9rem 2.1rem rgba(58, 59, 69, 0.14) !important;
}

.entity-card .card-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.entity-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    background: rgba(2, 173, 242, 0.08);
    color: var(--envia-primary) !important;
    font-size: 1.1rem;
}

.entity-card-meta {
    min-height: 4.5rem;
}

.cadastro-table {
    border-radius: 1rem;
    overflow: hidden;
}

.cadastro-table thead th {
    background: #f1f8fd;
    color: #48627c;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-width: 1px;
}

.cadastro-tabulator-wrapper {
    margin-top: 1rem;
}

.cadastro-tabulator-table {
    border: 1px solid rgba(2, 173, 242, 0.12);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}

.cadastro-tabulator-table .tabulator {
    border: 0;
    background: transparent;
    font-size: 0.95rem;
}

.cadastro-tabulator-table .tabulator-header {
    border-bottom: 1px solid rgba(2, 173, 242, 0.08);
    background: #f1f8fd;
}

.cadastro-tabulator-table .tabulator-col {
    background: #f1f8fd;
    border-right-color: rgba(2, 173, 242, 0.08);
}

.cadastro-tabulator-table .tabulator-col .tabulator-col-title {
    color: #48627c;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cadastro-tabulator-table .tabulator-row {
    border-bottom-color: rgba(2, 173, 242, 0.08);
}

.cadastro-tabulator-table .tabulator-row.tabulator-row-even {
    background: rgba(2, 173, 242, 0.02);
}

.cadastro-tabulator-table .tabulator-cell {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    border-right-color: rgba(2, 173, 242, 0.06);
}

.cadastro-tabulator-table .tabulator-footer {
    border-top: 1px solid rgba(2, 173, 242, 0.08);
    background: #fbfdff;
}

.cadastro-tabulator-table .tabulator-page,
.cadastro-tabulator-table .tabulator-footer .tabulator-page-size {
    border-radius: 0.7rem;
    border-color: rgba(2, 173, 242, 0.18);
}

.cadastro-tabulator-table .tabulator-page.active {
    background: linear-gradient(135deg, var(--envia-primary) 0%, #0094db 100%);
    border-color: transparent;
}

.cadastro-tabulator-actions-cell {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.cadastro-empty-state {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.legacy-form-shell {
    max-width: 980px;
    margin: 0 auto 1.5rem;
}

.legacy-window-card {
    border: 1px solid #7f9db9;
    background: #efefef;
    box-shadow: 0 0.35rem 1.1rem rgba(6, 3, 21, 0.12);
    font-family: Tahoma, Arial, sans-serif;
    color: #111;
}

.legacy-window-title {
    min-height: 2rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.55rem;
    background: linear-gradient(180deg, #d9edf9 0%, #8bb7d5 100%);
    border-bottom: 1px solid #7f9db9;
    font-size: 0.86rem;
    color: #071629;
}

.legacy-window-icon {
    width: 0.85rem;
    height: 0.85rem;
    display: inline-block;
    border: 1px solid #52687c;
    background: #f4fff7;
    box-shadow: inset -3px -3px 0 #9ad58e;
}

.legacy-form {
    padding: 0.55rem;
}

.legacy-header-strip {
    border: 1px solid #b9b9b9;
    background: #f3f3f3;
    padding: 0.85rem 0.8rem 0.65rem;
    margin-bottom: 0.65rem;
}

.legacy-tabs {
    border-bottom-color: #8d8d8d;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 0.15rem;
}

.legacy-tabs .nav-item {
    min-width: 0;
}

.legacy-tabs .nav-link {
    border: 1px solid #8d8d8d;
    border-bottom-color: #8d8d8d;
    border-radius: 0.45rem 0.45rem 0 0;
    padding: 0.18rem 0.55rem;
    min-height: 1.4rem;
    color: #08082e;
    background: #ededed;
    font-size: 0.78rem;
    line-height: 1.1;
    text-align: center;
}

.legacy-tabs .nav-link.active {
    color: #08082e;
    background: #efefef;
    border-bottom-color: #efefef;
    font-weight: 700;
    text-decoration: underline dotted;
}

.legacy-tab-content {
    min-height: 27rem;
    border: 1px solid #8d8d8d;
    border-top: 0;
    background: #efefef;
    padding: 0.9rem 0.75rem;
}

.legacy-fieldset {
    border: 1px solid #c6c6c6;
    background: #efefef;
    min-height: 19rem;
    padding: 0.8rem 0.9rem;
    margin: 0 0 0.75rem;
}

.legacy-fieldset legend,
.legacy-grid-title {
    width: auto;
    margin: 0 auto 0.55rem;
    padding: 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #00003c;
}

.legacy-grid-title {
    display: table;
    margin-bottom: 0;
    border: 1px solid #333;
    border-bottom: 0;
    background: #efefef;
    color: #111;
    font-weight: 400;
}

.legacy-form-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.24rem 0.7rem;
    margin-bottom: 0.16rem;
}

.legacy-field {
    width: var(--legacy-field-width);
    max-width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.28rem;
}

.legacy-field.legacy-field-fill {
    flex: 1 1 24rem;
}

.legacy-label {
    flex: 0 0 7.8rem;
    margin: 0.18rem 0 0;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.1;
    text-align: right;
    color: #111;
}

.legacy-control {
    min-width: 0;
    flex: 1 1 auto;
}

.legacy-form .cadastro-input,
.legacy-form .cadastro-select,
.legacy-form .cadastro-textarea {
    min-height: 1.25rem;
    height: 1.25rem;
    padding: 0.08rem 0.22rem;
    border-radius: 0;
    border: 1px solid #a7a7a7;
    background: #fff;
    color: #111;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.08);
    transition: none;
}

.legacy-form .cadastro-input:focus,
.legacy-form .cadastro-select:focus,
.legacy-form .cadastro-textarea:focus {
    border-color: #4b89b5;
    box-shadow: 0 0 0 0.12rem rgba(75, 137, 181, 0.2);
}

.legacy-form .cadastro-textarea {
    min-height: 5.5rem;
    height: auto;
    font-weight: 400;
}

.legacy-form input:not([type="hidden"]).cadastro-input,
.legacy-form select.cadastro-select {
    background-color: #ffffca;
}

.legacy-form .select2-container .select2-selection--single {
    min-height: 1.25rem;
    height: 1.25rem;
    border-radius: 0 !important;
    border-color: #a7a7a7 !important;
    padding: 0 1.25rem 0 0.22rem;
    background: #ffffca !important;
    box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.08);
}

.legacy-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.15rem !important;
    font-size: 0.78rem;
    font-weight: 600;
}

.legacy-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 0.1rem !important;
}

.legacy-grid-block {
    margin: 0.35rem 0 1rem;
}

.legacy-grid-scroll {
    max-height: 24rem;
    border: 1px solid #333;
    background: #f7f7f7;
}

.legacy-grid-table {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 0.78rem;
    color: #111;
    background: #f5f5f5;
}

.legacy-grid-table th,
.legacy-grid-table td {
    height: 1.15rem;
    padding: 0.02rem 0.22rem;
    border: 1px solid #333 !important;
    line-height: 1.05;
    white-space: nowrap;
}

.legacy-grid-table th {
    background: #e8e8e8;
    font-weight: 400;
}

.legacy-selector-col {
    width: 2.1rem;
    text-align: center;
}

.legacy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0.15rem 0.1rem;
}

.legacy-form-shell {
    max-width: 1180px;
    margin: 0 auto 1.5rem;
}

.legacy-window-card {
    border: 1px solid rgba(2, 173, 242, 0.1);
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: var(--envia-shadow);
    font-family: 'Inter', sans-serif;
    color: var(--envia-ink);
    overflow: hidden;
}

.legacy-window-title {
    min-height: auto;
    padding: 1.15rem 1.25rem;
    background:
        linear-gradient(135deg, rgba(6, 3, 21, 0.98) 0%, rgba(13, 40, 82, 0.95) 52%, rgba(2, 173, 242, 0.86) 100%);
    border-bottom: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0;
}

.legacy-window-icon {
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.legacy-window-icon::before {
    content: "\f15c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 0.95rem;
}

.legacy-form {
    padding: 1.25rem;
    background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
}

.legacy-header-strip {
    border: 1px solid rgba(2, 173, 242, 0.1);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.35rem 1.2rem rgba(6, 3, 21, 0.05);
}

.legacy-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    border-bottom: 0;
    margin-bottom: 1rem;
}

.legacy-tabs .nav-item {
    min-width: 0;
}

.legacy-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    border: 1px solid rgba(2, 173, 242, 0.14);
    border-radius: 0.8rem;
    padding: 0.65rem 0.9rem;
    background: #fff;
    color: #48627c;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    box-shadow: 0 0.25rem 0.9rem rgba(6, 3, 21, 0.04);
}

.legacy-tabs .nav-link:hover {
    border-color: rgba(2, 173, 242, 0.32);
    color: var(--envia-primary);
}

.legacy-tabs .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--envia-primary) 0%, #007ec1 100%);
    border-color: transparent;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 0.55rem 1.2rem rgba(2, 173, 242, 0.18);
}

.legacy-tab-content {
    min-height: 0;
    border: 0;
    border-radius: 1rem;
    background: transparent;
    padding: 0;
}

.legacy-fieldset {
    border: 1px solid rgba(2, 173, 242, 0.1);
    border-radius: 1rem;
    background: #fff;
    min-height: 0;
    padding: 1.15rem;
    margin: 0 0 1rem;
    box-shadow: 0 0.35rem 1.2rem rgba(6, 3, 21, 0.05);
}

.legacy-fieldset legend,
.legacy-grid-title {
    width: auto;
    margin: 0 0 0.9rem;
    padding: 0;
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--envia-dark);
}

.legacy-grid-title {
    display: block;
    border: 0;
    background: transparent;
}

.legacy-form-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.legacy-form-row:last-child {
    margin-bottom: 0;
}

.legacy-field {
    width: min(100%, var(--legacy-field-width));
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
}

.legacy-field.legacy-field-fill {
    flex: 1 1 24rem;
}

.legacy-label {
    flex: none;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    color: #425066;
}

.legacy-control {
    min-width: 0;
    flex: 1 1 auto;
}

.legacy-form .cadastro-input,
.legacy-form .cadastro-select,
.legacy-form .cadastro-textarea {
    min-height: 2.65rem;
    height: auto;
    padding: 0.55rem 0.75rem;
    border-radius: 0.78rem;
    border: 1px solid rgba(2, 173, 242, 0.16);
    background: #fff;
    color: var(--envia-ink);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: none;
}

.legacy-form .cadastro-input::placeholder,
.legacy-form .cadastro-textarea::placeholder {
    color: #8a98aa;
    font-weight: 600;
}

.legacy-form .cadastro-input:focus,
.legacy-form .cadastro-select:focus,
.legacy-form .cadastro-textarea:focus {
    border-color: rgba(2, 173, 242, 0.55);
    box-shadow: 0 0 0 0.22rem rgba(2, 173, 242, 0.12);
}

.legacy-form .cadastro-textarea {
    min-height: 7rem;
    resize: vertical;
    font-weight: 500;
}

.legacy-form input:not([type="hidden"]).cadastro-input,
.legacy-form select.cadastro-select {
    background-color: #fff;
}

.legacy-form .select2-container .select2-selection--single {
    min-height: 2.65rem;
    height: 2.65rem;
    border-radius: 0.78rem !important;
    border-color: rgba(2, 173, 242, 0.16) !important;
    padding: 0.2rem 2.2rem 0.2rem 0.75rem;
    background: #fff !important;
    box-shadow: none;
}

.legacy-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 2.1rem !important;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--envia-ink) !important;
}

.legacy-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 0.65rem !important;
}

.legacy-grid-block {
    margin: 0 0 1rem;
    border: 1px solid rgba(2, 173, 242, 0.1);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 0.35rem 1.2rem rgba(6, 3, 21, 0.05);
}

.legacy-tabulator-block .legacy-grid-title {
    margin-bottom: 0.85rem;
}

.legacy-tabulator-grid {
    min-height: 12rem;
}

.legacy-tabulator-grid .tabulator-placeholder {
    min-height: 10rem;
}

.legacy-tabulator-grid .tabulator-placeholder span {
    color: #6f7f90;
    font-size: 0.92rem;
    font-weight: 700;
}

.legacy-grid-scroll {
    max-height: 24rem;
    border: 1px solid rgba(2, 173, 242, 0.1);
    border-radius: 0.85rem;
    background: #fff;
}

.legacy-grid-table {
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    color: var(--envia-ink);
    background: #fff;
}

.legacy-grid-table th,
.legacy-grid-table td {
    height: auto;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(2, 173, 242, 0.08) !important;
    line-height: 1.2;
    white-space: nowrap;
}

.legacy-grid-table th {
    background: #f1f8fd;
    color: #48627c;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.legacy-selector-col {
    width: 2.1rem;
    text-align: center;
    color: var(--envia-primary);
    font-weight: 800;
}

.legacy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.25rem 0 0;
}

.legacy-actions .btn {
    min-height: 2.7rem;
    border-radius: 0.85rem;
}

#viewControls-clientes,
#viewControls-destinatarios,
#viewControls-fornecedores,
#viewControls-transportadoras,
#viewControls-mercados,
#viewControls-regioes,
#viewControls-centros-custo {
    margin-bottom: 1rem;
}

.alert {
    border-radius: 1rem;
    border: 0;
}

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

@media (max-width: 991.98px) {
    .app-topbar {
        min-height: auto;
    }

    .topbar-description {
        font-size: 0.9rem;
    }

    .cadastro-list-action {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .topbar-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
        align-items: flex-start;
    }

    .topbar-user-menu {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
        min-width: 0;
    }

    .topbar-user-button {
        max-width: 100%;
    }

    .topbar-user-label strong {
        max-width: 9rem;
    }

    .home-hero-title,
    .cadastro-hero-title {
        font-size: 1.45rem;
    }

    .home-hero-stats {
        grid-template-columns: 1fr;
    }

    .cadastro-section {
        padding: 0.9rem;
    }

    .cadastro-actions .btn,
    .cadastro-form-card .card-header .btn,
    .cadastro-list-action,
    .cadastro-filter-form .btn {
        width: 100%;
    }

    .legacy-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .legacy-field {
        width: 100% !important;
    }

    .legacy-label {
        flex-basis: 6.8rem;
    }

    .legacy-actions .btn {
        width: 100%;
    }

    .entity-card .card-body {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .brand-text-group {
        display: none;
    }

    .sidebar-brand-logo {
        margin: 0 auto;
    }

    .home-hero-panel,
    .cadastro-hero-status {
        width: 100%;
    }

    .cadastro-status-pill {
        width: 100%;
        justify-content: center;
    }
}
.operation-table-thumb {
    align-items: center;
    background: #f8f9fc;
    border: 1px solid #e3e6f0;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    object-fit: contain;
    width: 48px;
}

.operation-table-thumb-empty {
    color: #b7b9cc;
}

.operation-detail-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
}

.operation-product-photo {
    background: #fff;
    border: 1px solid #e3e6f0;
    height: 240px;
    object-fit: contain;
    width: 100%;
}

.operation-chart-frame {
    height: 360px;
    margin: 0 auto;
    max-width: 760px;
    position: relative;
}

.app-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1090;
    width: min(24rem, calc(100vw - 2rem));
}

.app-toast {
    margin-bottom: 0.75rem;
    box-shadow: 0 0.75rem 2rem rgba(34, 48, 68, 0.24);
    opacity: 1;
}

.app-toast .toast-body {
    font-weight: 600;
}

.app-toast .close {
    color: inherit;
    opacity: 0.85;
    text-shadow: none;
}

@media (max-width: 767.98px) {
    .operation-detail-layout {
        grid-template-columns: 1fr;
    }
}
