:root {
    --staff-green: #14683f;
    --staff-deep: #153e2b;
    --staff-lime: #d8f29b;
    --staff-border: #d7e3d9;
    --staff-muted: #53645c;
    font-family: 'Hanken Grotesk', sans-serif;
    color: #243f32;
    background: #fff;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

[hidden] {
    display: none !important;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 23px;
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
    font-feature-settings: 'liga';
}

:where(button, input, select):focus-visible {
    outline: 3px solid #86b59a;
    outline-offset: 3px;
}

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

.staff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem clamp(1.25rem, 4vw, 3rem);
    border-bottom: 1px solid #e8eee9;
}

.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 0;
    background: transparent;
    border: 0;
}

.brand img {
    display: block;
    width: 160px;
    height: auto;
}

.brand>span {
    padding: .25rem .55rem;
    border: 1px solid #d9e5da;
    border-radius: 999px;
    color: #648064;
    font-size: .65rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.account-bar {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: .8rem;
    color: #53645c;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: .7rem;
    padding: .8rem 1.15rem;
    font-weight: 600;
    font-size: .875rem;
    transition: background-color .2s, border-color .2s;
}

.button .material-symbols-outlined {
    font-size: 20px;
}

.primary {
    background: #14683f;
    color: #fff;
    border-color: #14683f;
}

.primary:hover:not(:disabled) {
    background: #103b25;
}

.secondary {
    background: #fff;
    color: #315638;
    border-color: #cbd9ce;
}

.secondary:hover:not(:disabled),
.ghost:hover:not(:disabled) {
    background: #f1f6f2;
}

.ghost {
    background: transparent;
    color: #4c6955;
    border-color: #e2eae4;
}

.small {
    min-height: 38px;
    padding: .5rem .75rem;
    font-size: .8rem;
}

.danger {
    background: #aa3f3f;
    color: #fff;
}

.eyebrow {
    display: block;
    margin-bottom: 1rem;
    color: #397d42;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 {
    color: #153e2b;
    font-size: clamp(2rem, 3.8vw, 3.5rem);
    font-weight: 650;
    letter-spacing: -.045em;
    line-height: 1.1;
}

h2 {
    color: #234b33;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.25;
}

h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #234b33;
}

label {
    display: grid;
    gap: .45rem;
    font-size: .8rem;
    font-weight: 500;
    color: #3d5548;
}

input:not([type=checkbox]),
select {
    width: 100%;
    min-width: 0;
    padding: .75rem .8rem;
    border: 1px solid #cddacf;
    border-radius: .55rem;
    background: #fff;
    color: #314b38;
    font-size: .9375rem;
}

input::placeholder {
    color: #75837b;
}

.page {
    max-width: 1380px;
    padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 5rem;
    margin: auto;
}

.page-heading {
    margin-bottom: 2rem;
}

.page-heading .eyebrow {
    margin-bottom: .7rem;
}

.page-heading>p,
.page-heading>div>p {
    margin-top: 1rem;
    font-size: 1rem;
    color: #53645c;
    line-height: 1.75;
}

.dashboard {
    max-width: 1050px;
    padding-top: clamp(3rem, 6vw, 5rem);
}

.dashboard-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    text-align: left;
    border: 1px solid #d8e3da;
    border-radius: 1.25rem;
    padding: 1.75rem;
    background: #fff;
    box-shadow: 0 5px 20px rgb(20 55 35 / .035);
    transition: border-color .2s, box-shadow .2s;
}

.dashboard-card:hover {
    border-color: #87a58a;
    box-shadow: 0 10px 28px rgb(20 55 35 / .07);
}

.dashboard-icon {
    display: grid;
    place-items: center;
    background: #edf5ef;
    color: #447453;
    width: 52px;
    height: 52px;
    border-radius: 1rem;
    font-size: 28px;
}

.dashboard-card-heading {
    font-size: 1.5rem;
    color: #153e2b;
    font-weight: 600;
    letter-spacing: -.025em;
}

.dashboard-card-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #53645c;
}

