@import url('https://fonts.bunny.net/css?family=Inter:400,500,600,700&display=swap');

:root {
    --primary: #162556;
    --blue: #162556;
    --bs-primary: #162556;
    --bs-primary-rgb: 22, 37, 86;
    --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-family-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

html,
body,
button,
input,
optgroup,
select,
textarea,
.btn,
.form-control,
.dropdown-menu,
.popover,
.tooltip {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important;
}

.navbar.bg-primary,
#full-app-container > .navbar,
.bg-primary {
    background-color: #162556 !important;
}

.btn-primary,
a.btn-primary {
    color: #fff !important;
    background-color: #162556 !important;
    border-color: #162556 !important;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle,
a.btn-primary:hover,
a.btn-primary:active,
a.btn-primary:focus {
    color: #fff !important;
    background-color: #162556 !important;
    border-color: #162556 !important;
    box-shadow: 0 0 0 0.2rem rgba(22, 37, 86, 0.25) !important;
}

.btn-outline-primary {
    color: #162556 !important;
    border-color: #162556 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn-outline-primary.dropdown-toggle {
    color: #fff !important;
    background-color: #162556 !important;
    border-color: #162556 !important;
    box-shadow: 0 0 0 0.2rem rgba(22, 37, 86, 0.25) !important;
}

.text-primary,
a.text-primary {
    color: #162556 !important;
}

a,
a:hover,
a.text-primary:hover,
a.text-primary:focus {
    color: #162556;
}

.border-primary {
    border-color: #162556 !important;
}

.badge-primary,
.progress-bar,
.page-item.active .page-link,
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #162556 !important;
    border-color: #162556 !important;
}

.page-link {
    color: #162556;
}

.page-link:hover {
    color: #162556;
}

.form-control:focus,
.custom-select:focus {
    border-color: #162556;
    box-shadow: 0 0 0 0.2rem rgba(22, 37, 86, 0.25);
}

.header-user-context {
    color: rgba(255, 255, 255, 0.72) !important;
    display: flex;
    flex-direction: column;
    font-size: 0.68rem;
    line-height: 1.1;
    padding-bottom: 0.25rem;
    padding-top: 0.25rem;
}

.header-user-context small {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    margin-top: 0.1rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-search-actions,
.order-search-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.product-search-action,
.order-search-action {
    align-items: center;
    border-radius: 0.35rem;
    display: inline-flex;
    font-weight: 600;
    gap: 0.4rem;
    height: 38px;
    justify-content: center;
    min-width: 118px;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
}

.order-search-action {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

.product-search-action i,
.order-search-action i {
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .product-search-actions,
    .order-search-actions {
        gap: 0.5rem;
    }

    .product-search-action,
    .order-search-action {
        flex: 1 1 0;
        min-width: 0;
    }
}

.orders-result-table td.py-0.px-0,
.products-result-table td.py-0.px-0,
.customers-result-table td.py-0.px-0 {
    padding-left: 0.18rem !important;
    padding-right: 0.18rem !important;
    width: 48px;
}

.orders-result-table td.py-0.px-0 form,
.products-result-table td.py-0.px-0 form,
.customers-result-table td.py-0.px-0 form {
    margin: 0;
}

.orders-result-table td.py-0.px-0 .btn,
.products-result-table td.py-0.px-0 .btn,
.customers-result-table td.py-0.px-0 .btn {
    align-items: center !important;
    border-radius: 0.55rem !important;
    display: flex !important;
    height: 52px !important;
    justify-content: center !important;
    margin: 0.22rem auto;
    min-width: 42px;
    max-width: 42px;
    width: 42px !important;
}

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

.notes-management-table thead th {
    border-bottom: 1px solid #dfe4ea !important;
    color: #00142f;
    font-weight: 700;
    white-space: nowrap;
}

.notes-actions-heading,
.notes-actions-cell {
    width: 96px;
}

.notes-actions-toggle {
    align-items: center;
    border-radius: 0.45rem;
    display: inline-flex;
    font-weight: 600;
    gap: 0.35rem;
    height: 34px;
    justify-content: center;
    min-width: 86px;
}

.notes-actions-menu {
    border: 1px solid #dfe4ea;
    border-radius: 0.45rem;
    box-shadow: 0 0.5rem 1.25rem rgba(16, 24, 40, 0.14);
    min-width: 190px;
    padding: 0.35rem;
}

.notes-actions-menu .dropdown-item {
    align-items: center;
    border-radius: 0.35rem;
    display: flex;
    font-weight: 600;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
}

.notes-actions-menu .dropdown-item i {
    text-align: center;
    width: 1rem;
}

.fiscal-cloud-table-wrapper {
    overflow-y: visible;
}

.fiscal-cloud-table {
    white-space: nowrap;
}

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

.fiscal-cloud-table thead th {
    border-bottom: 1px solid #dfe4ea !important;
    color: #00142f;
    font-weight: 700;
    white-space: nowrap;
}

.fiscal-cloud-import-heading,
.fiscal-cloud-import-cell {
    width: 126px;
}

.fiscal-cloud-actions-heading,
.fiscal-cloud-actions-cell {
    width: 245px;
}

.fiscal-cloud-import-button {
    align-items: center;
    display: inline-flex;
    font-weight: 600;
    gap: 0.35rem;
    justify-content: center;
    min-width: 92px;
}

.fiscal-cloud-import-badge {
    font-size: 0.78rem;
    padding: 0.4rem 0.55rem;
}

.fiscal-cloud-actions-list {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: center;
    min-width: 220px;
}

.fiscal-cloud-action-button {
    align-items: center;
    display: flex;
    font-weight: 600;
    gap: 0.35rem;
    justify-content: center;
    min-width: 76px;
}

.fiscal-cloud-action-button i {
    text-align: center;
    width: 1rem;
}

.cashier-page-card {
    border-color: #dfe4ea !important;
    box-shadow: 0 0.35rem 1rem rgba(16, 24, 40, 0.08);
}

.cashier-summary-table {
    border-collapse: separate;
    border-spacing: 0 0.28rem;
    color: #212529;
}

.cashier-summary-table thead th,
.cashier-summary-table .thead-dark th {
    background: #eef2f7 !important;
    border: 0 !important;
    border-radius: 0.45rem;
    color: #162556 !important;
    font-weight: 700;
    padding: 0.65rem 0.85rem;
}

.cashier-summary-table tbody tr {
    background: #fff;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.06);
}

.cashier-summary-table tbody td {
    border: 0 !important;
    padding: 0.55rem 0.85rem;
    vertical-align: middle;
}

.cashier-summary-table tbody td:first-child {
    border-bottom-left-radius: 0.35rem;
    border-top-left-radius: 0.35rem;
}

.cashier-summary-table tbody td:last-child {
    border-bottom-right-radius: 0.35rem;
    border-top-right-radius: 0.35rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.cashier-summary-table tbody tr.font-weight-bold.bg-light td,
.cashier-summary-table tbody tr.bg-light td {
    background: #f6f8fb !important;
    color: #162556;
}

.login-page {
    align-items: center;
    background: #f3f6fb;
    display: flex;
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    padding: 3rem 1rem;
    position: relative;
}

.login-page::before {
    background: url("../img/logo-herosistemas-pb.png") center/520px auto no-repeat;
    content: "";
    inset: 0;
    opacity: 0.045;
    pointer-events: none;
    position: absolute;
}

.login-shell {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 0.75rem;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.24);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
    max-width: 980px;
    overflow: hidden;
    position: relative;
    width: 100%;
    z-index: 1;
}

.login-brand-panel {
    align-items: center;
    background: linear-gradient(145deg, #fff 0%, #f7fbff 46%, rgba(22, 37, 86, 0.14) 100%);
    display: flex;
    justify-content: center;
    min-height: 520px;
    overflow: hidden;
    padding: 3rem;
    position: relative;
}

.login-brand-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    justify-content: center;
    max-width: 360px;
    position: relative;
    text-align: center;
    z-index: 1;
}

.login-brand-logo {
    display: block;
    height: auto;
    max-width: min(340px, 88%);
    width: 340px;
}

.login-brand-copy h1 {
    color: #162556;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

.login-brand-copy p {
    color: #536070;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0.45rem 0 0;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
}

.login-card-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.login-card-logo {
    display: none;
    height: 42px;
    width: auto;
}

.login-card h2 {
    color: #162556;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
}

.login-card p {
    color: #6c757d;
    margin: 0.25rem 0 0;
}

.login-card label {
    color: #343a40;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.login-input-shell {
    position: relative;
}

.login-input-shell > i {
    color: #7b8493;
    left: 1rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.login-input-shell .form-control,
.login-input-shell .select2-container--default .select2-selection--single {
    border: 1px solid #d7dde6;
    border-radius: 0.5rem;
    box-shadow: none;
    height: 46px;
    padding-left: 2.65rem;
}

.login-input-shell .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
    padding-left: 0;
}

.login-input-shell .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
}

.login-input-shell .form-control:focus,
.login-input-shell .select2-container--focus .select2-selection--single {
    border-color: #162556;
    box-shadow: 0 0 0 0.2rem rgba(22, 37, 86, 0.14);
}

.login-form-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.login-submit {
    align-items: center;
    border-radius: 0.5rem;
    display: inline-flex;
    font-weight: 800;
    gap: 0.55rem;
    height: 46px;
    justify-content: center;
    width: 100%;
}

.login-submit i {
    font-size: 0.9rem;
}

.permission-page {
    padding-left: 1rem;
    padding-right: 1rem;
}

.permission-shell {
    position: relative;
    width: min(100%, 620px);
    z-index: 1;
}

.permission-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 0.75rem;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.18);
    padding: 2.25rem;
}

.permission-card-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.permission-card-logo {
    height: 44px;
    width: auto;
}

.permission-card h2 {
    color: #162556;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
}

.permission-card p {
    color: #6c757d;
    margin: 0.25rem 0 0;
}

.permission-options {
    display: grid;
    gap: 0.75rem;
}

.permission-option-wrapper {
    position: relative;
}

.permission-option-input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.permission-option {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe4ea;
    border-radius: 0.65rem;
    cursor: pointer;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: auto 1fr auto;
    margin: 0;
    padding: 0.95rem 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.permission-option:hover {
    border-color: #162556;
    box-shadow: 0 0.75rem 1.75rem rgba(22, 37, 86, 0.12);
    transform: translateY(-1px);
}

.permission-option-icon,
.permission-option-check {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.permission-option-icon {
    background: rgba(22, 37, 86, 0.1);
    color: #162556;
}

.permission-option-check {
    background: #eef2f7;
    color: transparent;
}

.permission-option-text strong {
    color: #162556;
    display: block;
    font-size: 1rem;
}

.permission-option-text small {
    color: #6c757d;
    display: block;
    margin-top: 0.12rem;
}

.permission-option-input:focus + .permission-option,
.permission-option-input:checked + .permission-option {
    border-color: #162556;
    box-shadow: 0 0 0 0.18rem rgba(22, 37, 86, 0.12);
}

.permission-option-input:checked + .permission-option .permission-option-check {
    background: #162556;
    color: #fff;
}

.permission-submit {
    align-items: center;
    border-radius: 0.5rem;
    display: inline-flex;
    font-weight: 800;
    gap: 0.55rem;
    height: 46px;
    justify-content: center;
    width: 100%;
}

@media (max-width: 767.98px) {
    .login-page {
        min-height: 100vh;
        padding: 1rem;
    }

    .login-shell {
        display: block;
    }

    .login-brand-panel {
        display: none;
    }

    .login-card {
        padding: 1.5rem;
    }

    .login-card-logo {
        display: block;
    }

    .permission-card {
        padding: 1.35rem;
    }

    .permission-card-header {
        align-items: flex-start;
    }
}

.no-rounded-right {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.no-rounded-left {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.custom-dropdown-header {
    background-color: #f8f9fa;
    color: #495057;
    padding: 10px 0px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border-left: 4px solid #162556;
    margin: 5px 0;
}

.custom-scroll {
    scrollbar-width: thin;
    scrollbar-color: #ced4da transparent;
}

.custom-scroll::-webkit-scrollbar {
    width: 5px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background-color: #ced4da;
    border-radius: 20px;
}

.bg-canceled {
    background-color: #fff5f5 !important;
    color: #5c677d;
    transition: all 0.2s ease-in-out;
}

.markup-low {
    background-color: #ffcdcd !important; /* Amarelo claro de alerta */
    border-color: #ff0707 !important; /* Borda amarela */
}

.loading-overlay {
    position: absolute;
    left: 50%;
}

.sticky-header-table {
    border-collapse: separate;
    border-spacing: 0;
}

.sticky-header-table thead th {
    position: sticky;
    top: 0;
    z-index: 11;
}

.sticky-header-table thead tr:nth-child(2) th {
    top: 36px; /* Altura do primeiro header fixo */
}

.sticky-header-wrapper {
    overflow-y: auto;
}
