:root {
    --ink: #1c1915;
    --ink-soft: #433e36;
    --ivory: #f3eee6;
    --paper: #faf7f2;
    --brass: #8a6432;
    --brass-deep: #6d4d24;
    --line: #e3d9cb;
    --forest: #1d3b33;
    --danger: #8d3b32;
    --ok: #1f6a48;
    --sider: #171512;
    --shadow: 0 1px 0 rgba(28, 25, 21, 0.04);
    --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
    --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--ivory);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
}
a { color: var(--brass-deep); }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.05; }
h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 0.4em; }
h3 { font-size: 1.4rem; margin: 0 0 0.3em; }
p { margin: 0 0 0.8em; }

.topbar, .site-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 6vw;
}
.wordmark {
    color: var(--ink);
    text-decoration: none;
    font-family: var(--serif);
    font-size: 1.45rem;
    letter-spacing: -0.04em;
}
.wordmark-light { color: #f6f1e7; }
.wordmark-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 0 0.15rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    line-height: 0;
}
.wordmark-logo img {
    display: block;
    max-width: 9.5rem;
    max-height: 2.4rem;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 0;
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
}
.topnav { display: flex; gap: 1.2rem; align-items: center; }
.topnav a { color: var(--ink); text-decoration: none; }
.topnav a.button { color: var(--ivory); }
.button, button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: var(--ivory);
    border: 1px solid var(--ink);
    text-decoration: none;
    border-radius: 999px;
    padding: 0.75rem 1.2rem;
    font: 500 0.95rem var(--sans);
    cursor: pointer;
}
.button-small { padding: 0.45rem 0.85rem; }
.button-ghost, .topnav .button-ghost {
    background: transparent;
    color: var(--ink);
}
.button[hidden] { display: none; }
.hero, .band, .split, .auth, .sheet { padding: 1rem 6vw 4rem; }
.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr;
    gap: 3rem;
    align-items: center;
    padding-top: 3.5rem;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--brass);
    margin-bottom: 0.8rem;
}
.lede { font-size: 1.12rem; max-width: 42rem; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.sample {
    background: var(--forest);
    color: #f6f1e7;
    padding: 1.4rem;
    border-radius: 1.2rem 1.2rem 0.3rem 1.2rem;
}
.sample h2 { font-size: 1.8rem; }
.sample-kicker { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.72rem; color: #d7c4a4; }
.sample dl { margin: 1rem 0 0; }
.sample div, .summary div, .company-card div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-top: 1px solid rgba(246, 241, 231, 0.18); }
.sample dt { color: #d7c4a4; }
.sample dd { margin: 0; text-align: right; }
.band { padding-top: 2rem; }
.grid-3, .two, .stat-row { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-3 article, .sheet section, .drawer, .panel-form, .auth-copy {
    background: transparent;
}
.grid-3 article { border-top: 1px solid var(--line); padding-top: 1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.band-dark {
    background: var(--ink);
    color: var(--ivory);
    margin-top: 1rem;
}
.band-dark .button { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.site-foot { color: var(--ink-soft); border-top: 1px solid var(--line); }
.auth { display: grid; grid-template-columns: 0.9fr 1fr; gap: 3rem; align-items: start; padding-top: 3rem; }
.panel-form, .inline-form { display: grid; gap: 0.85rem; }
.field { display: grid; gap: 0.3rem; }
.field[hidden] { display: none; }
.field span, .check span { font-size: 0.86rem; }
.field input, .field select, .field textarea, .search input, .search select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 0.7rem;
    padding: 0.75rem 0.8rem;
    font: 400 1rem var(--sans);
}
.field textarea { resize: vertical; }
.field input[type="file"] { padding: 0.55rem 0.8rem; }
.field input[readonly] { background: var(--ivory); color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field-uf { max-width: 6rem; }
.check { display: flex; gap: 0.6rem; align-items: center; }
fieldset.field { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
fieldset.field legend { font-size: 0.86rem; padding: 0; }
.checks {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    background: var(--paper);
}
.form-error { color: var(--danger); margin: 0; }
.form-note { color: var(--ink-soft); font-size: 0.92rem; }
details summary { cursor: pointer; color: var(--brass-deep); margin-top: 0.3rem; }
.text-link, .text-button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--brass-deep);
    cursor: pointer;
    font: inherit;
}
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    align-items: center;
}
.row-actions form { margin: 0; }
.row-actions .text-button { white-space: normal; text-align: left; }
.temp-password {
    margin: 0 0 1.2rem;
    padding: 0.9rem 1rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--paper);
}
.temp-password p { margin: 0 0 0.75rem; }
.temp-password .field input[readonly] {
    color: var(--ink);
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    user-select: all;
    cursor: text;
}
.summary, .company-card { margin: 0; }
.summary div, .company-card div { border-top-color: var(--line); }
.summary dt, .company-card dt { color: var(--ink-soft); }
.summary dd, .company-card dd { margin: 0; text-align: right; }
.flash {
    margin: 0 6vw;
    padding: 0.7rem 0.9rem;
    border-radius: 0.7rem;
    background: #fff;
    border: 1px solid var(--line);
}
.app .flash { margin: 1rem 0; }
.flash-err { border-color: #e7c6c1; color: var(--danger); }
.flash-ok { border-color: #c9e4d6; color: var(--ok); }
.app { display: grid; grid-template-columns: 240px auto 1fr; min-height: 100vh; }
.sider-toggle {
    appearance: none;
    position: sticky;
    top: 1.2rem;
    z-index: 30;
    align-self: start;
    justify-self: center;
    width: 1.4rem;
    height: 2.8rem;
    margin: 0.85rem 0.12rem 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--ivory);
    color: var(--ink);
    font: 500 1.45rem/1 var(--sans);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(23, 21, 18, 0.12);
}
.sider-toggle:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.sider-arrow::before { content: "‹"; }
html.is-sider-hidden .app { grid-template-columns: auto 1fr; }
html.is-sider-hidden .sider { display: none; }
html.is-sider-hidden .sider-toggle {
    top: calc(50vh - 1.7rem);
    width: 1.7rem;
    height: 3.4rem;
    margin: 0;
    justify-self: start;
    border-radius: 0 0.75rem 0.75rem 0;
    border-color: var(--sider);
    border-left: 0;
    background: var(--sider);
    color: #f6f1e7;
    box-shadow: none;
}
html.is-sider-hidden .sider-arrow::before { content: "›"; }
html.is-sider-hidden .menu-cadastros-panel,
html.is-sider-hidden .menu-cadastros:hover .menu-cadastros-panel,
html.is-sider-hidden .menu-cadastros:focus-within .menu-cadastros-panel,
html.is-sider-hidden .menu-cadastros.is-open .menu-cadastros-panel { display: none; }
.sider {
    background: var(--sider);
    color: #f6f1e7;
    padding: 1.2rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: visible;
    z-index: 50;
}
.sider:hover,
.sider:focus-within,
.sider:has(.menu-cadastros.is-open) {
    z-index: 100;
}
.sider-kicker {
    color: #d7c4a4;
    font-size: 0.85rem;
    margin: 0.4rem 0 1rem;
    width: 100%;
    text-align: center;
}
.sidenav { display: grid; grid-template-columns: 1fr; gap: 0.15rem; overflow: visible; }
.sidenav > a, .menu-cadastros-toggle {
    color: #f6f1e7;
    text-decoration: none;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
}
.sidenav > a.is-active, .sidenav > a:hover,
.menu-cadastros-toggle.is-active, .menu-cadastros-toggle:hover,
.menu-cadastros:hover .menu-cadastros-toggle,
.menu-cadastros.is-open .menu-cadastros-toggle { background: rgba(246, 241, 231, 0.08); }
.menu-cadastros { position: relative; }
.menu-cadastros-toggle {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    font: inherit;
    cursor: pointer;
}
.menu-cadastros-panel {
    display: none;
    position: absolute;
    z-index: 100;
    left: calc(100% - 0.35rem);
    top: 0;
    grid-template-columns: 1fr;
    min-width: 16rem;
    background: var(--sider);
    border: 1px solid rgba(246, 241, 231, 0.14);
    border-radius: 0.7rem;
    padding: 0.35rem 0.35rem 0.35rem 0.7rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.menu-cadastros-panel a { display: block; color: #f6f1e7; text-decoration: none; padding: 0.45rem 0.55rem; border-radius: 0.55rem; white-space: nowrap; }
.menu-cadastros-panel a.is-active,
.menu-cadastros-panel a:hover { background: rgba(246, 241, 231, 0.08); }
.menu-cadastros:focus-within .menu-cadastros-panel,
.menu-cadastros.is-open .menu-cadastros-panel { display: grid; }
@media (hover: hover) and (pointer: fine) {
    .menu-cadastros:hover .menu-cadastros-panel { display: grid; }
}
.sider-foot { margin-top: auto; display: grid; gap: 0.15rem; font-size: 0.88rem; }
.sider-foot span, .sider-foot a { color: #d7c4a4; }
.workspace { padding: 1.2rem 2rem 3rem; }
.workspace:has([data-service-sheet]),
.workspace:has([data-quote-sheet]),
.workspace:has([data-billing-sheet]),
.workspace:has([data-staff-sheet]) { min-width: 0; }
[data-quote-sheet] .service-grid td a,
[data-billing-sheet] .service-grid td a,
[data-staff-sheet] .service-grid td a { color: inherit; text-decoration: none; }
[data-quote-sheet] .service-grid td a:hover,
[data-billing-sheet] .service-grid td a:hover,
[data-staff-sheet] .service-grid td a:hover { text-decoration: underline; }
[data-quote-sheet] .empty,
[data-billing-sheet] .empty,
[data-staff-sheet] .empty { margin: 0.8rem 0 0; }
.sheet { padding: 0.4rem 0 2rem; }
.sheet-narrow { max-width: 40rem; }
.sheet-head, .search { display: flex; justify-content: space-between; gap: 1rem; align-items: end; flex-wrap: wrap; }
.sheet-period,
.sheet-resources { display: flex; align-items: end; gap: 0.7rem; flex-wrap: wrap; }
.sheet-period .button,
.sheet-resources .button { height: 2.7rem; }
.sheet-period button.button.button-ok,
.sheet-resources button.button.button-ok {
    width: 2.7rem;
    height: 2.7rem;
    min-height: 0;
}
.sheet-period button.button.button-ok img,
.sheet-resources button.button.button-ok img { width: 2.45rem; height: 2.45rem; }
.sheet-file {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    background: #fff;
    cursor: pointer;
}
.sheet-file svg { width: 1.45rem; height: 1.45rem; display: block; }
.sheet-file img { width: 1.85rem; height: 1.85rem; display: block; object-fit: contain; }
.sheet-file.is-on { border-color: var(--brass-deep); box-shadow: inset 0 0 0 1px var(--brass-deep); }
.sheet-file:hover { border-color: var(--brass); }
.sheet-file:disabled { opacity: 0.45; cursor: wait; }
.rosana-picker-form { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; margin: 0 0 0.35rem; }
.rosana-picker { flex: 1 1 14rem; max-width: 40rem; min-width: 0; }
.rosana-picker select[size] { height: auto; min-height: 6.4rem; padding: 0.25rem 0.45rem; }
.rosana-picker-form .button { height: 2.7rem; }
.rosana-sheet { display: grid; gap: 0.35rem; }
.rosana-sheet + .rosana-sheet { margin-top: 0.85rem; }
.rosana-sheet h2 { font-size: 1.35rem; margin: 0.15rem 0 0; }
.rosana-tools { display: grid; gap: 0.9rem; margin: 0.2rem 0 0.4rem; max-width: 40rem; }
.rosana-tool { display: flex; gap: 0.75rem; align-items: flex-start; }
.rosana-tool input { width: 1.05rem; height: 1.05rem; margin-top: 0.2rem; accent-color: var(--brass-deep); }
.rosana-tool strong { display: block; font-weight: 640; }
.rosana-tool .form-note { display: block; margin: 0.15rem 0 0; }
.sheet-wait { margin: 0 0 1rem; color: var(--ink-soft); }
.sheet-notice { margin: 0.15rem 0 0.8rem; color: var(--danger); }
.sheet.is-sheet-loading .service-editor,
.sheet.is-sheet-loading .sheet-wait {
    opacity: 0.22;
    filter: grayscale(0.4);
    pointer-events: none;
    user-select: none;
}
.sheet-loading {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: grid;
    place-items: center;
    pointer-events: all;
    background: transparent;
}
.sheet-loading[hidden] { display: none !important; }
.hourglass {
    width: 4.4rem;
    height: 6.6rem;
    color: var(--brass-deep);
    filter: drop-shadow(0 12px 22px rgba(28, 25, 21, 0.2));
    animation: hourglass-turn 1.15s ease-in-out infinite;
}
.hourglass-sand { transform-origin: 28px 42px; animation: hourglass-sand 1.15s ease-in-out infinite; }
@keyframes hourglass-turn {
    0%, 42% { transform: rotate(0deg); }
    68%, 100% { transform: rotate(180deg); }
}
@keyframes hourglass-sand {
    0%, 42% { opacity: 1; }
    68%, 100% { opacity: 0.35; }
}
.search { margin: 1rem 0; }
.search input, .search select { max-width: 28rem; }
.stat-row { grid-template-columns: repeat(3, 1fr); margin: 1.2rem 0 2rem; }
.stat-row a,
.stat-row .stat {
    text-decoration: none;
    color: inherit;
    border-top: 1px solid var(--line);
    padding-top: 0.7rem;
}
.stat-row strong { display: block; font-family: var(--serif); font-size: 2rem; }
.two { grid-template-columns: 1fr 1fr; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-top: 1px solid var(--line); }
.empty { color: var(--ink-soft); }
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; }
th, td { text-align: left; padding: 0.7rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
td small { display: block; color: var(--ink-soft); }
.drawer { border-top: 1px solid var(--line); padding: 0.8rem 0 1rem; }
.drawer summary { cursor: pointer; font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.8rem; }
.thread { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.8rem; }
.thread li { background: var(--paper); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.8rem 1rem; }
.thread header { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.86rem; color: var(--ink-soft); }
.thread p { margin: 0.4rem 0 0; }

.quote-top { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.quote-foot { display: grid; grid-template-columns: 1.15fr 1.45fr 1fr 0.9fr; gap: 0.8rem; align-items: end; margin-top: 1.2rem; }
.quote-block { margin-top: 1.6rem; }
.quote-block h2 { font-size: 1.45rem; }
.quote-actions { display: flex; gap: 0.6rem; margin: 1rem 0; flex-wrap: wrap; align-items: center; }
.billing-codes { display: grid; grid-template-columns: 0.7fr 0.7fr 1.4fr 1.4fr; gap: 0.8rem; }
.billing-meta { display: grid; grid-template-columns: 1.1fr 1.5fr 1.1fr; gap: 0.8rem; margin: 1rem 0 0.2rem; }
.billing-number { color: var(--danger); font-weight: 640; font-size: 1.35rem; }
.billing-print-actions { margin-top: 1.4rem; }
.combo { display: flex; gap: 0.4rem; align-items: flex-start; position: relative; min-width: 0; width: 100%; }
.combo-control { position: relative; flex: 1 1 auto; min-width: 0; width: 100%; }
.combo select.combo-native {
    position: absolute;
    width: 1px;
    height: 1px;
    min-width: 0;
    max-width: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
    appearance: none;
}
.combo-value {
    display: block;
    width: 100%;
    min-width: 0;
    text-align: left;
    direction: ltr;
    background: #fff;
    color: #1c1915;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    padding: 0.75rem 0.8rem;
    font: 400 1rem/1.45 var(--sans);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
    cursor: pointer;
    color-scheme: light;
}
.combo-value.is-placeholder { color: var(--ink-soft); }
.quote-grid .combo-value {
    border-radius: 0.55rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.95rem;
}
.combo-panel {
    position: fixed;
    z-index: 80;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: #fff;
    color: #1c1915;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    box-shadow: 0 16px 40px rgba(23, 21, 18, 0.16);
    overflow: hidden;
    direction: ltr;
    text-align: left;
    color-scheme: light;
}
.combo-panel[hidden] { display: none !important; }
.place-card {
    position: fixed;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    max-width: min(22rem, calc(100vw - 16px));
    padding: 0.55rem 0.75rem;
    background: #fff;
    color: #1c1915;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    box-shadow: 0 16px 40px rgba(23, 21, 18, 0.16);
    font: 400 0.82rem/1.35 var(--sans);
    pointer-events: none;
    text-align: left;
    direction: ltr;
}
.place-card[hidden] { display: none !important; }
.place-card span { display: block; overflow-wrap: anywhere; }
.combo-search {
    flex: 0 0 auto;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    color: #1c1915;
    padding: 0.7rem 0.8rem;
    font: 400 0.95rem/1.4 var(--sans);
    color-scheme: light;
}
.combo-search:focus { outline: 2px solid var(--brass); outline-offset: -2px; }
.combo-list {
    list-style: none;
    margin: 0;
    padding: 0.3rem;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    background: #fff;
    color: #1c1915;
}
.combo-option {
    display: block;
    width: 100%;
    text-align: left;
    direction: ltr;
    background: #fff;
    color: #1c1915;
    border: 0;
    border-radius: 0.45rem;
    padding: 0.55rem 0.65rem;
    font: 400 0.95rem/1.45 var(--sans);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
    cursor: pointer;
    color-scheme: light;
}
.combo-option:hover,
.combo-option.is-active { background: #f3eee6; }
.combo-option[aria-selected="true"] { background: #efe4d4; }
.combo-empty { margin: 0; padding: 0.7rem 0.75rem; color: var(--ink-soft); }
.plus {
    width: 2.4rem;
    height: 2.4rem;
    margin-top: 0.15rem;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid var(--brass);
    background: var(--paper);
    color: var(--brass-deep);
    font: 500 1.2rem/1 var(--sans);
    cursor: pointer;
}
.plus:hover { background: var(--ivory); }
.whatsapp, .pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    margin-top: 0.15rem;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid var(--brass);
    background: var(--paper);
    color: var(--brass-deep);
    text-decoration: none;
}
.whatsapp[hidden], .pin[hidden] { display: none; }
.whatsapp:hover, .pin:hover { background: var(--ivory); }
.whatsapp:focus-visible, .pin:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.whatsapp svg, .pin svg { width: 1.2rem; height: 1.2rem; display: block; }
.quote-block { overflow-x: auto; }
.quote-grid {
    width: 100%;
    min-width: 44rem;
    table-layout: fixed;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
    margin: 0.35rem 0 0.35rem;
}
.quote-grid-vehicles,
.quote-grid-notes { min-width: 28rem; }
.quote-grid th,
.quote-grid td {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 0.4rem 0.45rem;
    vertical-align: top;
    background: #fff;
}
.quote-grid th {
    background: var(--ivory);
    color: var(--ink-soft);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
}
.quote-grid tr:last-child td { border-bottom: 0; }
.quote-grid th:last-child,
.quote-grid td:last-child { border-right: 0; }
.quote-col-date { width: 16%; }
.quote-col-service { width: 28%; }
.quote-col-qty { width: 10%; }
.quote-col-price { width: 14%; }
.quote-col-vehicle { width: 26%; }
.quote-col-remove { width: 3.2rem; }
.quote-grid .quote-remove { text-align: center; width: 3.2rem; }
.quote-grid .text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2.2rem;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--brass-deep);
}
.quote-add { display: inline-block; margin: 0.2rem 0 0.35rem; }
.field-error { color: var(--danger); font-size: 0.82rem; margin: 0.25rem 0 0; }
.quote-grid input, .quote-grid select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 0.55rem;
    padding: 0.45rem 0.55rem;
    font: 400 0.95rem var(--sans);
}
.quote-date[readonly] { background: var(--ivory); color: var(--ink); }
.quote-preview { margin-top: 1.6rem; }
.quote-sheet {
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.3rem 1.4rem 1.5rem;
}
.quote-kicker {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--brass);
    margin: 0 0 0.2rem;
}
.quote-brand { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 0.7rem; }
.quote-print-banner { margin: 0 0 0.8rem; }
.quote-logo {
    display: block;
    max-width: 9rem;
    max-height: 3.2rem;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 0 0.55rem;
    padding: 0;
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
}
.quote-standard {
    margin: 0;
    white-space: pre-wrap;
    color: var(--ink);
}
.quote-standard-foot {
    border-top: 1px solid var(--brass);
    margin-top: 0.85rem;
    padding-top: 0.7rem;
    color: var(--ink-soft);
}
.logo-current {
    display: flex;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.logo-current img {
    display: block;
    max-width: 12rem;
    max-height: 3.2rem;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: none;
    box-shadow: none;
}
.quote-print-table { width: 100%; border-collapse: collapse; margin: 0; }
.quote-print-table > thead > tr > td,
.quote-print-table > tbody > tr > td,
.quote-print-table > tfoot > tr > td { border: 0; padding: 0; }
.quote-print-head, .quote-print-foot { display: flex; justify-content: space-between; gap: 1.4rem; }
.quote-print-head p, .quote-print-foot p, .quote-print-people p { margin: 0 0 0.55rem; }
.quote-sheet h2 { font-size: 1.25rem; margin: 1rem 0 0.35rem; }
.quote-lines { margin: 0.4rem 0 0.8rem; }
.quote-notes { list-style: none; margin: 0; padding: 0; }
.quote-notes li { padding: 0.4rem 0; border-top: 1px solid var(--line); white-space: pre-wrap; }
.quote-print-foot { border-top: 1px solid var(--line); margin-top: 0.6rem; padding-top: 0.8rem; }
dialog.catalog-modal {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--ivory);
    color: var(--ink);
    padding: 1.2rem 1.3rem 1.4rem;
    max-width: 34rem;
    width: calc(100% - 2rem);
    max-height: 90vh;
    overflow: auto;
}
dialog.catalog-modal::backdrop { background: rgba(23, 21, 18, 0.48); }
dialog.catalog-modal h2 { font-size: 1.7rem; }
.modal-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
dialog.quote-preview-modal {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--ivory);
    color: var(--ink);
    padding: 1rem 1rem 1.2rem;
    width: min(52rem, calc(100% - 2rem));
    max-height: 90vh;
    overflow: auto;
}
dialog.quote-preview-modal:not([open]) { display: none; }
dialog.quote-preview-modal::backdrop { background: rgba(23, 21, 18, 0.48); }
dialog.quote-preview-modal .quote-sheet { margin-top: 0; }
dialog.quote-preview-modal .modal-actions { margin-top: 1rem; }
.service-date-field { width: 12.5rem; flex: 0 0 auto; }
.service-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 12rem);
    margin-top: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: #fff;
}
.service-scroll.is-sheet-wide { overflow-x: auto; }
.service-scale {
    width: 100%;
    min-width: 0;
    transform-origin: top left;
}
.service-scroll .service-grid {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    table-layout: fixed;
    font-size: 0.72rem;
}
.service-grid col.sg-id { width: 2.15rem; }
.service-grid col.sg-op { width: 5.75rem; }
.service-grid col.sg-driver,
.service-grid col.sg-supplier { width: 5rem; }
.service-grid col.sg-quote { width: 6.25rem; }
.service-grid col.sg-date { width: 5.75rem; }
.service-grid col.sg-time { width: 4.4rem; }
.service-grid col.sg-vehicle { width: 4.15rem; }
.service-grid col.sg-contact,
.service-grid col.sg-phone { width: 7.4rem; }
.service-grid col.sg-place { width: 6rem; }
.service-grid col.sg-flight { width: 3.4rem; }
.service-grid col.sg-pax { width: 2.4rem; }
.service-grid col.sg-money { width: 4rem; }
.service-grid col.sg-posted { width: 4.5rem; }
.service-grid col.sg-remove { width: 1.7rem !important; }
.service-scroll .service-grid th,
.service-scroll .service-grid td {
    padding: 0.12rem 0.16rem;
    vertical-align: middle;
    overflow: hidden;
}
.service-scroll .service-grid th.col-remove,
.service-scroll .service-grid td.col-remove {
    width: 1.7rem;
    max-width: 1.7rem;
    min-width: 1.7rem;
    padding: 0.08rem 0;
    text-align: center;
    box-sizing: border-box;
}
.service-grid tbody tr:nth-child(odd) td { background: #faf7f2; }
.service-grid tbody tr:nth-child(even) td { background: #e3efe7; }
.service-grid tbody tr.is-odd td { background: #faf7f2; }
.service-grid tbody tr.is-even td { background: #e3efe7; }
.service-grid tbody tr.is-current td { background: #f3e2c4; }
.service-grid tbody input,
.service-grid tbody select,
.service-grid tbody .combo-value { background: transparent; }
.service-grid thead th[data-sort] { cursor: pointer; user-select: none; padding-right: 1.7rem; position: sticky; }
.service-grid .is-col-hidden { display: none !important; }
.service-grid col.is-col-hidden { display: table-column; visibility: collapse; width: 0 !important; }
.service-grid thead th.is-col-dragging { opacity: 0.45; }
.service-grid thead th.is-col-drop-before { box-shadow: inset 3px 0 0 var(--brass-deep); }
.service-grid thead th.is-col-drop-after { box-shadow: inset -3px 0 0 var(--brass-deep); }
.sheet-sort { cursor: grab; }
.service-grid thead th.is-col-dragging .sheet-sort { cursor: grabbing; }
.service-grid thead th.is-sort-asc .sheet-sort::after,
.service-grid thead th.is-sort-desc .sheet-sort::after {
    content: " ↑";
    color: var(--brass-deep);
}
.service-grid thead th.is-sort-desc .sheet-sort::after { content: " ↓"; }
.sheet-funnel {
    position: absolute;
    top: 0.04rem;
    right: 0;
    width: 0.78rem;
    height: 0.78rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8d8478;
    cursor: pointer;
}
.sheet-funnel svg { width: 0.72rem; height: 0.72rem; display: block; }
.sheet-funnel.is-filtering { color: var(--brass-deep); }
.sheet-hide {
    position: absolute;
    top: 0.02rem;
    right: 0.82rem;
    z-index: 3;
    width: 0.78rem;
    height: 0.78rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8d3b32;
    cursor: pointer;
    font: 700 0.85rem/0.78rem inherit;
}
.sheet-hide:hover { color: #5c221c; }
.sheet-resize {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 0.45rem;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
}
.sheet-filter {
    position: fixed;
    z-index: 90;
    width: min(18rem, calc(100vw - 1rem));
    max-height: min(22rem, calc(100vh - 1rem));
    overflow: auto;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    box-shadow: 0 16px 40px rgba(23, 21, 18, 0.16);
    padding: 0.4rem 0.45rem 0.55rem;
}
.sheet-filter[hidden] { display: none !important; }
.sheet-filter-all,
.sheet-filter-option {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    padding: 0.28rem 0.15rem;
    font-size: 0.86rem;
    line-height: 1.3;
}
.sheet-filter-options { border-top: 1px solid var(--line); margin-top: 0.2rem; }
.sheet-filter input { margin-top: 0.15rem; }
.service-scroll .service-grid thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--ivory);
    white-space: normal;
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.62rem;
    line-height: 1.15;
}
.service-scale.is-sheet-expanded .service-grid,
.service-scale.is-sheet-expanded .service-grid thead th,
.service-scale.is-sheet-expanded .service-grid input,
.service-scale.is-sheet-expanded .service-grid .combo-value,
.service-scale.is-sheet-expanded .service-readonly,
.service-scale.is-sheet-expanded .service-label {
    font-size: var(--sheet-read-size, 16px);
}
.service-scale.is-sheet-expanded .service-grid input,
.service-scale.is-sheet-expanded .service-grid .combo-value {
    height: auto;
    min-height: 1.7rem;
}
.service-scroll .service-grid thead th[data-sort] { padding-right: 1.7rem; }
.service-grid .combo {
    min-width: 0;
    width: 100%;
    gap: 0.15rem;
    align-items: center;
}
.service-grid .combo-control { min-width: 0; }
.service-grid .combo-value,
.service-grid input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 1.35rem;
    padding: 0 0.2rem;
    border-radius: 0.35rem;
    font-size: 0.72rem;
    line-height: 1.2;
}
.service-grid .combo-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.service-grid .plus,
.service-grid .whatsapp,
.service-grid .pin,
.service-grid .text-button {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    font-size: 0.9rem;
}
.service-grid td.col-contact .combo {
    align-items: center;
    width: 100%;
    min-height: 1.25rem;
}
.service-grid td.col-contact .service-label {
    flex: 1 1 auto;
    line-height: 1.25rem;
}
.service-grid td.col-contact .whatsapp {
    align-self: center;
    flex: 0 0 1.25rem;
}
.service-grid .whatsapp svg,
.service-grid .pin svg { width: 0.8rem; height: 0.8rem; }
.service-grid input[type="date"]::-webkit-calendar-picker-indicator,
.service-grid input[type="time"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
    width: 0.85rem;
    height: 0.85rem;
}
.service-readonly, .service-label {
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
    color: var(--ink);
    line-height: 1.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.embed h1 { font-size: 2rem; }
body.embed .sheet { padding: 0.4rem 0.2rem 1.5rem; }
.service-record {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(23, 21, 18, 0.48);
}
.service-record[hidden] { display: none !important; }
body.is-record-open { overflow: hidden; }
.service-record-card {
    width: min(38rem, 100%);
    max-height: min(92vh, 48rem);
    overflow: auto;
    background: var(--ivory);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.15rem 1.25rem 1rem;
    box-shadow: 0 18px 50px rgba(23, 21, 18, 0.22);
}
.service-record-card h2 { font-size: 1.8rem; margin-bottom: 0.25rem; }
.service-record-status { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }
.service-record-fields { display: grid; gap: 0.7rem; margin: 0.95rem 0 0.8rem; }
.service-record-readonly {
    display: flex;
    align-items: center;
    min-height: 2.7rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    background: #fff;
}
.service-record .modal-actions { justify-content: space-between; margin-top: 0.4rem; }
.record-actions { display: flex; align-items: center; gap: 0.55rem; }
button.button.button-order,
button.button.button-ok,
button.button.button-undo {
    width: 2.85rem;
    min-height: 2.85rem;
    padding: 0;
    flex: none;
    background: transparent;
    border-color: transparent;
    border-radius: 50%;
}
button.button.button-order img,
button.button.button-ok img,
button.button.button-undo img { width: 2.55rem; height: 2.55rem; display: block; }
dialog.quote-overlay-modal {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--ivory);
    color: var(--ink);
    padding: 0.6rem;
    width: min(76rem, calc(100% - 1.2rem));
    height: min(92vh, 56rem);
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
dialog.quote-overlay-modal:not([open]) { display: none; }
dialog.quote-overlay-modal::backdrop { background: rgba(23, 21, 18, 0.48); }
dialog.quote-overlay-modal iframe {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0.7rem;
    background: #fff;
}

.sheet.sheet-narrow:has(.location-layout),
.sheet.sheet-narrow:has(.employee-layout) { max-width: 76rem; }
.employee-layout {
    display: grid;
    grid-template-columns: minmax(18rem, 28rem) minmax(16rem, 1fr);
    gap: 1.2rem;
    align-items: start;
}
.employee-document {
    position: sticky;
    top: 0.8rem;
    min-height: 18rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
}
.employee-document iframe,
.employee-document img {
    display: block;
    width: 100%;
    height: min(70vh, 40rem);
    margin-top: 0.6rem;
    object-fit: contain;
    border: 0;
    border-radius: 0.7rem;
    background: #f6f3ee;
}
.employee-document iframe[hidden],
.employee-document img[hidden],
.employee-document [hidden] { display: none; }
.location-layout {
    display: grid;
    grid-template-columns: minmax(16rem, 28rem) minmax(18rem, 1fr);
    gap: 1.1rem;
    align-items: start;
}
.location-map-frame {
    position: sticky;
    top: 0.8rem;
    border: 1px solid #c8b89a;
    border-radius: 1rem;
    padding: 0.4rem;
    background: #f6efe4;
    box-shadow: inset 0 0 0 1px rgba(138, 104, 48, 0.28);
}
.location-search { margin: 0.2rem 0.25rem 0.45rem; }
.location-search-row { display: flex; gap: 0.45rem; align-items: stretch; }
.location-search-row input { flex: 1 1 auto; min-width: 0; }
.location-search-row .button { flex: 0 0 auto; padding-inline: 0.9rem; }
.location-search-results {
    list-style: none;
    margin: 0 0.25rem 0.45rem;
    padding: 0;
    max-height: 9.5rem;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    background: #fff;
}
.location-search-results[hidden] { display: none; }
.location-search-results button {
    display: block;
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    line-height: 1.3;
}
.location-search-results li:last-child button { border-bottom: 0; }
.location-search-results button:hover { background: #f6efe4; }
.location-map {
    height: 28rem;
    min-height: 22rem;
    border-radius: 0.75rem;
    background: #d7e3db;
    cursor: crosshair;
}
.location-map-hint {
    margin: 0.45rem 0.35rem 0.2rem;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.35;
}
.poi-marker {
    background: var(--brass);
    border: 2px solid #fffdf8;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--brass-deep);
    box-sizing: border-box;
    cursor: pointer;
}
.face-auth { align-items: start; }
.face-panel { align-content: start; }
.face-stage {
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    background: #1c1915;
    aspect-ratio: 4 / 3;
}
.face-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.face-guide {
    position: absolute;
    inset: 12% 18%;
    border: 2px solid rgba(232, 214, 184, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 0 999px rgba(28, 25, 21, 0.28);
    pointer-events: none;
}
.face-status, .face-count { margin: 0; color: var(--ink-soft); }
.face-qr {
    display: grid;
    justify-items: center;
    gap: 0.6rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #f6efe4;
}
.face-qr[hidden] { display: none; }
.face-qr img, .face-qr canvas { display: block; }

.terms-page { padding: 1.5rem 6vw 4rem; }
.terms-page h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.terms-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr); gap: 1.4rem; align-items: start; }
.terms-side { position: sticky; top: 1rem; }
.terms-side form { margin: 0.75rem 0; }
.terms-side .button { width: 100%; }
.contract-frame { width: 100%; height: 72vh; min-height: 28rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.hash-line { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.75rem; word-break: break-all; }
.summary dd.hash-line { text-align: left; }
.click-list { margin: 0 0 1rem; padding-left: 1.1rem; }
.click-list li { margin: 0.25rem 0; }
.document-preview { display: block; width: 100%; max-height: 16rem; object-fit: contain; margin: 0.4rem 0 0.8rem; border: 1px solid var(--line); border-radius: 0.8rem; background: #fff; }
.document-frame { display: block; width: 100%; height: 24rem; margin: 0.4rem 0 0.8rem; border: 1px solid var(--line); border-radius: 0.8rem; background: #fff; }
.sheet .document-frame { height: 70vh; min-height: 28rem; }
button:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 900px) {
    .hero, .split, .auth, .grid-3, .two, .app, .terms-layout { grid-template-columns: 1fr; }
    .terms-side { position: static; }
    .contract-frame { height: 60vh; min-height: 22rem; }
    .hero { min-height: auto; }
    .sider { position: static; height: auto; overflow: visible; }
    .sider-toggle { width: 2.4rem; height: 2.6rem; margin: 0.45rem 0 0.45rem 0.7rem; justify-self: start; }
    html.is-sider-hidden .sider-toggle { width: 1.7rem; height: 3.4rem; margin: 0; }
    .sidenav { grid-template-columns: 1fr; }
    .menu-cadastros-panel {
        left: 0;
        top: calc(100% - 0.2rem);
        min-width: 0;
        width: 100%;
        padding-left: 0.35rem;
    }
    .workspace, .sheet { min-width: 0; max-width: 100%; }
    .workspace { padding: 1rem; }
    .temp-password { max-width: 100%; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .field-row, .sheet-head, .search, .topbar, .quote-top, .quote-foot, .billing-codes, .billing-meta, .location-layout, .employee-layout { grid-template-columns: 1fr; display: grid; }
    .employee-document { position: static; }
    .location-map-frame { position: static; }
    .location-map { height: 18rem; min-height: 16rem; }
    table { display: block; overflow-x: auto; max-width: 100%; }
    .row-actions { flex-direction: column; align-items: flex-start; }
    .quote-grid { display: table; }
    .service-scroll { overflow-x: hidden; max-width: 100%; }
    .service-scroll .service-grid { display: table; width: 100%; min-width: 0; overflow: visible; }
    .quote-print-table { display: table; overflow: visible; }
    .quote-sheet { overflow-x: auto; }
}

.presenca {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
}
.presenca::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #8a8175;
}
.presenca.is-on::before { background: var(--ok); }

.aviso-sistema {
    position: fixed;
    z-index: 1300;
    right: 1rem;
    bottom: 1rem;
    width: min(24rem, calc(100vw - 2rem));
    padding: 1rem;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(28, 25, 21, 0.18);
}
.aviso-sistema[hidden] { display: none !important; }
.aviso-sistema p { margin: 0 0 0.8rem; }
.aviso-acoes { display: flex; gap: 0.5rem; }
.aviso-acoes .button { flex: 1; min-height: 2.8rem; }

.motorista-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    background: var(--sider);
    color: #f6f1e7;
}
.motorista-brand {
    color: #f6f1e7;
    text-decoration: none;
    font-family: var(--serif);
    font-size: 1.25rem;
}
.motorista-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.motorista-nav a {
    color: #f6f1e7;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
}
.motorista-nav a.is-active { background: var(--brass); }
body.motorista h1 { font-size: 1.8rem; }
body.motorista .sheet { padding: 1rem 0.9rem 3rem; max-width: 48rem; margin: 0 auto; }
body.motorista .button,
body.motorista button.button {
    width: 100%;
    min-height: 3.2rem;
    font-size: 1.05rem;
}
body.motorista .aviso-acoes .button { width: auto; }

.os-list, .call-history, .traffic-list { display: grid; gap: 0.7rem; }
.os-card, .call-card, .traffic-card, .person {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 1rem;
    color: inherit;
    text-decoration: none;
    min-height: 4.4rem;
}
.os-card strong, .person strong { font-size: 1.05rem; }
.os-paper {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #222;
    margin: 0.6rem 0 1rem;
}
.os-top, .os-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
}
.os-top { border-bottom: 1px solid #222; font-weight: 700; letter-spacing: 0.04em; }
.os-foot { font-size: 0.78rem; }
.os-line {
    display: grid;
    grid-template-columns: 7.8rem minmax(0, 1fr);
    border-bottom: 1px solid #222;
}
.os-line .k {
    padding: 0.5rem;
    border-right: 1px solid #222;
    background: #f6f6f6;
    font-size: 0.82rem;
}
.os-line .v { padding: 0.5rem; min-height: 2.5rem; white-space: pre-line; }
.os-line input, .os-line textarea, .os-km input, .traffic-filter input, .comms-form textarea {
    width: 100%;
    border: 1px solid #c8c8c8;
    border-radius: 0.35rem;
    padding: 0.45rem 0.5rem;
    font: inherit;
    background: #fff;
    color: inherit;
}
.os-km {
    display: flex;
    gap: 1rem;
    padding: 0.6rem;
    border-bottom: 1px solid #222;
}
.os-km label { display: grid; gap: 0.25rem; font-size: 0.82rem; }
.os-km input { width: 7rem; min-height: 2.6rem; border-color: #222; }
.os-block .v { min-height: 3.4rem; }
.os-obs textarea { min-height: 7rem; }
.os-quote-notes { margin: 0 0 0.45rem; white-space: pre-line; }
.os-note { color: var(--ink-soft); }
.acesso-tabela { width: 100%; border-collapse: collapse; }
.acesso-tabela th, .acesso-tabela td { text-align: left; padding: 0.45rem 0.35rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.acesso-tabela .acesso-secao td { font-weight: 640; background: #f6efe4; }
.acesso-tabela .check { margin: 0; }
.os-map, .team-map {
    height: 20rem;
    margin: 0.6rem 0;
    background: #e7e1d6;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
}
.mapa-pessoas {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}
.mapa-pessoas li {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--line);
}
.mapa-pessoas span { color: var(--ink-soft); }
.mapa-rotulo {
    background: #1c1915;
    color: #f6f1e7;
    border: 0;
    border-radius: 0.55rem;
    box-shadow: 0 1px 4px rgba(28, 25, 21, 0.28);
    font: 500 0.82rem/1.35 Outfit, sans-serif;
}
.mapa-rotulo::before {
    border-top-color: #1c1915;
}
.leaflet-container .mapa-comercio {
    background: #1d3b33;
    border: 2px solid #fffdf8;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #142820;
    box-sizing: border-box;
    cursor: pointer;
}
.mapa-comercios {
    margin: 0.15rem 0 0.45rem;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.35;
}
.mapa-comercios[hidden] { display: none; }
.mapa-comercio-popup .leaflet-popup-content strong { display: block; }
.mapa-comercio-popup .leaflet-popup-content span {
    display: block;
    color: var(--ink-soft);
    font-weight: 380;
}
.leaflet-container {
    position: relative;
    z-index: 0;
    isolation: isolate;
}
.os-actions { display: grid; gap: 0.6rem; margin: 0.8rem 0; }
.os-trafego { display: grid; gap: 0.45rem; margin: 0; }
.os-trafego div {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 0.4rem;
}
.os-trafego dt { color: var(--ink-soft); }
.os-trafego dd { margin: 0; }
.os-legend { display: flex; flex-wrap: wrap; gap: 0.45rem 0.8rem; align-items: center; }
.swatch { width: 1.4rem; height: 0.35rem; display: inline-block; }
.swatch-origem { background: #8a6432; }
.swatch-destino { background: #1d3b33; }
.rota-aviso {
    margin: 0.5rem 0;
    padding: 0.7rem 0.8rem;
    background: #fff4f2;
    border: 1px solid #e2c4c0;
    border-radius: 0.7rem;
}
.comms { display: grid; gap: 1rem; }
.comms-people { display: grid; gap: 0.45rem; }
.person.is-active { border-color: var(--brass); }
.bolhas {
    display: grid;
    gap: 0.45rem;
    max-height: 28rem;
    overflow: auto;
    margin-bottom: 0.8rem;
}
.bolha {
    max-width: 85%;
    padding: 0.6rem 0.75rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
}
.bolha.minha { margin-left: auto; background: #f3e6d4; }
.bolha p { margin: 0; white-space: pre-wrap; }
.bolha img { display: block; max-width: 100%; margin-top: 0.35rem; border-radius: 0.5rem; }
.bolha audio { display: block; width: 100%; margin-top: 0.35rem; }
.bolha video { display: block; width: 100%; max-height: 16rem; margin-top: 0.35rem; border-radius: 0.5rem; background: #1c1915; }
.painel-video-preview { display: block; width: 100%; max-height: 12rem; margin-top: 0.45rem; border-radius: 0.6rem; background: #1c1915; }
.painel-video-preview[hidden] { display: none !important; }
.bolha time { display: block; margin-top: 0.3rem; color: var(--ink-soft); font-size: 0.75rem; }
.call-stage {
    position: relative;
    min-height: 14rem;
    background: #1c1915;
    border-radius: 0.8rem;
    overflow: hidden;
}
.call-stage .call-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.35rem;
    min-height: 14rem;
}
.call-tile { position: relative; min-height: 14rem; }
.call-tile span {
    position: absolute;
    left: 0.45rem;
    bottom: 0.4rem;
    z-index: 1;
    color: #f6f1e7;
    font-size: 0.75rem;
    font-weight: 640;
    text-shadow: 0 1px 2px #1c1915;
}
.call-stage video[data-remote],
.call-stage .call-tile video {
    display: block;
    width: 100%;
    height: 16rem;
    max-height: none;
    object-fit: cover;
    background: #1c1915;
    border-radius: 0.45rem;
}
.call-stage video[data-local] {
    position: absolute;
    right: 0.55rem;
    bottom: 0.55rem;
    width: 6.6rem;
    height: 4.8rem;
    max-height: none;
    object-fit: cover;
    border-radius: 0.55rem;
    border: 2px solid #f6f1e7;
    z-index: 2;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    background: #1c1915;
}
.call-wait {
    position: absolute;
    inset: 0;
    z-index: 1;
    margin: 0;
    min-height: 14rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f6f1e7;
    font-weight: 640;
    text-align: center;
    padding: 1rem;
}
.call-wait[hidden] { display: none !important; }
.call-adicionar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.55rem 0 0;
}
.call-adicionar[hidden] { display: none !important; }
.call-stage video {
    width: 100%;
    max-height: 18rem;
    background: #1c1915;
    border-radius: 0.8rem;
}
.call-open { padding: 0.7rem 0.8rem; background: #f6efe4; border-radius: 0.8rem; }
.traffic-filter, .comms-form { display: grid; gap: 0.6rem; margin: 0.8rem 0 1rem; }
.traffic-card header { display: flex; justify-content: space-between; gap: 0.5rem; }
@media (min-width: 800px) {
    .comms { grid-template-columns: 16rem minmax(0, 1fr); align-items: start; }
    .os-actions { grid-template-columns: 1fr 1fr; }
    .os-actions .full { grid-column: 1 / -1; }
    body.motorista .comms { grid-template-columns: 1fr; }
}

.sidenav > button.comms-menu {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    font: inherit;
    color: #f6f1e7;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    cursor: pointer;
}
.sidenav > button.comms-menu.is-active,
.sidenav > button.comms-menu:hover { background: rgba(246, 241, 231, 0.08); }
.motorista-nav button {
    color: #f6f1e7;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    font: inherit;
    cursor: pointer;
}
.motorista-nav button.is-active { background: var(--brass); }
.motorista-bar { position: sticky; top: 0; z-index: 155; }

.painel-comunicacao {
    position: fixed;
    z-index: 1200;
    top: 0.75rem;
    right: 0.75rem;
    width: min(28rem, calc(100vw - 1.5rem));
    height: min(40rem, calc(100dvh - 1.5rem));
    display: flex;
}
body.motorista .painel-comunicacao {
    top: 4.6rem;
    height: min(40rem, calc(100dvh - 11.5rem));
}
.painel-comunicacao[hidden] { display: none !important; }
.painel-comunicacao-caixa {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 22px 50px rgba(28, 25, 21, 0.28);
    overflow: hidden;
}
.painel-comunicacao-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem 0.35rem;
}
.painel-comunicacao-topo h2 { margin: 0; font-size: 1.45rem; }
.painel-fechar {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    min-height: 2.6rem;
    padding: 0.35rem 0.9rem;
    font: inherit;
    font-weight: 640;
    cursor: pointer;
}
.pessoa-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}
.pessoa-nome { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.pessoa-nome small { color: var(--ink-soft); font-size: 0.85rem; font-weight: 500; }
.pessoa-aviso { margin: 0; color: #8d3b32; font-size: 0.92rem; font-weight: 640; }
.pessoa-acao:disabled { opacity: 0.45; cursor: not-allowed; }
.pessoa-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.pessoa-acao {
    border: 1px solid var(--line);
    background: #fffdf8;
    color: var(--ink);
    border-radius: 999px;
    min-height: 2.4rem;
    padding: 0.25rem 0.75rem;
    font: inherit;
    font-weight: 640;
    cursor: pointer;
}
.painel-audio-aviso {
    margin: 0.35rem 0 0;
    color: #8d3b32;
    font-weight: 640;
}
.painel-ticket { margin: 0 0 0.45rem; }
.painel-ticket-nota {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin: 0 0 0.7rem;
    font-weight: 640;
}
.painel-ticket-nota a { color: var(--brass-deep); }
.ticket-arquivos { display: grid; gap: 0.7rem; margin: 0 0 1rem; }
.ticket-arquivos article {
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: #fff;
}
.ticket-arquivos img,
.ticket-arquivos audio,
.ticket-arquivos video { width: 100%; max-height: 18rem; }
.ticket-arquivos p { margin: 0; }
.painel-comunicacao-miolo {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 0 0.85rem 0.9rem;
}
.painel-faixa {
    margin: 0 0 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    background: #f6efe4;
    font-weight: 640;
}
.pessoa-linha {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.1rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
button.pessoa-linha { appearance: none; }
.pessoa-linha strong { font-size: 1.05rem; font-weight: 500; }
.pessoa-linha.is-on,
.pessoa-linha.is-on strong {
    background: transparent;
    border-color: var(--line);
    color: #143d2c;
    font-weight: 700;
}
.pessoa-linha.is-off,
.pessoa-linha.is-off strong {
    background: transparent;
    border-color: var(--line);
    color: #b3aa9f;
    font-weight: 400;
}
.pessoa-linha.is-on .pessoa-nome small { color: #3d6b56; font-weight: 640; }
.pessoa-linha.is-off .pessoa-nome small { color: #c4bbb0; }
.pessoa-estado {
    display: inline;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
}
.pessoa-estado.is-on { background: transparent; color: #1f6a48; font-weight: 640; }
.pessoa-estado.is-off { background: transparent; color: #c4bbb0; }
.conversa-viva {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.7rem;
    margin: 0 0 0.7rem;
}
.pessoa-empresa { margin: 0 0 0.45rem; color: var(--ink-soft); font-size: 0.85rem; }
.painel-bloqueio {
    margin: 0 0 0.7rem;
    padding: 0.7rem 0.75rem;
    border-radius: 0.75rem;
    background: #f8e8e5;
    color: #8d3b32;
}
.painel-bloqueio[hidden] { display: none !important; }
.painel-bloqueio p { margin: 0 0 0.55rem; font-weight: 640; }
.painel-gravando {
    margin: 0.45rem 0 0;
    color: #1f6a48;
    font-weight: 640;
}
.painel-gravando[hidden] { display: none !important; }
.painel-espectro {
    display: block;
    width: 100%;
    height: 4.5rem;
    margin-top: 0.35rem;
    border-radius: 0.6rem;
    background: #1c1915;
}
.painel-espectro[hidden] { display: none !important; }
body.comunicador-janela {
    margin: 0;
    min-height: 100dvh;
    background: #f6f1e7;
}
.painel-comunicacao.is-janela,
body.comunicador-janela .painel-comunicacao {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    height: 100dvh;
    max-width: none;
}
.painel-comunicacao.is-janela .painel-comunicacao-caixa,
body.comunicador-janela .painel-comunicacao-caixa {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.painel-voltar {
    border: 0;
    background: transparent;
    color: var(--brass-deep);
    font: inherit;
    font-weight: 640;
    padding: 0;
    margin: 0 0 0.55rem;
    cursor: pointer;
}
.painel-comunicacao .bolhas { max-height: none; flex: 1; }
.painel-comunicacao .comms-form { margin-bottom: 0; }
.painel-historico { display: grid; gap: 0.45rem; margin-top: 0.8rem; }
.painel-historico h3 { margin: 0.2rem 0; font-size: 1.15rem; }
.painel-historico article {
    display: grid;
    gap: 0.2rem;
    padding: 0.7rem 0.75rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
}
.painel-historico audio,
.painel-historico video { width: 100%; margin-top: 0.35rem; }
.painel-comunicacao .call-stage video[data-remote],
.painel-comunicacao .call-stage .call-tile video {
    height: min(28rem, 58dvh);
    min-height: 16rem;
    max-height: none;
}
.painel-comunicacao .call-stage video[data-local] {
    width: 6.2rem;
    height: 4.6rem;
    max-height: none;
}
.painel-comunicacao .os-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    grid-template-columns: none;
}
body.motorista .painel-comunicacao .button,
body.motorista .painel-comunicacao button.button {
    width: auto;
    min-height: 2.7rem;
}
.painel-chamada-viva {
    margin: 0 0 0.6rem;
    padding: 0.7rem 0.75rem;
    border-radius: 0.8rem;
    background: #e7f5ee;
    border: 2px solid #1f6a48;
}

body.navegacao {
    margin: 0;
    height: 100dvh;
    overflow: hidden;
    background: #e7e1d6;
}
.nav-mapa {
    position: fixed;
    inset: 0;
    z-index: 0;
    height: 100%;
    width: 100%;
    background: #e7e1d6;
}
.nav-barra,
.nav-lado,
.nav-voz-painel,
.nav-seguir,
.nav-folha,
.nav-rotas-folha {
    position: fixed;
    z-index: 20;
}
.nav-barra {
    top: 0;
    left: 0;
    right: 0;
    z-index: 26;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 5.5rem;
    padding: calc(0.7rem + env(safe-area-inset-top)) 1rem 0.85rem 0.85rem;
    background: #000;
    color: #fff;
}
.nav-seta {
    width: 4.35rem;
    height: 4.35rem;
    flex: 0 0 auto;
}
.nav-seta svg { width: 100%; height: 100%; display: block; }
.nav-barra-texto { min-width: 0; }
.nav-passo {
    margin: 0;
    font-family: var(--sans);
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #fff;
}
.nav-passo.is-aviso {
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    font-weight: 640;
    line-height: 1.2;
    letter-spacing: 0;
}
.nav-via {
    margin: 0.28rem 0 0;
    color: #2ea2ff;
    font-size: clamp(1.15rem, 4.8vw, 1.5rem);
    font-weight: 700;
    line-height: 1.15;
}
.nav-detalhe,
.nav-autor { color: var(--ink-soft); }
.nav-lado {
    top: calc(6.15rem + env(safe-area-inset-top));
    right: 0.7rem;
    z-index: 27;
    display: grid;
    gap: 0.65rem;
}
.nav-som {
    appearance: none;
    width: 3.45rem;
    height: 3.45rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
.nav-som svg { width: 1.55rem; height: 1.55rem; display: block; }
.nav-som[aria-expanded="true"] { background: #f3f3f3; }
.nav-voz-painel {
    top: calc(6.15rem + env(safe-area-inset-top));
    right: 4.7rem;
    z-index: 32;
    width: min(16.5rem, calc(100vw - 6.2rem));
    max-height: calc(100dvh - var(--nav-folha, 8rem) - 7.4rem - env(safe-area-inset-top));
    overflow: auto;
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
    background: #fff;
    color: #1a1a1a;
    border-radius: 1rem;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}
.nav-voz-painel label {
    display: grid;
    gap: 0.2rem;
    font-size: 0.82rem;
}
.nav-voz-painel select {
    width: 100%;
    min-height: 2.7rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    padding: 0.4rem 0.55rem;
    font: inherit;
    background: #fff;
    color: inherit;
}
.nav-voz-painel .button { width: 100%; min-height: 2.7rem; }
.nav-seguir {
    top: calc(6.15rem + env(safe-area-inset-top));
    left: 0.7rem;
    z-index: 27;
    border: 0;
    background: #fff;
    color: #111;
    border-radius: 999px;
    min-height: 2.8rem;
    padding: 0.45rem 1rem;
    font: 640 0.95rem var(--sans);
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
body.nav-sem-barra .nav-lado,
body.nav-sem-barra .nav-seguir,
body.nav-sem-barra .nav-voz-painel {
    top: calc(0.7rem + env(safe-area-inset-top));
}
.nav-seguir[hidden],
.nav-barra[hidden],
.nav-seta[hidden],
.nav-passo[hidden],
.nav-via[hidden],
.nav-transito[hidden],
.nav-detalhe[hidden],
.nav-alertas[hidden],
.nav-extra[hidden],
.nav-voz-painel[hidden],
.nav-rotas-folha[hidden],
.nav-chegada-linha[hidden],
.nav-chegada-linha [hidden],
.nav-rotas-vazio[hidden] { display: none !important; }
.nav-voz-nota {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
}
.nav-voz-nota:empty { display: none; }
.mapa-config {
    margin-top: 1.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}
.mapa-config h2 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.mapa-config .checks { margin-top: 0.45rem; }
.mapa-config .check span { line-height: 1.35; }
.nav-folha {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 11rem - env(safe-area-inset-top));
    background: #fff;
    color: #1a1a1a;
    border-radius: 1.35rem 1.35rem 0 0;
    box-shadow: 0 -12px 32px rgba(28, 25, 21, 0.16);
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
}
.nav-alca {
    appearance: none;
    flex: 0 0 auto;
    width: 100%;
    min-height: 1.45rem;
    margin: 0;
    padding: 0.55rem 0 0.15rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.nav-alca-barra {
    width: 2.35rem;
    height: 0.28rem;
    border-radius: 999px;
    background: #c5c5c5;
}
.nav-extra {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    max-height: calc(100dvh - 11rem - 8.6rem - env(safe-area-inset-top));
    padding: 0.35rem 1rem 0.55rem;
}
.nav-folha.is-aberta .nav-rodape {
    box-shadow: inset 0 1px 0 #ececec;
    padding-top: 0.7rem;
}
.nav-painel {
    padding: 0.15rem 0 0.35rem;
    background: transparent;
}
.nav-rodape {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    background: #fff;
    display: grid;
    grid-template-columns: 4.6rem minmax(0, 1fr) 4.6rem;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 1.05rem 0.95rem;
}
.nav-velocidade {
    position: relative;
    width: 4.6rem;
    height: 4.6rem;
    justify-self: start;
}
.nav-velocidade-anel {
    display: block;
    width: 100%;
    height: 100%;
}
.nav-velocidade-miolo {
    position: absolute;
    inset: 0.55rem;
    display: grid;
    align-content: center;
    justify-items: center;
    color: #fff;
    line-height: 0.95;
    pointer-events: none;
}
.nav-velocidade-numero {
    font-size: 1.72rem;
    font-weight: 700;
    letter-spacing: -0.045em;
}
.nav-velocidade-unidade {
    margin-top: 0.12rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.nav-chegada { min-width: 0; text-align: center; }
.nav-chegada-hora {
    margin: 0;
    font-size: clamp(1.7rem, 7.2vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
    color: #1a1a1a;
}
.nav-chegada-linha {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.38rem;
    margin: 0.32rem 0 0;
    color: #5c5c5c;
    font-size: clamp(0.92rem, 3.5vw, 1.05rem);
    font-weight: 500;
    white-space: nowrap;
}
.nav-chegada-ponto { color: #8a8a8a; }
.nav-rotas-botao {
    appearance: none;
    justify-self: end;
    width: 3.45rem;
    height: 3.45rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f1f1;
    color: #2c2c2c;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.nav-rotas-botao svg { width: 1.55rem; height: 1.55rem; display: block; }
.nav-rotas-botao[aria-expanded="true"] { background: #e4e4e4; }
.nav-rotas-folha {
    left: 0.7rem;
    right: 0.7rem;
    bottom: calc(var(--nav-folha, 7.6rem) + 0.45rem);
    z-index: 34;
    max-height: min(42dvh, 22rem);
    overflow: auto;
    padding: 0.85rem 0.85rem 0.7rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 16px 36px rgba(28, 25, 21, 0.22);
}
.nav-rotas-titulo {
    margin: 0 0 0.45rem;
    font-weight: 640;
}
.nav-rotas-vazio {
    margin: 0.2rem 0 0.35rem;
    color: var(--ink-soft);
}
.nav-rotas-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}
.nav-rota {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e4e4e4;
    border-radius: 0.8rem;
    background: #fff;
    color: #1a1a1a;
    font: 640 1rem var(--sans);
    text-align: left;
    cursor: pointer;
}
.nav-rota.is-atual {
    border-color: #1c1915;
    background: #f6f1e7;
}
.nav-rota-marca {
    flex: 0 0 auto;
    color: var(--brass-deep);
    font-size: 0.72rem;
    font-weight: 640;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.nav-transito {
    margin: 0;
    font-weight: 640;
}
.nav-transito::before {
    content: "";
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    margin-right: 0.4rem;
    border-radius: 50%;
    background: #1d3b33;
    vertical-align: -0.05rem;
}
.nav-transito[data-nivel="moderado"]::before { background: #8a6432; }
.nav-transito[data-nivel="intenso"]::before { background: #9a4b1f; }
.nav-transito[data-nivel="parado"]::before { background: #8d3b32; }
.nav-detalhe,
.nav-restante,
.nav-tempo { margin: 0.25rem 0 0; }
.nav-restante,
.nav-tempo { font-weight: 640; }
.nav-alertas {
    list-style: none;
    margin: 0.55rem 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}
.nav-alertas li {
    padding: 0.45rem 0.55rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
}
.nav-alertas p { margin: 0.15rem 0 0; }
.nav-alerta-vazio {
    background: transparent !important;
    border: 0 !important;
    padding-left: 0 !important;
    color: var(--ink-soft);
}
.nav-aviso {
    min-height: 1.2rem;
    margin: 0.55rem 0 0;
    font-weight: 640;
}
.nav-aviso.is-err { color: var(--danger); }
.nav-aviso.is-ok { color: var(--ok); }
.nav-vazio {
    min-height: 100dvh;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.4rem;
    text-align: center;
    padding: 2rem 1.2rem;
    background: var(--ivory);
}
.nav-vazio h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
body.navegacao .leaflet-top.leaflet-right {
    top: calc(10.8rem + env(safe-area-inset-top));
    right: 0.85rem;
    z-index: 18;
}
body.nav-sem-barra .leaflet-top.leaflet-right {
    top: calc(5.4rem + env(safe-area-inset-top));
}
body.navegacao .leaflet-bottom {
    bottom: calc(var(--nav-folha, 7.6rem) + 0.25rem);
    z-index: 15;
}
body.navegacao .leaflet-control-attribution {
    font-size: 0.68rem;
    max-width: 12rem;
}
@media (max-width: 380px) {
    .nav-rodape {
        grid-template-columns: 3.9rem minmax(0, 1fr) 3.9rem;
        padding-inline: 0.7rem;
    }
    .nav-velocidade { width: 3.9rem; height: 3.9rem; }
    .nav-velocidade-numero { font-size: 1.45rem; }
    .nav-rotas-botao { width: 3rem; height: 3rem; }
}
@media (min-width: 800px) {
    .nav-folha,
    .nav-rotas-folha {
        left: 50%;
        right: auto;
        width: min(28rem, calc(100vw - 2rem));
        transform: translateX(-50%);
    }
}

.vistoria h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.vistoria h2 { font-size: 1.35rem; margin: 1.3rem 0 0.45rem; }
.vistoria h3 { font-size: 1rem; font-family: var(--sans); letter-spacing: 0; line-height: 1.35; }
.vistoria-erros {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.8rem;
    background: #fff;
    border: 1px solid #e7c6c1;
    color: var(--danger);
}
.vistoria-erros p { margin: 0 0 0.35rem; }
.vistoria-erros p:last-child { margin: 0; }
.vistoria-ficha {
    display: grid;
    gap: 0.55rem;
    margin: 0 0 1rem;
}
.vistoria-ficha div {
    display: grid;
    gap: 0.1rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--line);
}
.vistoria-ficha dt { color: var(--ink-soft); font-size: 0.82rem; }
.vistoria-ficha dd { margin: 0; }
.vistoria-item {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--paper);
    min-inline-size: 0;
}
.vistoria-item legend {
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 640;
    padding: 0 0.2rem;
}
.vistoria-opcoes { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.vistoria-opcoes label,
.vistoria-opcoes > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.6rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--ivory);
}
.vistoria-opcoes input { width: 1.15rem; height: 1.15rem; margin: 0; }
.vistoria-opcoes label:has(input:checked),
.vistoria-opcoes span.is-on {
    border-color: var(--brass);
    background: #efe4d4;
}
.vistoria-fotos { display: grid; gap: 0.8rem; }
.vistoria-fotos img,
.vistoria-foto-preview,
.vistoria-assinatura-pronta {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.7rem;
    border: 1px solid var(--line);
    background: #fff;
}
.vistoria-desenho {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    touch-action: manipulation;
    cursor: crosshair;
}
.vistoria-svg { display: block; width: 100%; height: auto; }
.vistoria-marca {
    position: absolute;
    z-index: 2;
    width: 1.85rem;
    height: 1.85rem;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font: 640 0.85rem var(--sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
button.vistoria-marca { cursor: pointer; }
.vistoria-marc-titulo { margin: 0.7rem 0 0.3rem; font-weight: 640; }
.vistoria-marcacoes { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.vistoria-marcacoes li { display: grid; grid-template-columns: 1.2rem 1fr; gap: 0.4rem; }
.vistoria-aviso { color: var(--danger); margin: 0.4rem 0 0; }
.vistoria-assinatura {
    width: 100%;
    height: 180px;
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    touch-action: none;
    cursor: crosshair;
}
@media (min-width: 800px) {
    .vistoria-ficha { grid-template-columns: 1fr 1fr; }
    .vistoria-fotos,
    .vistoria-marcacoes { grid-template-columns: 1fr 1fr; }
}

.gravacao-empresa { margin: 0 0 2rem; }
.gravacao-empresa > h2 { margin-bottom: 0.35rem; }
.gravacao-usuario { margin: 1rem 0 0; }
.gravacao-usuario h3 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.gravacao-lista { display: grid; gap: 0.6rem; }
.gravacao-links { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.switch-line { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.6rem 0 1rem; }
.switch-line input { width: 1.15rem; height: 1.15rem; }
.recording-text { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.9rem 1rem; }
@media (max-width: 700px) {
    .gravacao-links a { display: inline-block; padding: 0.35rem 0; }
}

body.motorista { padding-bottom: 6.5rem; }
.voz-motorista {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 160;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    align-items: center;
    padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
    background: #171512;
    color: #f6f1e7;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}
.voz-falar {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: #8a6432;
    color: #fff;
    font: 640 1.05rem/1 var(--sans);
    min-height: 3.2rem;
    min-width: 6.2rem;
    padding: 0.65rem 1.15rem;
    cursor: pointer;
}
.voz-falar[aria-pressed="true"] {
    background: #1d3b33;
    box-shadow: inset 0 0 0 2px #d7efe4;
}
.voz-barra {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
}
.voz-ouvido,
.voz-resultado { display: block; }
.voz-ouvido { color: rgba(246, 241, 231, 0.78); font-size: 0.92rem; }
.voz-resultado { font-weight: 640; font-size: 1rem; }
.voz-ajuda {
    flex-basis: 100%;
    margin: 0;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.8rem;
    max-height: 40vh;
    overflow: auto;
}
.voz-ajuda p { margin: 0; font-weight: 640; }
.voz-ajuda ul { margin: 0.35rem 0 0; padding-left: 1.15rem; }
.voz-ajuda li { margin: 0.15rem 0; }
body.navegacao .voz-motorista {
    top: calc(10.35rem + env(safe-area-inset-top));
    right: 0.7rem;
    bottom: auto;
    left: auto;
    z-index: 36;
    width: min(18rem, calc(100vw - 1.4rem));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}
body.nav-sem-barra .voz-motorista { top: calc(4.9rem + env(safe-area-inset-top)); }
body.navegacao .voz-falar,
body.navegacao .voz-barra,
body.navegacao .voz-ajuda { pointer-events: auto; }
body.navegacao .voz-falar {
    width: 4.4rem;
    min-width: 4.4rem;
    height: 4.4rem;
    min-height: 4.4rem;
    padding: 0.2rem;
    border-radius: 50%;
    font-size: 0.78rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
body.navegacao .voz-barra,
body.navegacao .voz-ajuda {
    width: 100%;
    padding: 0.45rem 0.6rem;
    background: rgba(23, 21, 18, 0.92);
    border-radius: 0.8rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}
[data-staff-sheet] .service-grid col[data-col="name"] { width: 9rem; }
[data-staff-sheet] .service-grid col[data-col="company"] { width: 8rem; }
[data-staff-sheet] .service-grid col[data-col="kind"] { width: 7rem; }
[data-staff-sheet] .service-grid col[data-col="profile"] { width: 11rem; }
[data-staff-sheet] .service-grid col[data-col="email"] { width: 12rem; }
[data-staff-sheet] .service-grid col[data-col="situation"] { width: 5.5rem; }
[data-staff-sheet] .service-grid col[data-col="log"] { width: 6.5rem; }
[data-staff-sheet] .service-grid col[data-col="comms"] { width: 8rem; }
[data-staff-sheet] .service-grid col[data-col="senha"] { width: 13rem; }
[data-staff-sheet] .service-grid thead th[data-col="senha"] { padding-right: 1.7rem; }
[data-staff-sheet] .service-scroll .service-grid td[data-col="log"],
[data-staff-sheet] .service-scroll .service-grid td[data-col="comms"],
[data-staff-sheet] .service-scroll .service-grid td[data-col="senha"] {
    overflow: visible;
    white-space: normal;
}
[data-staff-sheet] .service-grid .text-button {
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: 1.25;
    white-space: normal;
    text-align: left;
}
[data-staff-sheet] .service-grid .row-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}
[data-staff-sheet] .service-grid form { margin: 0; }