.dashboard-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    margin-top: auto;
    border-top: 1px solid #e0e9df;
    padding-top: 1.15rem;
    color: #54714f;
    font-size: .8rem;
}

.back-link {
    margin-bottom: 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #698063;
    font-size: .8rem;
}

.heading-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.list-toolbar {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.search-field {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 28rem;
}

.search-field>span {
    position: absolute;
    left: .8rem;
    font-size: 20px;
    color: #8d9e85;
}

.search-field input {
    padding-left: 2.5rem;
}

.filter-field {
    margin-left: auto;
}

.filter-field select {
    font-size: .85rem;
}

.table-panel {
    border: 1px solid #dce6dd;
    border-radius: 1rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    text-align: left;
}

th {
    background: #f7faf6;
    color: #627469;
    font-size: .7rem;
    font-weight: 500;
    padding: 1rem 1.15rem;
    white-space: nowrap;
}

td {
    padding: 1.15rem;
    border-top: 1px solid #e9eee6;
    color: #405b4a;
    vertical-align: middle;
}

td strong {
    color: #2f4b34;
    font-size: .9375rem;
    font-weight: 500;
}

td small {
    display: block;
    margin-top: .3rem;
    color: #64756b;
    line-height: 1.5;
    font-size: .75rem;
}

.numeric {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.actions-heading {
    text-align: right;
}

.row-actions {
    text-align: right;
    white-space: nowrap;
}

.row-action {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #e2e9df;
    border-radius: .5rem;
    background: #fff;
    color: #6b8362;
    margin-left: .3rem;
}

.row-action .material-symbols-outlined {
    font-size: 18px;
}

.row-action:hover {
    color: #14683f;
    background: #f1f6ef;
}

.row-action:last-child:hover {
    color: #a33c3c;
    background: #fff3f3;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: .3rem .6rem;
    font-size: .7rem;
    white-space: nowrap;
}

.positive {
    background: #e9f4e5;
    color: #507741;
}

.muted {
    background: #f1f3ef;
    color: #657168;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #627469;
    font-size: .9rem;
}

.staff-footer {
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    border-top: 1px solid #e8eee9;
    padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
    font-size: .75rem;
    color: #8e9a85;
}

.staff-footer>span:first-child {
    color: #54714f;
    font-weight: 600;
}

.form-dialog {
    width: min(590px, calc(100% - 2rem));
    max-height: 90dvh;
    padding: 1.75rem;
    border: 1px solid #dce6dd;
    border-radius: 1.25rem;
    color: #243f32;
    background: #fff;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgb(0 0 0 / .15);
}

.form-dialog::backdrop {
    background: rgb(14 37 24 / .5);
    backdrop-filter: blur(5px);
}

.form-dialog form {
    display: grid;
    gap: 1.5rem;
}

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

.dialog-heading .eyebrow {
    margin-bottom: .5rem;
}

.close-button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    background: #f7faf5;
    border: 1px solid #dce6d7;
    border-radius: 50%;
    color: #74866b;
    font-size: 1.3rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.span-two {
    grid-column: 1 / -1;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    padding-top: 1rem;
    border-top: 1px solid #e6ede1;
}

.form-status:not(:empty),
#loginStatus:not(:empty) {
    padding: .7rem .85rem;
    border-radius: .5rem;
    background: #faf0e8;
    color: #9a6539;
    font-size: .85rem;
    line-height: 1.7;
}

.representative-dialog {
    width: min(950px, calc(100% - 2rem));
}

.pricing-section {
    border-top: 1px solid #e2eadb;
    padding-top: 1.5rem;
}

.pricing-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-heading p {
    max-width: 32rem;
    color: #627469;
    font-size: .8rem;
    line-height: 1.7;
    margin-top: .5rem;
}

.pricing-heading .button {
    flex-shrink: 0;
}

.pricing-rows {
    display: grid;
    gap: .75rem;
}

.price-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, .8fr) minmax(0, .8fr);
    gap: .75rem;
    padding: 1rem;
    background: #f7faf5;
    border: 1px solid #dce6d7;
    border-radius: .75rem;
}

.price-row label {
    font-size: .7rem;
}

.price-row input,
.price-row select {
    font-size: .8125rem;
    padding: .65rem;
}

.remove-link {
    grid-column: 1 / -1;
    justify-self: end;
    border: 0;
    background: transparent;
    color: #a04f49;
    font-size: .75rem;
    padding: .15rem 0;
}

.empty-prices {
    color: #8a967e;
    font-size: .85rem;
    padding: 1rem;
    border: 1px dashed #d5e0ce;
    border-radius: .7rem;
}

.price-simulator {
    display: grid;
    gap: 1rem;
    border: 1px solid #c8dbc1;
    border-radius: .8rem;
    background: #eef5e8;
    padding: 1.25rem;
}

.simulator-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: .75rem;
}

#simulationResult {
    color: #547348;
    font-size: .9rem;
    line-height: 1.7;
    font-variant-numeric: tabular-nums;
}

.delete-dialog {
    width: min(450px, calc(100% - 2rem));
}

#deleteDescription {
    color: #74846c;
    line-height: 1.8;
    font-size: .95rem;
}

.app-feedback {
    position: fixed;
    z-index: 10;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 2rem);
    padding: .9rem 1.25rem;
    background: #14683f;
    color: #fff;
    font-size: .875rem;
    line-height: 1.65;
    border-radius: .75rem;
    box-shadow: 0 5px 25px rgb(0 0 0 / .1);
}

.app-feedback.is-error {
    background: #8c4540;
}

.loading-state {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #f2f7ee;
    padding: .75rem 1rem;
    border: 1px solid #d5e2cd;
    border-radius: .6rem;
    font-size: .8rem;
    color: #67825a;
}

@media (max-width: 1023px) {
    .login-view {
        gap: 2.5rem;
    }

    .price-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .price-row>label:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .staff-header {
        padding: 1rem 1.25rem;
    }

    .brand img {
        width: 135px;
    }

    .account-bar>span {
        display: none;
    }

    .login-view {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.25rem;
        gap: 2rem;
        max-width: 560px;
    }

    .login-intro h1 {
        font-size: 2.5rem;
    }

    .login-intro>p {
        margin-top: 1rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .dashboard-options {
        grid-template-columns: 1fr;
    }

    .heading-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .list-toolbar {
        flex-wrap: wrap;
    }

    .search-field {
        flex-basis: 100%;
        max-width: none;
    }

    .filter-field {
        flex: 1;
        margin-left: 0;
    }

    table {
        min-width: 700px;
    }

    .form-dialog {
        padding: 1.25rem;
    }

    .pricing-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .simulator-inputs {
        grid-template-columns: 1fr;
    }

    .dialog-actions .button {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Visão informativa dos representantes */
.representative-overview {
    margin-bottom: 2.5rem;
}

.overview-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.overview-heading .eyebrow {
    margin-bottom: .5rem;
}

.overview-heading h2 {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
}

.overview-caption {
    color: #627469;
    font-size: .8rem;
}

.rep-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.rep-metric {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .9rem;
    padding: 1.25rem;
    border: 1px solid #dce6dd;
    border-radius: 1rem;
    background: #fff;
}

.rep-metric>.material-symbols-outlined {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: start;
    padding: .55rem;
    border-radius: .7rem;
    background: #eef5e8;
    color: #397d42;
    font-size: 22px;
}

.rep-metric>span:not(.material-symbols-outlined) {
    grid-column: 1;
    grid-row: 2;
    color: #53645c;
    font-size: .8rem;
    line-height: 1.5;
}

.rep-metric strong {
    grid-column: 1;
    grid-row: 1;
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -.06em;
    color: #14683f;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.rep-geography {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    border: 1px solid #dce6dd;
    border-radius: 1.25rem;
    overflow: hidden;
}

.rep-map-panel {
    padding: 1.5rem;
    background: radial-gradient(ellipse at center, #f0f6ed, #fafcf9 75%);
}

.brazil-map {
    width: 100%;
    max-height: 365px;
    display: block;
    margin: 0 auto;
    overflow: visible;
}

.brazil-map path {
    fill: #e3eae0;
    stroke: #fff;
    stroke-width: 1.1;
    stroke-linejoin: round;
    transition: fill .15s;
}

.brazil-map g.has-representatives path {
    fill: #397d42;
}

.brazil-map g:hover path,
.brazil-map g:focus path {
    fill: #14683f;
}

.brazil-map g:focus {
    outline: none;
}

.brazil-map g:focus path {
    stroke: #14683f;
    stroke-width: 2;
}

.brazil-map text {
    font: 500 9px "Hanken Grotesk", sans-serif;
    fill: #66785e;
    text-anchor: middle;
    pointer-events: none;
}

.brazil-map text.has-representatives {
    fill: #fff;
    font-weight: 700;
}

.map-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #53645c;
    font-size: .75rem;
    margin-top: .5rem;
}

.map-legend>span {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.map-legend i {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: #e3eae0;
}

.map-legend>span:last-child i {
    background: #397d42;
}

.map-source {
    display: block;
    text-align: center;
    font-size: .65rem;
    color: #627469;
    margin-top: .7rem;
}

.rep-location-panel {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-left: 1px solid #dce6dd;
}

.rep-location-panel .eyebrow {
    margin-bottom: .6rem;
}

.rep-location-panel h3 {
    font-size: 1.5rem;
    letter-spacing: -.035em;
}

.location-description {
    color: #53645c;
    font-size: .9rem;
    line-height: 1.7;
    margin-top: .75rem;
}

.rep-state-list {
    display: grid;
    gap: 1.2rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    max-height: 240px;
    overflow-y: auto;
}

.state-list-label {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    color: #405b4a;
    font-size: .9rem;
}

.state-list-label strong {
    font-weight: 600;
    color: #14683f;
    font-variant-numeric: tabular-nums;
}

.state-bar {
    height: 5px;
    background: #eef3eb;
    border-radius: 10px;
    margin-top: .65rem;
    overflow: hidden;
}

.state-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #397d42;
}

.location-note {
    padding: .85rem;
    margin-top: 1.5rem;
    color: #53645c;
    background: #f7faf5;
    border-radius: .5rem;
    font-size: .8rem;
    line-height: 1.7;
}

.rep-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.rep-list-heading>span {
    color: #627469;
    font-size: .8rem;
}

@media (max-width: 900px) {
    .rep-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .overview-heading,
    .rep-list-heading {
        align-items: start;
        flex-direction: column;
        gap: .5rem;
    }

    .rep-metric {
        padding: 1rem;
        gap: .75rem;
    }

    .rep-metric>.material-symbols-outlined {
        font-size: 18px;
        padding: .4rem;
    }

    .rep-metric strong {
        font-size: 2rem;
    }

    .rep-geography {
        grid-template-columns: 1fr;
    }

    .rep-location-panel {
        border-left: 0;
        border-top: 1px solid #dce6dd;
    }

    .brazil-map {
        max-height: 320px;
    }
}

/* Navegação estado → cidade → representantes */
.brazil-map [data-map-state] {
    cursor: pointer;
}

.brazil-map g.is-selected path {
    fill: #14683f;
    stroke: #8fbb69;
    stroke-width: 2;
}

.brazil-map g.is-selected~text {
    pointer-events: none;
}

.location-back {
    display: block;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0 0 1rem;
    color: #397d42;
    font-size: .8rem;
    text-align: left;
}

.location-back:hover,
.location-profile:hover {
    color: #14683f;
    text-decoration: underline;
}

#repLocationTitle:focus {
    outline: none;
}

.rep-state-list {
    max-height: 290px;
}

.location-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: .4rem;
    padding: .35rem 0;
    color: #314b38;
    text-align: left;
    font-size: .9rem;
}

.location-option:hover {
    color: #14683f;
    background: #f2f7ee;
}

.location-option-count {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #397d42;
}

.location-option-count strong {
    font-size: .9rem;
    font-weight: 600;
}

.location-option-count .material-symbols-outlined {
    font-size: 19px;
}

.location-person {
    padding: 1rem;
    border: 1px solid #dce6dd;
    border-radius: .75rem;
}

.location-person-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .7rem;
}

.location-person-heading>strong {
    color: #14683f;
    font-weight: 600;
    font-size: .95rem;
}

.location-person-contact {
    display: block;
    overflow-wrap: anywhere;
    color: #53645c;
    font-size: .85rem;
    line-height: 1.8;
}

.location-profile {
    background: transparent;
    border: 0;
    padding: 0;
    margin-top: .9rem;
    font-size: .8rem;
    font-weight: 600;
    color: #397d42;
    text-align: left;
}

.order-open {
    border: 0;
    padding: 0;
    background: transparent;
    color: #14683f;
    font-size: .9rem;
    text-align: left;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.order-open:hover {
    text-decoration: underline;
}

.order-details-dialog {
    width: min(780px, calc(100% - 2rem));
}

.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.75rem 0;
}

.order-details-grid dt {
    color: #627469;
    font-size: .75rem;
    margin-bottom: .35rem;
}

.order-details-grid dd {
    margin: 0;
    color: #314b38;
    font-size: .95rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.order-item-detail {
    border: 1px solid #dce6dd;
    padding: 1rem;
    border-radius: .7rem;
    margin-top: .85rem;
}

.order-item-detail strong {
    color: #14683f;
    font-size: .95rem;
    font-weight: 500;
}

.order-item-detail p,
.order-hint,
.order-notes {
    color: #53645c;
    font-size: .85rem;
    line-height: 1.8;
    margin-top: .5rem;
    overflow-wrap: anywhere;
}

.order-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: #f2f7ee;
    padding: 1rem;
    border-radius: .75rem;
    color: #14683f;
    margin: 1.25rem 0;
}

.order-total strong {
    font-size: 1.4rem;
    font-weight: 600;
}

textarea {
    font: inherit;
    padding: .75rem .8rem;
    border: 1px solid #cddacf;
    border-radius: .55rem;
    color: #314b38;
    resize: vertical;
    width: 100%;
}

@media(min-width: 1000px) {
    .dashboard:has([data-view="ordersView"]) {
        max-width: 1380px;
    }

    .dashboard-options:has([data-view="ordersView"]) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media(max-width: 600px) {
    .order-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Acesso por chave, com imagem lateral. */
.login-view {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    width: 100%;
    min-height: calc(100dvh - 139px);
    max-width: none;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: stretch;
}

.login-visual {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #f1f3ee;
}

.login-visual img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.login-access {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 6rem);
    background: #fff;
}

.login-card {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    max-width: 390px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.login-key-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid #dce6dd;
    color: #397d42;
    border-radius: 1rem;
    font-size: 26px;
}

.login-card h1 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: .5rem;
    line-height: 1.15;
}

.login-card #accessKey {
    padding: 1rem;
    border-color: #cddacf;
    font-size: 1rem;
}

.login-card .button {
    min-height: 52px;
    justify-content: space-between;
    padding-inline: 1.1rem;
}

.login-card #loginStatus:empty {
    display: none;
}

@media(max-width: 767px) {
    .login-view {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 0;
        gap: 0;
        max-width: none;
    }

    .login-visual {
        min-height: 0;
        height: clamp(180px, 32vh, 260px);
    }

    .login-visual img {
        object-position: center 52%;
    }

    .login-access {
        padding: 2.25rem 1.5rem 3rem;
    }

    .login-card {
        padding: 0;
    }
}

.auto-approval-setting {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.15rem;
    border: 1px solid #d4e3cc;
    border-radius: .8rem;
    background: #f6f9f2;
    cursor: pointer;
}

.auto-approval-setting input {
    margin-top: .2rem;
    width: 18px;
    height: 18px;
    accent-color: #14683f;
    flex-shrink: 0;
}

.auto-approval-setting strong {
    display: block;
    color: #14683f;
    font-weight: 600;
    font-size: .9rem;
}

.auto-approval-setting small {
    display: block;
    margin-top: .4rem;
    font-size: .8rem;
    line-height: 1.7;
    font-weight: 400;
    color: #53645c;
}

.auto-approval-label {
    color: #397d42;
}

.heading-buttons {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

.representative-table-label {
    margin-top: 1rem;
}

.price-table-create {
    margin: 1.25rem 0;
}

.price-tables-list {
    display: grid;
    gap: 1rem;
}

.price-table-card {
    padding: 1.25rem;
    border: 1px solid #dce6dd;
    border-radius: 1rem;
}

.price-table-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.price-table-card h3 {
    font-size: 1.15rem;
}

.price-table-summary {
    display: grid;
    gap: .45rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
    color: #53645c;
    font-size: .8rem;
    line-height: 1.65;
}

.price-table-in-use {
    font-size: .75rem;
    color: #627469;
    margin-top: .75rem;
}

@media(max-width: 600px) {
    .price-table-card-heading {
        flex-direction: column;
    }
}

/* Contraste, cor e hierarquia do painel administrativo. */
.staff-header,
.staff-footer {
    background: #fff;
    border-color: var(--staff-border);
}

.brand>span {
    color: #fff;
    background: var(--staff-green);
    border-color: var(--staff-green);
    padding: .35rem .7rem;
    font-weight: 700;
    letter-spacing: .1em;
}

.account-bar {
    color: #3d5548;
    font-size: .875rem;
}

.account-bar>span {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.button {
    border-radius: .75rem;
    font-weight: 650;
}

.primary {
    box-shadow: 0 3px 8px rgb(20 104 63 / .14);
}

.primary:hover:not(:disabled) {
    background: #0e5833;
    border-color: #0e5833;
}

.secondary {
    background: #f0f7ed;
    border-color: #bad0b9;
    color: #205c35;
}

.secondary:hover:not(:disabled) {
    background: #e4f1da;
    border-color: #8cb48a;
}

.ghost {
    border-color: #d3e0d6;
}

.page-heading h1 {
    font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.eyebrow {
    color: #337344;
    font-weight: 750;
    letter-spacing: .1em;
}

.back-link {
    color: #286c43;
    font-weight: 600;
}

.dashboard {
    position: relative;
}

.dashboard>.page-heading {
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
}

.dashboard-card {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    border-color: #ccddce;
    box-shadow: 0 5px 18px rgb(21 62 43 / .045);
    gap: 1.25rem;
    min-height: 300px;
}

.dashboard-card:hover {
    border-color: #75a579;
    box-shadow: 0 12px 28px rgb(21 62 43 / .1);
}

.dashboard-icon {
    width: 58px;
    height: 58px;
    border-radius: 1rem;
    background: #e3f2d5;
    color: #286c32;
    font-size: 30px;
}

.dashboard-card-heading {
    font-size: 1.7rem;
    font-weight: 650;
}

.dashboard-card-description {
    color: #4c6354;
}

.dashboard-card-footer {
    font-size: .85rem;
    font-weight: 600;
    color: #305b3b;
    border-color: #c6dcc7;
}

.dashboard-card-footer>.material-symbols-outlined {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #dfedda;
    color: #286c32;
    font-size: 20px;
}

.dashboard-card[data-view="ordersView"] {
    background: linear-gradient(135deg, #153e2b, #1b6841);
    border-color: #205b3c;
    box-shadow: 0 8px 22px rgb(21 62 43 / .15);
}

.dashboard-card[data-view="ordersView"]:hover {
    border-color: #4f9d65;
    box-shadow: 0 12px 30px rgb(21 62 43 / .22);
}

.dashboard-card[data-view="ordersView"] .dashboard-icon {
    background: var(--staff-lime);
    color: #244b24;
}

.dashboard-card[data-view="ordersView"] .dashboard-card-heading {
    color: #fff;
}

.dashboard-card[data-view="ordersView"] .dashboard-card-description {
    color: #dfeddf;
}

.dashboard-card[data-view="ordersView"] .dashboard-card-footer {
    border-color: #558269;
    color: #edf7e8;
}

.dashboard-card[data-view="ordersView"] .dashboard-card-footer>.material-symbols-outlined {
    background: var(--staff-lime);
    color: #244b24;
}

.dashboard-card[data-view="stockView"],
.dashboard-card[data-view="representativesView"] {
    background: #fff;
}

.dashboard-card[data-view="representativesView"] .dashboard-icon {
    background: #fff0d1;
    color: #9a6015;
}

.table-panel {
    background: #fff;
    border-color: var(--staff-border);
    box-shadow: 0 3px 12px rgb(21 62 43 / .035);
}

th {
    background: #eaf3e6;
    color: #315c3d;
    font-size: .75rem;
    font-weight: 700;
    padding-block: 1.1rem;
}

td {
    color: #405b4a;
    font-size: .9rem;
}

td strong {
    font-weight: 650;
    color: #203f2d;
}

tbody tr {
    transition: background-color .15s;
}

tbody tr:hover {
    background: #f7faf3;
}

.row-action {
    color: #397344;
    border-color: #cfdfce;
    width: 36px;
    height: 36px;
}

.badge {
    padding: .35rem .65rem;
    font-weight: 650;
    border: 1px solid transparent;
}

.positive {
    color: #22643b;
    background: #e5f4dd;
    border-color: #cce4bd;
}

.muted {
    color: #5c675f;
    background: #f0f3ef;
    border-color: #dce2da;
}

.badge.status-available {
    background: #fff2d4;
    color: #875211;
    border-color: #f0dca6;
}

.badge.status-production {
    background: #e5f0ff;
    color: #245b91;
    border-color: #c8def4;
}

.badge.status-shipped {
    background: #e5f6f2;
    color: #236c62;
    border-color: #bee2d7;
}

.badge.status-cancelled,
.badge.payment-refunded {
    background: #fcebe8;
    color: #9b4638;
    border-color: #f1d2ca;
}

.badge.payment-pending {
    background: #fff5df;
    color: #875718;
    border-color: #eedeb8;
}

.rep-metric {
    border-color: var(--staff-border);
    box-shadow: 0 2px 10px rgb(21 62 43 / .035);
    padding: 1.4rem;
}

.rep-metric strong {
    font-weight: 650;
}

.rep-metric>.material-symbols-outlined {
    background: #e4f2d7;
    color: #347736;
}

.rep-metric:first-child {
    background: var(--staff-deep);
    border-color: var(--staff-deep);
}

.rep-metric:first-child strong {
    color: #fff;
}

.rep-metric:first-child>span:not(.material-symbols-outlined) {
    color: #dbe9dc;
}

.rep-metric:first-child>.material-symbols-outlined {
    background: var(--staff-lime);
    color: #244b24;
}

.rep-metric:nth-child(3)>.material-symbols-outlined {
    background: #fff1d8;
    color: #9a6015;
}

.rep-geography {
    background: #fff;
    border-color: var(--staff-border);
}

.rep-map-panel {
    background: radial-gradient(ellipse at center, #e8f3dc, #f8fbf4 78%);
}

.brazil-map g.has-representatives path,
.state-bar span {
    fill: #419647;
}

.state-bar span {
    background: #419647;
}

.brazil-map g.is-selected path {
    fill: var(--staff-deep);
    stroke: #a5d563;
}

.map-legend>span:last-child i {
    background: #419647;
}

.form-dialog {
    border-color: #cadbc9;
    box-shadow: 0 24px 90px rgb(14 46 27 / .22);
}

.form-dialog::backdrop {
    background: rgb(11 34 23 / .55);
    backdrop-filter: blur(5px);
}

.dialog-heading {
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--staff-border);
}

.dialog-heading h2 {
    color: var(--staff-deep);
    font-size: 1.55rem;
    font-weight: 700;
}

.close-button {
    color: #315c3d;
    background: #eaf3e6;
    border-color: #cfe0ca;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

label {
    color: #3d5548;
    font-weight: 600;
    font-size: .85rem;
}

input:not([type=checkbox]),
select,
textarea {
    border-color: #c1d3c3;
    color: #294333;
    border-radius: .65rem;
}

input:not([type=checkbox]):focus,
select:focus,
textarea:focus {
    border-color: #4f9558;
}

:where(button, input, select, textarea):focus-visible {
    outline: 3px solid #a5ce83;
    outline-offset: 3px;
}

.search-field>span {
    color: #4f7e54;
}

.price-table-card {
    border: 1px solid #dedede;
}

.price-table-card h3 {
    color: #245d34;
    font-weight: 700;
}

.price-row {
    background: #f1f7eb;
    border-color: #d2e2c6;
}

.price-row label {
    color: #426044;
    font-size: .75rem;
}

.order-total {
    background: #e9f4df;
    color: #245d34;
    border: 1px solid #d0e3be;
}

.auto-approval-setting {
    border-color: #bcd6ad;
    background: #f0f8e6;
}

.auto-approval-setting strong {
    color: #286438;
}

.login-key-icon {
    background: #e7f4db;
    border-color: #c8e1b8;
    color: #286c32;
}

.login-card h1 {
    font-weight: 650;
}

@media (max-width: 767px) {
    .account-bar>span {
        display: none;
    }

    .dashboard-card {
        padding: 1.5rem;
        min-height: 260px;
    }

    .rep-metric {
        padding: 1rem;
    }

    .page-heading h1 {
        font-size: 2.3rem;
    }
}

.dashboard-datetime {
    display: block;
    margin-bottom: .85rem;
    color: #53645c;
    font-size: clamp(.8rem, 1.2vw, .95rem);
    font-weight: 500;
    line-height: 1.7;
}

.price-table-title {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.price-table-title>.material-symbols-outlined {
    font-size: 22px;
    color: #397d42;
    flex-shrink: 0;
}

.stock-weight-estimated {
    display: flex;
    align-items: center;
    gap: .6rem;
    align-self: center;
}

.stock-weight-estimated input {
    accent-color: #14683f;
}

.city-loading-status {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

.city-loading-status:has(p:empty):has(button[hidden]) {
    display: none;
}

.city-loading-status p {
    font-size: .8rem;
    color: #53645c;
    line-height: 1.6;
}

.city-loading-status .remove-link {
    color: #14683f;
    font-weight: 600;
}

select:disabled {
    background: #f2f4f1;
    color: #75837b;
    cursor: not-allowed;
}

.whatsapp-link {
    color: #14683f;
    font-weight: 600;
    text-decoration: none;
}

.whatsapp-link:hover {
    color: #0e5833;
    text-decoration: underline;
}
.order-items-editor { padding-top: 1.25rem; border-top: 1px solid #d7e3d9; }
.order-edit-items { display: grid; gap: 1rem; }
.order-edit-item { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,.8fr) minmax(0,1fr); gap: 1rem; padding: 1rem; border: 1px solid #dedede; border-radius: .8rem; }
.order-edit-item-footer { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid #e5e5e5; padding-top: .8rem; }
.order-edit-item-footer strong { font-size: .9rem; font-weight: 600; color: #245d34; }
.order-edit-item-footer .remove-link { margin: 0; }
@media(max-width: 767px) { .order-edit-item { grid-template-columns: 1fr 1fr; } .order-edit-product { grid-column: 1/-1; } }

.order-edit-item { grid-template-columns: repeat(3,minmax(0,1fr)); }
.order-edit-product, .order-item-personalization { grid-column: 1/-1; }
.order-item-personalization { border-top: 1px solid #e5e5e5; padding-top: .8rem; }
.order-item-personalization summary { color: #315c3d; font-size: .85rem; font-weight: 600; cursor: pointer; }
.item-personalization-controls { display: grid; gap: 1rem; margin-top: 1rem; }
.item-personalization-controls > .button { justify-self: start; }
.order-item-contact-row { display: grid; grid-template-columns: 1fr 2fr; gap: .75rem; padding: .8rem; background: #f6f8f4; border-radius: .6rem; }
.order-item-contact-row .remove-link { grid-column: 1/-1; }
@media(max-width: 600px) { .order-edit-item { grid-template-columns: 1fr 1fr; } .order-item-contact-row { grid-template-columns: 1fr; } }
