:root {
    --ink: #24323a; --ink-soft: #4b5d68; --brand: #356c73; --brand-dark: #28575d;
    --paper: #fff; --muted: #6b7b86; --line: #dce4e7; --line-strong: #c7d3d8;
    --bg: #f4f6f5; --soft: #edf3f2; --ok: #2f6f58; --warn: #9a671f; --bad: #a54c48;
    --shadow: 0 1px 2px rgba(31,49,55,.05), 0 8px 24px rgba(31,49,55,.04);
}
* { box-sizing: border-box; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 50; transform: translateY(-180%); padding: 9px 12px; border-radius: 7px; background: #fff; color: var(--brand-dark); box-shadow: var(--shadow); font-weight: 700; text-decoration: none; }
.skip-link:focus { transform: translateY(0); outline: 3px solid rgba(53,108,115,.42); outline-offset: 2px; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline: 3px solid rgba(53,108,115,.42); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
body { margin: 0; padding-bottom: 72px; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.shell { display: grid; grid-template-columns: 232px minmax(0,1fr); min-height: 100vh; }
.side { padding: 24px 12px; background: #243d47; color: #dce8e9; }
.brand { margin: 0 10px 26px; color: #fff; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.side a { display: block; min-height: 20px; margin: 1px 0; padding: 7px 11px; border-radius: 8px; color: #dce8e9; text-decoration: none; transition: background .15s ease,color .15s ease; }
.side a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side a.active { background: #426f75; color: #fff; font-weight: 650; }
.nav-group { margin: 0 0 13px; }
.nav-group h2 { margin: 0 10px 5px; color: #91b6ba; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.entry-field { display:grid; gap:4px; min-width:0; }
.entry-field[hidden] { display:none !important; }
.entry-field > label, .entry-action > label { color:var(--muted); font-size:10px; font-weight:650; line-height:1.05; overflow-wrap:anywhere; text-align:left; }
.entry-action { display:grid; gap:4px; align-self:end; }
.main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px clamp(20px,4vw,48px) 56px; }
h1 { margin: 0 0 4px; font-size: clamp(24px,3vw,30px); line-height: 1.2; letter-spacing: -.03em; }
h2 { margin: 0 0 14px; font-size: 17px; line-height: 1.3; } h3 { margin: 0 0 10px; font-size: 15px; }
.sub { max-width: 760px; margin: 0 0 24px; color: var(--muted); }.muted { color: var(--muted); } small.muted { display: block; margin-top: 5px; font-size: 12px; }
.cards { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)); gap: 12px; margin: 20px 0 24px; }
.card,.box { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.card { min-height: 104px; padding: 16px 17px; }.card small { color: var(--muted); font-size: 12px; font-weight: 600; }.card b { display: block; margin-top: 7px; color: var(--ink); font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.box { padding: clamp(17px,2vw,23px); }.box + .box { margin-top: 16px; }.box > .box { margin-top: 16px; background: #fbfcfc; box-shadow: none; }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }.three { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }.actions form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.discount-editor { display: flex; align-items: end; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }.discount-editor > div { flex: 1; }.discount-editor input { max-width: 180px; }
.form-row { margin: 0 0 14px; } label { display: block; margin: 0 0 6px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.mechanic-picker{margin:0;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--soft)}.mechanic-picker legend{padding:0 4px;color:var(--ink-soft);font-size:12px;font-weight:700}.mechanic-tools{display:grid;grid-template-columns:minmax(130px,1fr) auto auto;gap:8px;align-items:end;margin-bottom:8px}.mechanic-tools label{margin:0}.mechanic-tools input{min-height:35px;height:35px}.check-option{display:flex;align-items:center;gap:8px;margin:5px 0;color:var(--ink);font-size:14px;font-weight:500}.check-option input{width:auto;min-height:0;margin:0}.select-all-mechanics{min-height:35px;padding:7px 10px;font-size:12px;white-space:nowrap}.mechanic-tools .muted{align-self:center;font-size:12px;white-space:nowrap}
input,select,textarea,button { font: inherit; } input,select,textarea { width: 100%; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; transition: border-color .15s ease,box-shadow .15s ease; }
input:focus,select:focus,textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(53,108,115,.13); } input[readonly] { color: var(--ink-soft); background: #f2f5f5; } textarea { min-height: 96px; resize: vertical; }
button,.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 13px; border: 1px solid transparent; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 650; line-height: 1; text-decoration: none; cursor: pointer; transition: background .15s ease,transform .15s ease; }
button:hover,.btn:hover { background: var(--brand-dark); } button:active,.btn:active { transform: translateY(1px); }.btn.light { border-color: var(--line-strong); background: #fff; color: var(--brand-dark); }.btn.light:hover { background: var(--soft); }.btn.warn { background: #8d6225; }.btn.warn:hover { background: #76501d; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }table { width: 100%; border-collapse: collapse; background: #fff; }th,td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }tr:last-child td { border-bottom: 0; }th { color: var(--muted); background: #fafcfc; font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }tbody tr:hover { background: #fafcfc; }td a { color: var(--brand-dark); font-weight: 650; text-decoration: none; }td a:hover { text-decoration: underline; }.right { text-align: right; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: #e8edef; color: var(--ink-soft); font-size: 11px; font-weight: 700; }.paid { background: #e4f1ea; color: var(--ok); }.partial { background: #f8eedb; color: var(--warn); }.pending { background: #f7e6e5; color: var(--bad); }.badge.quote{background:#fef3c7;color:#b45309;border:1px solid #fde68a}.badge.open{background:#e4f1ea;color:#166534}.badge.completed{background:#e0f2fe;color:#075985}.badge.reopened{background:#fef3c7;color:#92400e}.badge.reclosed{background:#ede9fe;color:#5b21b6}.badge.cancelled{background:#f1f5f9;color:#475569}.card-link{display:block;color:inherit;text-decoration:none}.card-link:hover{border-color:var(--brand);transform:translateY(-1px)}.result-summary{margin:0 0 10px}
.alert { margin: 0 0 18px; padding: 11px 13px; border: 1px solid; border-radius: 9px; font-weight: 600; }.alert.success { border-color: #b9d8c8; background: #edf7f1; color: var(--ok); }.alert.error { border-color: #e5c4c1; background: #fbf0ef; color: var(--bad); }
.session-bar{position:fixed;z-index:20;right:0;bottom:0;left:0;display:flex;align-items:center;gap:10px;min-height:66px;padding:9px 20px;background:#243d47;color:#dce8e9;font-size:12px;box-shadow:0 -1px 6px rgba(0,0,0,.14)}.session-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e7efd2;color:#356c73;font-size:12px;font-weight:750}.session-user{display:grid;min-width:0;gap:1px}.session-user strong{overflow:hidden;color:#fff;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.session-user small{max-width:180px;overflow:hidden;color:#c7d9d9;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.session-logout{display:grid;place-items:center;width:32px;height:32px;margin-left:6px;border-radius:6px;color:#dce8e9;font-size:23px;line-height:1;text-decoration:none}.session-logout:hover{background:rgba(255,255,255,.12);color:#fff}
.login { max-width: 420px; margin: 12vh auto; padding: 0 18px; }.login .box { padding: 28px; }.print-only { display: none; }
.login-brand { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.login-brand img { display:block; width:100%; max-width:260px; height:42px; object-fit:contain; object-position:left center; }
.login-brand span { flex:0 0 auto; color:var(--muted); font-size:11px; font-weight:800; }
.order-sheet{max-width:1080px;margin:0 auto;background:#fff;border:1px solid var(--line-strong);padding:18px}.order-head{display:flex;justify-content:space-between;gap:20px;padding:0 0 14px;border-bottom:2px solid var(--ink)}.order-company{display:flex;align-items:center;gap:14px}.order-company img{max-width:84px;max-height:62px;object-fit:contain}.order-company strong{font-size:20px;display:block}.order-company small{display:block;line-height:1.45}.order-number{text-align:right;display:grid;justify-items:end;gap:5px}.order-number b{font-size:28px}.order-block{border:1px solid var(--line-strong);margin-top:12px;padding:10px}.order-block h2{margin:-10px -10px 10px;padding:6px 10px;background:#e8edef;text-align:center;text-transform:uppercase;font-size:13px}.order-block p{margin:7px 0}.item-form{display:grid;grid-template-columns:minmax(180px,2fr) minmax(100px,1fr) minmax(120px,1fr) auto;gap:8px;margin-top:10px}.item-form input,.item-form select{min-width:0}.totals p{margin-left:auto;max-width:330px;text-align:right;line-height:1.8}.discount-editor{display:flex;justify-content:flex-end;gap:8px;align-items:end}.discount-editor input{width:120px}@media(max-width:720px){.order-head{display:block}.order-number{justify-items:start;text-align:left;margin-top:12px}.item-form{grid-template-columns:1fr}.discount-editor{display:block}.order-sheet{padding:10px}}@media print{.side,.no-print,.actions,button{display:none!important}.main{padding:0}.order-sheet{border:0;max-width:none;padding:0;font-size:10px}.order-head{padding-bottom:7px}.order-block{margin-top:6px;padding:6px;break-inside:avoid}.order-block h2{margin:-6px -6px 6px;padding:3px 6px;font-size:10px}th,td{padding:4px 5px}.order-number b{font-size:20px}}
.tenant-logo{max-width:58px;max-height:42px;object-fit:contain}
.icon-button{min-width:30px!important;width:30px;height:30px;padding:0!important;border:1px solid var(--line-strong)!important;background:#fff!important;color:var(--brand-dark)!important;font-size:18px;line-height:1;cursor:pointer}.icon-button:hover{background:var(--soft)!important}.item-add{margin-top:12px}.item-add>.btn{margin-bottom:8px}.order-sheet .item-form{display:grid!important;grid-template-columns:minmax(230px,2.2fr) 92px 125px max-content!important;gap:8px;align-items:end}.order-sheet .item-form:has([data-service-other]:not([hidden])){grid-template-columns:minmax(160px,1.3fr) minmax(160px,1.3fr) 92px 125px max-content!important}.item-form[hidden]{display:none!important}.item-form select,.item-form input{height:38px}.item-form button{height:38px;padding:0 12px!important;font-size:14px;white-space:nowrap}.order-block .three{align-items:end}.order-block #payment-plan{display:grid;gap:10px}.order-block #payment-plan input[type=radio]{width:auto;margin-left:5px}.order-block #payment-plan label{white-space:nowrap}
.section-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:12px}.section-heading h2{margin-bottom:2px}.section-heading p{margin:0;font-size:12px}.order-entry-rows{display:grid;gap:8px}.order-entry-row{display:grid;grid-template-columns:minmax(240px,2.4fr) 90px 130px 30px;gap:8px;align-items:end}.order-entry-row:has([data-service-description]:not([hidden])){grid-template-columns:minmax(180px,1.4fr) minmax(180px,1.4fr) 90px 130px 30px}.order-entry-row input,.order-entry-row select{min-width:0;height:35px}.order-entry-row button{height:35px}.payment-enable{display:inline-flex;align-items:center;gap:7px;margin-bottom:12px}.payment-enable input{width:auto;min-height:0}.payment-line{display:flex;align-items:end;flex-wrap:wrap;gap:10px;padding:10px;background:var(--soft);border:1px solid var(--line);border-radius:8px}.payment-line label{display:inline-flex;align-items:center;gap:5px;margin:0;white-space:nowrap}.payment-line label:has(select){display:grid;gap:4px;min-width:150px}.payment-line input[type=radio]{width:auto;min-height:0;margin:0}.payment-line select{height:38px;min-width:130px}.payment-installments{display:grid;gap:7px;margin-top:10px}.payment-installment{display:grid;grid-template-columns:42px minmax(150px,1fr) minmax(130px,1fr);align-items:end;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:8px}.payment-installment b{padding-bottom:10px}.payment-installment label{margin:0}.order-total{text-align:right;font-size:17px}.order-total b{font-size:22px}.order-create .box{margin-bottom:16px}
.order-sheet .discount-editor{display:grid;grid-template-columns:minmax(170px,220px) max-content;justify-content:end;align-items:end;gap:8px}.order-sheet .discount-editor label{display:grid;gap:4px;margin:0}.order-sheet .discount-editor input{width:100%;max-width:none}.order-sheet #payment-count-label[hidden]{display:none!important}.order-sheet .payment-installment{grid-template-columns:95px minmax(0,1fr) minmax(0,1fr)}.order-sheet .payment-installment label{min-width:0}.order-sheet .payment-installment input{min-width:0}.payment-save{min-height:32px!important;padding:6px 9px!important;font-size:12px!important}.order-close-actions{justify-content:center}.order-close-actions form{justify-content:center}
.payment-line{gap:8px;padding:8px}.payment-line label{font-size:12px}.payment-line label:has(select){min-width:128px}#payment-count-label[hidden]{display:none!important}.payment-line select{min-width:118px;height:34px;min-height:34px;padding:5px 8px}.payment-installments{max-width:650px;gap:6px}.payment-installment,.order-sheet .payment-installment{grid-template-columns:88px minmax(190px,250px) minmax(135px,180px);justify-content:start;align-items:center;gap:10px;padding:7px 10px}.payment-installment b{padding:0;font-size:12px;line-height:34px;white-space:nowrap}.payment-field{display:grid;grid-template-columns:auto minmax(105px,1fr);align-items:center;gap:6px;min-width:0}.payment-field span{color:var(--ink-soft);font-size:11px;font-weight:700;white-space:nowrap}.payment-field input{min-width:0;min-height:34px;height:34px;padding:5px 8px;font-size:13px}
@media (max-width:960px) { .shell { grid-template-columns: 200px minmax(0,1fr); }.cards { grid-template-columns: repeat(2,minmax(0,1fr)); }.three { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) { body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }.shell { display: block; }.side { display: flex; gap: 4px; align-items: center; padding: 10px; padding-top: calc(10px + env(safe-area-inset-top)); overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }.brand { flex: 0 0 auto; margin: 0 7px 0 0; }.side a { flex: 0 0 auto; min-height: 20px; }.main { padding: 22px 16px 40px; }.cards,.grid,.three { grid-template-columns: 1fr; }.card { min-height: auto; }th,td { padding: 10px; } }
@media (max-width:720px){.section-heading{display:block}.section-heading .btn{margin-top:8px}.order-entry-row,.order-entry-row:has([data-service-description]:not([hidden])),.payment-installment,.order-sheet .payment-installment{grid-template-columns:1fr}.payment-installment b{padding:0}.payment-field{grid-template-columns:1fr;gap:2px}.payment-line{align-items:start;flex-direction:column}.payment-line label:has(select){width:100%}.order-total{text-align:left}.order-sheet .discount-editor{grid-template-columns:1fr;justify-content:stretch}.order-sheet .discount-editor button{width:100%}}
@media (max-width:720px){.order-sheet .item-form,.order-sheet .item-form:has([data-service-other]:not([hidden])){grid-template-columns:1fr!important}}
@media print { @page { margin: 14mm; }body { background: #fff; color: #222; font-size: 11pt; }.side,.actions,.no-print,form,script { display: none !important; }.shell { display: block; min-height: 0; }.main { max-width: none; margin: 0; padding: 0; }.print-only { display: block; margin-bottom: 12px; }h1 { font-size: 20pt; }h2 { margin-top: 16px; font-size: 13pt; }.sub { margin-bottom: 14px; }.grid { gap: 12px; }.box,.card { border: 1px solid #d7d7d7; border-radius: 4px; box-shadow: none; }.box { padding: 12px; }.cards { grid-template-columns: repeat(4,1fr); gap: 7px; margin: 12px 0; }.card { min-height: auto; padding: 9px; }.card small { color: #666; font-size: 9pt; font-weight: 500; }.card b { margin-top: 3px; font-size: 11pt; font-weight: 500; }.print-only ~ .cards .card:nth-child(3) b { font-weight: 750; }.table-wrap { border-radius: 0; }th,td { padding: 7px 8px; font-size: 9.5pt; }th { color: #555; background: #f5f5f5; }tr { break-inside: avoid; } }

.smtp-settings-form { align-items: start; }
.smtp-settings-form .form-row { min-width: 0; }
.smtp-settings-form input[type="number"] { max-width: 132px; }
.smtp-settings-actions { display: flex; justify-content: flex-end; align-items: end; margin-top: 4px; }
@media (max-width:720px) { .smtp-settings-actions { justify-content: stretch; } .smtp-settings-actions button { width: 100%; } }
.payment-save-row{display:flex;justify-content:flex-end;margin-top:12px}.order-close-actions{margin-top:26px!important;padding-top:6px}.password-reset-form{display:flex;align-items:center;gap:8px;min-width:250px}.password-reset-form input{flex:1;min-width:120px}.password-reset-form .btn{flex:0 0 auto}.report-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:end}.report-filters .form-row{margin:0}.report-payment-status{grid-column:1/-1;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--soft)}.report-payment-status legend{padding:0 4px;font-size:12px;font-weight:700;color:var(--ink-soft)}.report-status-options{display:flex;flex-wrap:wrap;gap:8px}.report-status-options label{display:inline-flex;align-items:center;gap:6px;margin:0;padding:6px 9px;border:1px solid var(--line);border-radius:6px;background:#fff;font-size:13px}.report-status-options input{width:auto;min-height:0;margin:0}.report-filter-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;margin-top:2px}.closing-warning{color:#9a5a00;font-size:12px;font-weight:700}.closing-delete{display:inline;margin-left:8px}.closing-delete button{font-size:12px;padding:5px 8px!important}@media (max-width:720px){.payment-save-row,.report-filter-actions{justify-content:stretch}.payment-save-row .btn,.report-filter-actions .btn{width:100%}.password-reset-form{min-width:220px}.report-filters{grid-template-columns:1fr}.report-payment-status,.report-filter-actions{grid-column:auto}}
.closing-select-all{display:inline-flex;align-items:center;gap:8px;margin:4px 0 10px;font-size:13px;font-weight:650}.closing-select-all input{width:auto;min-height:0;margin:0}.closing-select-all input:disabled+span{color:var(--muted)}
.narrow{max-width:640px}.form-stack{display:grid;gap:12px}
.login-help{margin:14px 0 0;text-align:center;font-size:13px}
@media (max-width:720px){.session-bar{padding-right:16px;padding-left:16px;padding-bottom:calc(9px + env(safe-area-inset-bottom));}}
@media (max-width:720px) { .nav-group { display:flex; align-items:center; gap:4px; margin:0; } .nav-group h2 { display:none; } }
/* OS: uma linha legível em telas largas; os campos longos cedem espaço aos valores. */
.order-entry-row { grid-template-columns:minmax(140px,260px) minmax(40px,120px) minmax(40px,120px) minmax(40px,100px) 40px; align-items:end; justify-content:start; }
.order-entry-row:has([data-service-description]:not([hidden])) { grid-template-columns:minmax(140px,220px) minmax(140px,220px) minmax(40px,120px) minmax(40px,120px) minmax(40px,100px) 40px; }
.order-entry-row:has([data-part-description]) { grid-template-columns:minmax(140px,240px) minmax(140px,220px) minmax(40px,120px) minmax(112px,140px) minmax(100px,120px) 40px; }
.order-entry-row:has([data-part-cost]) { grid-template-columns:minmax(140px,220px) minmax(140px,220px) minmax(40px,110px) minmax(40px,110px) minmax(40px,110px) minmax(40px,100px) 40px; }
@media (max-width:720px) { .order-entry-row,.order-entry-row:has([data-service-description]:not([hidden])),.order-entry-row:has([data-part-description]),.order-entry-row:has([data-part-cost]) { grid-template-columns:1fr; } .entry-action button { width:100%; } }

/* Design system v1.83: estados previsíveis, leitura confortável e controles consistentes. */
:root {
    --focus-ring: 0 0 0 3px rgba(53,108,115,.18);
    --radius-control: 8px;
    --radius-surface: 12px;
    --space-section: 16px;
}
button:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .58; transform: none !important; }
button:focus-visible, .btn:focus-visible, summary:focus-visible { box-shadow: var(--focus-ring); }
input::placeholder, textarea::placeholder { color: #84939b; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(165,76,72,.12); }
details { border-radius: var(--radius-control); }
details > summary { cursor: pointer; color: var(--brand-dark); font-weight: 650; }
details > summary.btn { list-style: none; }
details > summary.btn::-webkit-details-marker { display: none; }
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.empty-state { padding: 24px 16px; color: var(--muted); text-align: center; }
.onboarding-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.onboarding-step { display:grid; gap:4px; min-height:76px; padding:12px; border:1px solid var(--line); border-radius:var(--radius-control); background:#fff; color:var(--ink); text-decoration:none; }
.onboarding-step:hover { border-color:var(--brand); background:var(--soft); }
.onboarding-step b { color:var(--brand-dark); font-size:13px; }
.onboarding-step span { color:var(--muted); font-size:12px; }
.onboarding-step.done { border-color:#b9d8c8; background:#f5fbf7; }
.onboarding-step.done b::after { content:' ✓'; color:var(--ok); }
.readiness-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.readiness-item { display:flex; align-items:center; gap:9px; min-height:62px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius-control); color:var(--ink); text-decoration:none; }
.readiness-item:hover { border-color:var(--brand); background:var(--soft); }
.readiness-item > span:last-child { display:grid; gap:2px; }
.readiness-item b { font-size:12px; }
.readiness-item small { color:var(--muted); font-size:11px; }
.readiness-item.done { border-color:#b9d8c8; background:#f5fbf7; }
.readiness-item.todo { border-color:#e6d3aa; background:#fffaf0; }
.readiness-icon { display:grid; place-items:center; width:25px; height:25px; border-radius:50%; background:var(--soft); color:var(--brand-dark); font-weight:800; }
.readiness-item.done .readiness-icon { background:#dcefe3; color:var(--ok); }
.readiness-item.todo .readiness-icon { background:#f9e8bd; color:var(--warn); }
.app-version { margin-left: auto; color: #a9c5c7; font-size: 10px; }
@media (max-width:720px) {
    .app-version { display: none; }
    .session-user small { max-width: 140px; }
    .actions > .btn, .actions > button { min-height: 42px; }
    .onboarding-steps { grid-template-columns:1fr; }
    .readiness-list { grid-template-columns:1fr; }
}

/* Design system v2.81 — navegação consolidada e espaçamento transversal. */
.nav-group:first-child > summary { color:#d6ebf8; font-weight:800; }
.nav-group:first-child[open] > summary { background:rgba(135,190,222,.14); border-color:rgba(174,215,237,.18); }
.main > .dashboard-filter + .dashboard-metrics,
.main > .dashboard-metrics + .dashboard-grid,
.main > .dashboard-grid + .box,
.main > .box + .dashboard-metrics,
.main > .box + .box,
.main > .grid + .box,
.main > .cards + .grid,
.main > .cards + .box { margin-top:20px !important; }
.main > .box,
.main > .grid,
.main > .cards,
.main > .dashboard-metrics,
.main > .dashboard-grid { min-width:0; }
.dashboard-metrics { align-items:stretch; }
.dashboard-metrics > .card { min-width:0; }
.cards { grid-template-columns:repeat(4,minmax(0,1fr)); align-items:stretch; }
@media (max-width:1100px) {
    .cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px) {
    .main > .dashboard-filter + .dashboard-metrics,
    .main > .dashboard-metrics + .dashboard-grid,
    .main > .dashboard-grid + .box,
    .main > .box + .dashboard-metrics,
    .main > .box + .box,
    .main > .grid + .box,
    .main > .cards + .grid,
    .main > .cards + .box { margin-top:16px !important; }
    .cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:460px) {
    .cards { grid-template-columns:1fr; }
}
.report-subnav { display:flex; flex-wrap:wrap; gap:6px; margin-top:-4px; margin-bottom:0; padding:4px; border:1px solid var(--line); border-radius:10px; background:#f7fafc; }
.report-subnav a { display:inline-flex; align-items:center; min-height:30px; padding:6px 10px; border-radius:7px; color:var(--ink-soft); font-size:11px; font-weight:700; text-decoration:none; }
.report-subnav a:hover { background:#eaf2f8; color:var(--brand-dark); }
.report-subnav a.active { background:var(--brand); color:#fff; }
.report-catalog-panel { margin-top:0 !important; }
.report-catalog-panel .table-wrap { font-size:12px; }
.report-catalog-panel th { white-space:nowrap; }
@media (max-width:720px) { .report-subnav { overflow-x:auto; flex-wrap:nowrap; } .report-subnav a { flex:0 0 auto; } }
/* Design system v2.17: tema claro e shell operacional */
:root {
    --bg: #ffffff;
    --paper: #ffffff;
    --soft: #f6f8f9;
    --line: #dfe7e9;
    --line-strong: #c9d6da;
    --ink: #20333a;
    --ink-soft: #4f626b;
    --muted: #70818a;
    --brand: #355f6a;
    --brand-dark: #284c57;
    --menu-green: #2f7655;
    --menu-green-dark: #245d43;
    --shadow: 0 1px 2px rgba(31,49,55,.04);
}
body { background: var(--bg); color: var(--ink); }
.shell { background: #fff; }
.side { position: sticky; top: 0; align-self: start; min-height: 100vh; padding: 24px 12px; background: var(--menu-green); color: #e9f4ed; }
.brand { margin-bottom: 28px; color: #fff; }
.side a { color: #e2f0e7; }
.side a:hover { background: rgba(255,255,255,.12); color: #fff; }
.side a.active { background: #4a956d; color: #fff; box-shadow: inset 3px 0 #d8ec9a; }
.nav-group h2 { color: #c7e0c9; }
.main { max-width: 1360px; padding: 24px clamp(20px,4vw,52px) 54px; }
.app-topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:42px; margin-bottom:30px; padding-bottom:15px; border-bottom:1px solid var(--line); }
.app-context { display:grid; gap:1px; }
.app-context strong { font-size:13px; color:var(--ink); }
.app-context span { color:var(--muted); font-size:11px; }
.app-user { display:flex; align-items:center; gap:9px; color:var(--ink-soft); font-size:12px; }
.app-avatar { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--menu-green); color:#fff; font-size:11px; font-weight:700; }
.app-user form { margin:0; }
.app-logout { min-height:32px; padding:6px 9px; border:1px solid var(--line-strong); border-radius:7px; background:#fff; color:var(--brand-dark); font-size:11px; font-weight:700; }
.app-logout:hover { background:var(--soft); }
.card,.box { border-color:var(--line); border-radius:12px; box-shadow:var(--shadow); }
.card:hover { border-color:#b8c9cd; }
.btn { background:var(--brand); color:#fff; }
button:hover,.btn:hover { background:var(--brand-dark); }
.btn.light { color:var(--brand-dark); }
.dashboard-head { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:22px; }
.dashboard-actions { display:flex; flex-wrap:wrap; gap:8px; }
.eyebrow { display:block; margin-bottom:5px; color:var(--brand-dark); font-size:10px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.dashboard-head .sub { margin-bottom:0; }
.dashboard-filter { padding:14px 17px; }
.dashboard-filter .report-filters { grid-template-columns:minmax(190px,260px) auto; justify-content:space-between; }
.dashboard-filter .report-filter-actions { grid-column:auto; align-items:end; }
.dashboard-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.dashboard-metrics .card { min-height:116px; }
.dashboard-metrics .card span { display:block; margin-top:7px; color:var(--muted); font-size:11px; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.8fr); gap:16px; align-items:start; }
.section-heading { margin-bottom:14px; }
.section-heading p { color:var(--muted); }
.text-link { color:var(--brand-dark); font-size:12px; font-weight:700; text-decoration:none; }
.text-link:hover { text-decoration:underline; }
.priority-list { display:grid; }
.priority-row { display:grid; grid-template-columns:58px minmax(0,1fr) auto; align-items:center; gap:11px; min-width:0; padding:12px 0; border-top:1px solid var(--line); color:inherit; text-decoration:none; }
.priority-row:first-child { padding-top:0; border-top:0; }
.priority-row:last-child { padding-bottom:0; }
.priority-number { color:var(--brand-dark); font-size:12px; font-weight:800; }
.priority-main { min-width:0; }
.priority-main strong,.priority-main small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.priority-main strong { font-size:13px; }
.priority-main small { margin-top:3px; color:var(--muted); font-size:11px; }
.priority-row:hover .priority-main strong { color:var(--brand-dark); }
.finance-summary { display:grid; gap:12px; margin:4px 0 18px; }
.finance-summary > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:10px; border-bottom:1px solid var(--line); }
.finance-summary span { color:var(--muted); font-size:12px; }
.finance-summary strong { font-size:16px; }
.attention-list { display:grid; gap:7px; margin-bottom:16px; }
.attention-list a { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 10px; border-radius:8px; background:var(--soft); color:var(--ink-soft); font-size:12px; text-decoration:none; }
.attention-list a:hover { background:#edf2f3; }
.attention-list b { color:var(--brand-dark); }
.dashboard-note { padding:11px 12px; border-left:3px solid var(--brand); background:var(--soft); color:var(--muted); font-size:11px; line-height:1.45; }
.operational-notices .alert { margin-bottom:8px; }
.operational-notices .alert:last-child { margin-bottom:0; }
.session-bar { display:none; }
@media (max-width:960px) {
    .side { min-height:auto; position:static; }
    .dashboard-grid { grid-template-columns:1fr; }
    .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px) {
    body { padding-bottom:0; }
    .side { padding:10px 12px; }
    .main { padding:17px 16px 36px; }
    .app-topbar { align-items:flex-start; margin-bottom:22px; }
    .app-user > span:first-child { display:none; }
    .app-logout { min-height:30px; }
    .dashboard-head { display:block; }
    .dashboard-actions { margin-top:14px; }
    .dashboard-actions .btn { flex:1 1 140px; }
    .dashboard-filter .report-filters { grid-template-columns:1fr; }
    .dashboard-filter .report-filter-actions { justify-content:stretch; }
    .dashboard-filter .report-filter-actions .btn,.dashboard-filter .report-filter-actions button { flex:1; }
    .dashboard-metrics { grid-template-columns:1fr 1fr; gap:9px; }
    .dashboard-metrics .card { min-height:98px; padding:13px; }
    .dashboard-metrics .card b { font-size:19px; }
    .priority-row { grid-template-columns:48px minmax(0,1fr); }
    .priority-row .badge { grid-column:2; justify-self:start; }
}
@media (max-width:420px) {
    .dashboard-metrics { grid-template-columns:1fr; }
    .app-context strong { font-size:12px; }
}
@media print {
    .app-topbar { display:none; }
}

/* Design system v2.44 — menu visual, contrastado e orientado por ícones */
.side { background:linear-gradient(180deg,#123b59 0%,#0e3049 100%); color:#e9f4fb; }
.side-brand { min-height:76px; padding:16px 16px 14px; border-bottom-color:rgba(211,235,249,.15); }
.brand-logo-slot { width:38px; height:38px; flex-basis:38px; border:1px solid rgba(220,241,252,.3); border-radius:11px; background:rgba(255,255,255,.11); }
.brand-copy strong { color:#fff; font-size:16px; }
.brand-copy span { color:#b9d8eb; }
.tenant-chip { margin:14px 14px 10px; border-color:rgba(164,212,239,.25); background:rgba(70,130,180,.18); }
.tenant-chip small { color:#a9cee3; }
.tenant-chip span { color:#bad6e6; }
.nav-scroll { padding:8px 12px 18px; scrollbar-color:rgba(174,215,237,.35) transparent; }
.nav-group { margin:0 0 10px; }
.nav-group summary { margin:0 6px 4px; padding:7px 5px; color:#9fc4da; font-size:10px; letter-spacing:.11em; }
.nav-group summary:hover { color:#e4f3fb; }
.nav-chevron { color:#9fc4da; }
.nav-items { gap:3px; }
.side a { display:flex; align-items:center; gap:9px; min-height:36px; margin:0; padding:7px 10px; border:1px solid transparent; border-radius:9px; color:#d6e8f2; font-size:13px; }
.side a:hover { border-color:rgba(174,215,237,.18); background:rgba(89,164,214,.18); color:#fff; }
.side a.active { border-color:rgba(188,226,247,.22); background:#4682b4; box-shadow:0 5px 14px rgba(0,0,0,.16), inset 3px 0 #d7edf9; color:#fff; font-weight:750; }
.nav-icon { display:grid; place-items:center; flex:0 0 21px; width:21px; height:21px; border-radius:6px; color:#8fb9d3; font-size:14px; line-height:1; }
.side a:hover .nav-icon,.side a.active .nav-icon { color:#fff; }
.nav-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-footer { padding:13px 14px; border-top-color:rgba(211,235,249,.15); background:rgba(5,28,46,.26); }
.side-avatar { width:34px; height:34px; flex-basis:34px; border-radius:10px; background:#75acd2; color:#092d49; }
.side-user small { color:#b9d6e5; }
.side-logout { border:1px solid rgba(210,236,249,.18); border-radius:8px; color:#b9d6e5; }
.side-logout:hover { background:rgba(89,164,214,.22); color:#fff; }
@media (max-width:720px) {
    .side-brand { min-height:62px; padding:11px 12px; }
    .tenant-chip { margin:8px 12px; }
    .nav-scroll { gap:6px; padding:6px 10px 10px; }
    .nav-group { margin:0; }
    .nav-items { gap:4px; }
    .side a { min-height:34px; padding:7px 10px; }
    .nav-icon { flex-basis:18px; width:18px; font-size:13px; }
}

/* v2.18 — padrão operacional para filtros, listas e tabelas */
.page-head {
    display:flex; align-items:flex-start; justify-content:space-between; gap:20px;
    margin:4px 0 22px;
}
.page-head h1 { margin:3px 0 5px; }
.page-head .sub { margin:0; max-width:720px; }
.page-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.page-actions .btn { white-space:nowrap; }
.filter-panel { background:#fbfcfd; border:1px solid #dfe7ec; }
.filter-panel h2 { font-size:16px; margin:0 0 3px; }
.filter-panel .section-heading { margin-bottom:14px; }
.filter-panel form { align-items:end; }
.report-filter-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.filter-inline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:0 0 14px; }
.filter-inline input { flex:1 1 240px; min-width:180px; }
.table-section { overflow:hidden; }
.table-section > .section-heading { margin-bottom:12px; }
.table-section .result-summary { margin:2px 0 0; }
.table-section table th { white-space:nowrap; }
.empty-cell { padding:24px 14px !important; text-align:center; }
.box > h2:first-child { margin-top:0; }
.main > h1 + .sub { margin-top:-14px; }
.main > h1 + .sub + .actions { margin-top:16px; }
.main > .grid > .box, .main > .box { min-width:0; }
.form-row > label { margin-bottom:6px; }
.form-row small.muted { display:block; margin-top:5px; }
@media (max-width:720px) {
    .page-head { display:block; margin-bottom:18px; }
    .page-actions { margin-top:14px; }
    .page-actions .btn { flex:1 1 150px; }
    .filter-inline { align-items:stretch; }
    .filter-inline input, .filter-inline button, .filter-inline .btn { flex:1 1 100%; width:100%; }
    .report-filter-actions { align-items:stretch; }
    .report-filter-actions > * { flex:1 1 130px; text-align:center; }
}

/* Design system v2.20 — Steel Blue em todas as superfícies */
:root {
    --menu-blue: #4682B4;
    --menu-blue-dark: #2f638e;
    --brand: #4682B4;
    --brand-dark: #2f638e;
    --menu-green: var(--menu-blue);
    --menu-green-dark: var(--menu-blue-dark);
    --soft: #edf5fa;
    --line: #dbe6ee;
    --line-strong: #c4d5e1;
    --ink: #193247;
    --ink-soft: #4e6575;
    --muted: #6c7f8e;
    --focus-ring: 0 0 0 3px rgba(70,130,180,.24);
}
body { background:#fff; color:var(--ink); }
.side { background:var(--menu-blue); color:#edf7fd; }
.side a { color:#edf7fd; }
.side a:hover { background:rgba(255,255,255,.14); color:#fff; }
.side a.active { background:#5d96c1; color:#fff; box-shadow:inset 3px 0 #d6ebf8; }
.nav-group h2 { color:#d7ebf8; }
.skip-link { color:var(--brand-dark); }
.skip-link:focus, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline-color:rgba(70,130,180,.48); }
input:focus, select:focus, textarea:focus { border-color:var(--brand); box-shadow:0 0 0 3px rgba(70,130,180,.14); }
button, .btn { background:var(--brand); color:#fff; }
button:hover, .btn:hover { background:var(--brand-dark); }
.btn.light { color:var(--brand-dark); border-color:var(--line-strong); background:#fff; }
.btn.light:hover { background:var(--soft); }
.card-link:hover, .onboarding-step:hover, .readiness-item:hover { border-color:var(--brand); }
td a, .text-link, .eyebrow, .priority-number, .priority-row:hover .priority-main strong { color:var(--brand-dark); }
.app-avatar { background:var(--menu-blue); color:#fff; }
.app-logout { color:var(--brand-dark); }
.app-logout:hover { background:var(--soft); }
.badge.open, .paid { background:#e6f1f8; color:var(--brand-dark); }
.badge.completed { background:#e6f1f8; color:#2f638e; }
.onboarding-step.done, .readiness-item.done { border-color:#b9d4e7; background:#f2f8fc; }
.onboarding-step.done b::after { color:var(--brand-dark); }
.readiness-item.done .readiness-icon { background:#dcecf7; color:var(--brand-dark); }
.readiness-icon { color:var(--brand-dark); }
.order-block h2, th { background:#f2f7fa; }
.order-head { border-bottom-color:var(--brand-dark); }

/* Design system v2.21 — espaçamento e alinhamento transversal */
:root {
    --menu-blue: #4682B4;
    --menu-blue-dark: #2f638e;
    --space-page: 22px;
    --space-panel: 20px;
}
.side { background:#4682B4; }
.main { padding-top:26px; }
.main > h1:first-child { margin-top:0; }
.main > h1 + .sub { margin-bottom:22px; }
.main > .actions:first-of-type { margin-top:0; margin-bottom:20px; }
.main > .cards { margin-top:20px; margin-bottom:22px; }
.main > .grid { margin-top:20px; margin-bottom:20px; }
.main > .box { margin-top:20px; margin-bottom:0; }
.main > .box + .box { margin-top:20px; }
.main > .grid + .box { margin-top:20px; }
.main > .cards + .grid, .main > .cards + .box { margin-top:20px; }
.grid { gap:20px; align-items:stretch; }
.grid > .box { height:100%; }
.three { gap:14px; }
.box { padding:clamp(19px,2.2vw,26px); }
.box > h2 { margin-bottom:16px; }
.box > form + .table-wrap, .box > form + p + .table-wrap, .box > .actions + .table-wrap { margin-top:14px; }
.box > .table-wrap + .actions, .box > .table-wrap + nav { margin-top:16px; }
.section-heading { align-items:center; margin-bottom:16px; }
.section-heading h2 { margin-bottom:3px; }
.form-row { margin-bottom:16px; }
.form-row:last-child { margin-bottom:0; }
.actions { margin:18px 0; }
.actions:last-child { margin-bottom:0; }
.cards { gap:14px; }
.card { min-height:112px; padding:17px 18px; }
.table-wrap { margin-top:2px; }
table { min-width:640px; }
.table-section table { min-width:0; }
th,td { padding:12px 13px; }
.filter-panel { margin-bottom:20px; }
.filter-inline { margin-bottom:16px; }
.report-filters { gap:16px; }
.report-filter-actions { margin-top:4px; }
.dashboard-head, .page-head { margin-bottom:24px; }
.dashboard-filter { margin-bottom:20px; }
.dashboard-metrics { gap:14px; margin-bottom:20px; }
.dashboard-grid { gap:20px; }
.dashboard-grid > .box { height:100%; }
.attention-list { margin-top:16px; }
.empty-state { min-height:100px; display:grid; place-items:center; gap:10px; }
.alert { margin:0 0 20px; }
hr { margin:22px 0; border:0; border-top:1px solid var(--line); }
@media (max-width:960px) {
    .main { padding-right:28px; padding-left:28px; }
    .grid { gap:16px; }
    .dashboard-grid { gap:16px; }
}
@media (max-width:720px) {
    .main { padding:20px 16px 38px; }
    .main > .grid, .main > .cards, .main > .box { margin-top:16px; }
    .main > .box + .box, .main > .grid + .box { margin-top:16px; }
    .box { padding:18px 16px; }
    .grid, .three { gap:14px; }
    .cards { gap:10px; }
    .card { min-height:98px; padding:14px; }
    .section-heading { align-items:flex-start; }
    .table-wrap { margin-right:-2px; margin-left:-2px; }
    .report-filters { gap:12px; }
}

/* Design system v2.22 — densidade e ações administrativas */
.table-wrap td > form { display:inline-flex; align-items:center; gap:7px; margin:4px 5px 0 0; vertical-align:middle; }
.table-wrap td > form.actions { display:flex; margin:6px 0 0; }
.table-wrap td > details { display:inline-block; margin-top:4px; vertical-align:middle; }
.table-wrap td:last-child { min-width:150px; }
.table-wrap td .btn, .table-wrap td button { min-height:34px; padding:7px 10px; font-size:12px; white-space:nowrap; }
.table-wrap td .password-reset-form { display:grid; grid-template-columns:minmax(125px,1fr) auto; min-width:235px; margin:0 0 7px; }
.table-wrap td .password-reset-form input { min-width:0; }
.table-wrap td .closing-release, .table-wrap td .closing-delete { display:block; margin:7px 0 0; }
.table-wrap td .closing-payment { display:grid; gap:8px; min-width:250px; margin-top:10px; }
.table-wrap td .closing-payment .three { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.table-wrap td .closing-payment > input { margin-top:1px; }
.closing-warning { display:block; margin-top:6px; }
.page-actions { justify-content:flex-end; max-width:620px; }
.page-actions .muted { align-self:center; font-size:12px; }
.platform-user-action { align-self:end; }
.main > .page-head + .box, .main > .page-head + .grid { margin-top:0; }
.details-panel, details.box { margin-top:16px; }
details.box { padding:16px 18px; background:#fbfdff; }
details.box > summary { padding:2px 0; }
details.box[open] > summary { margin-bottom:14px; }
@media (max-width:720px) {
    .page-actions { justify-content:stretch; max-width:none; }
    .page-actions > * { flex:1 1 140px; }
    .table-wrap td:last-child { min-width:0; }
    .table-wrap td .closing-payment .three { grid-template-columns:1fr; }
    .table-wrap td .password-reset-form { min-width:0; }
}

/* Design system v2.23 — fluxo de atendimento e formulários longos */
.order-page-head { align-items:center; }
.order-page-head .page-actions { align-items:center; }
.order-page-head .page-actions form { margin:0; }
.order-create { display:grid; gap:20px; }
.order-create > .box { margin:0; }
.order-create > .box > h2 { margin-bottom:16px; }
.order-create > .box > .grid { gap:24px; }
.order-create .form-row textarea { min-height:112px; }
.order-create .mechanic-picker { min-height:110px; }
.order-create .mechanic-tools { grid-template-columns:minmax(130px,1fr) auto auto; }
.order-create .order-entry-rows:empty { min-height:8px; }
.order-entry-row { min-width:0; }
.order-entry-row .entry-field { min-width:0; }
.order-entry-row .entry-field > label { min-height:22px; color:var(--ink-soft); font-size:11px; }
.order-entry-row .entry-field input, .order-entry-row .entry-field select { width:100%; }
.order-create > .actions:last-child { display:flex; justify-content:flex-end; gap:10px; margin:0; padding-top:4px; }
.order-create > .actions:last-child button { min-width:130px; }
.order-create .payment-line { margin-top:10px; }
.order-create .order-total { margin:18px 0 0; padding-top:14px; border-top:1px solid var(--line); }
.order-sheet { max-width:1120px; padding:22px; }
.order-sheet .order-block { margin-top:16px; padding:14px; }
.order-sheet .order-block h2 { margin:-14px -14px 14px; padding:8px 12px; background:var(--soft); color:var(--brand-dark); text-align:left; text-transform:none; font-size:14px; }
.order-sheet .order-block > .table-wrap { margin-top:10px; }
.order-sheet .item-add { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.order-sheet .totals p { padding-top:4px; }
.order-sheet .internal-note { margin-top:20px; }
.order-sheet .page-actions details { position:relative; }
.order-sheet .inline-form { display:grid; grid-template-columns:minmax(220px,1fr) auto; gap:8px; margin-top:8px; padding:10px; background:var(--soft); border:1px solid var(--line); border-radius:8px; }
.item-edit { display:grid; gap:8px; min-width:250px; padding:10px; background:var(--soft); border:1px solid var(--line); border-radius:8px; }
.item-edit button { justify-self:start; }
@media (max-width:720px) {
    .order-page-head { align-items:flex-start; }
    .order-create { gap:16px; }
    .order-create > .box > .grid { gap:14px; }
    .order-create > .actions:last-child { justify-content:stretch; flex-direction:column; }
    .order-create > .actions:last-child > * { width:100%; }
    .order-sheet { padding:14px; }
    .order-sheet .order-block { padding:11px; }
    .order-sheet .order-block h2 { margin:-11px -11px 11px; }
    .order-sheet .inline-form { grid-template-columns:1fr; }
}

/* Design system v2.24 — estados vazios e acessibilidade operacional */
td.empty-cell { min-height:84px; padding:28px 18px !important; color:var(--muted); background:#fbfdff; text-align:center; font-size:13px; }
.table-wrap:has(td.empty-cell) { border-color:var(--line-strong); }
.empty-state p { max-width:420px; margin:0 auto; }
.empty-state .btn { margin-top:2px; }
.box > .muted.empty-cell { display:block; padding:22px 14px; border:1px dashed var(--line-strong); border-radius:8px; background:#fbfdff; text-align:center; }
input[aria-describedby], select[aria-describedby], textarea[aria-describedby] { scroll-margin-top:24px; }
label:has(+ input[required]), label:has(+ select[required]), label:has(+ textarea[required])::after { }
.form-row small.muted, .entry-field small.muted { line-height:1.35; }
button, .btn, summary.btn { touch-action:manipulation; }
@media (max-width:720px) {
    td.empty-cell { min-height:72px; padding:22px 12px !important; }
}


/* Design system v2.25 — módulos opcionais sem queda do sistema */
.check-unavailable { border:1px dashed var(--line-strong); border-radius:8px; padding:20px 14px; background:#fffaf0; color:var(--warn); text-align:center; }
.inventory-unavailable { border-left:4px solid var(--warn); }

/* Design system v2.26 — assinatura e capacidade visíveis para vender com controle */
.commercial-plan { border-top:3px solid var(--brand); }
.commercial-meta { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:14px 0 16px; }
.commercial-meta > div, .usage-card { padding:13px 14px; border:1px solid var(--line); border-radius:9px; background:#fbfdff; }
.commercial-meta small { display:block; margin-bottom:3px; color:var(--muted); font-size:11px; font-weight:700; }
.commercial-meta strong { display:block; color:var(--ink); font-size:14px; }
.commercial-next-step, .commercial-help { margin:12px 0 0; }
.subscription-attention { margin:0; border-color:#e3c18a; background:#fff8e9; color:#76501d; }
.usage-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.usage-line { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--ink-soft); font-size:13px; }
.usage-line b { color:var(--ink); font-size:15px; }
.usage-track { height:8px; margin-top:11px; overflow:hidden; border-radius:99px; background:#e5edf2; }
.usage-track span { display:block; height:100%; border-radius:inherit; background:var(--brand); }
.plan-mix { margin-top:20px; }
.plan-mix-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.plan-mix-grid a { display:block; padding:13px 14px; border:1px solid var(--line); border-radius:9px; color:inherit; text-decoration:none; background:#fbfdff; }
.plan-mix-grid a:hover { border-color:var(--brand); background:#f4f9fc; }
.plan-mix-grid small { display:block; color:var(--muted); font-size:11px; font-weight:700; }
.plan-mix-grid b { display:block; margin-top:4px; color:var(--brand-dark); font-size:23px; }
@media (max-width:720px) {
    .commercial-meta, .usage-grid, .plan-mix-grid { grid-template-columns:1fr; }
}

/* Design system v2.35 — shell comercial com contexto, logo e sessão */
.shell { grid-template-columns:248px minmax(0,1fr); }
.side { display:flex; flex-direction:column; min-height:100vh; height:100vh; padding:0; overflow:hidden; background:#4682B4; color:#edf7fd; }
.side-brand { display:flex; align-items:center; gap:10px; min-height:72px; padding:16px 16px 12px; border-bottom:1px solid rgba(255,255,255,.12); }
.brand-logo-slot { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; overflow:hidden; border-radius:10px; background:rgba(255,255,255,.16); color:#fff; }
.brand-logo-slot img { display:block; width:100%; height:100%; object-fit:contain; }
.brand-logo-fallback { font-size:14px; font-weight:800; letter-spacing:-.04em; }
.brand-copy { display:grid; min-width:0; gap:1px; }
.brand-copy strong { overflow:hidden; color:#fff; font-size:16px; letter-spacing:-.02em; text-overflow:ellipsis; white-space:nowrap; }
.brand-copy span { color:#dceefa; font-size:10px; font-weight:700; }
.tenant-chip { display:grid; gap:2px; margin:14px 14px 8px; padding:10px 11px; border:1px solid rgba(255,255,255,.14); border-radius:9px; background:rgba(16,56,87,.2); }
.tenant-chip small { color:#b9d8eb; font-size:9px; font-weight:800; letter-spacing:.08em; }
.tenant-chip strong { overflow:hidden; color:#fff; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.tenant-chip span { overflow:hidden; color:#d8eaf6; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.nav-scroll { flex:1 1 auto; min-height:0; overflow-y:auto; padding:8px 12px 16px; scrollbar-color:rgba(255,255,255,.32) transparent; }
.nav-group { margin:0 0 15px; }
.nav-group h2 { margin:0 10px 5px; color:#c3dfef; font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.side a { min-height:34px; margin:2px 0; padding:8px 11px; border-radius:8px; color:#edf7fd; font-size:13px; }
.side a:hover { background:rgba(255,255,255,.12); color:#fff; }
.side a.active { background:#2f638e; color:#fff; box-shadow:inset 3px 0 #d8edf9; font-weight:750; }
.side-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 14px; border-top:1px solid rgba(255,255,255,.14); background:rgba(20,55,83,.28); }
.side-user { display:flex; align-items:center; gap:9px; min-width:0; }
.side-user > span:last-child { display:grid; min-width:0; gap:1px; }
.side-user strong { overflow:hidden; color:#fff; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.side-user small { overflow:hidden; color:#cce3f1; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.side-avatar { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; border-radius:50%; background:#5d9dce; color:#fff; font-size:11px; font-weight:800; }
.side-footer form { margin:0; }
.side-logout { display:grid; place-items:center; width:30px; min-height:30px; padding:0; border:0; border-radius:6px; background:transparent; color:#d8eaf6; font-size:21px; font-weight:400; }
.side-logout:hover { background:rgba(255,255,255,.12); color:#fff; }
.main { max-width:1440px; padding-top:20px; }
.app-topbar { min-height:30px; margin-bottom:24px; padding:0 0 12px; border-bottom:1px solid var(--line); }
.breadcrumb { display:flex; align-items:center; flex-wrap:wrap; gap:7px; color:var(--muted); font-size:12px; }
.breadcrumb a { color:var(--brand-dark); text-decoration:none; }
.breadcrumb a:hover { text-decoration:underline; }
.breadcrumb strong { color:var(--ink-soft); font-weight:700; }
.page-head { margin-top:0; }
.nav-group { margin:0 0 8px; }
.nav-group summary { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 7px 3px; padding:6px 4px; color:#c3dfef; cursor:pointer; font-size:10px; font-weight:800; letter-spacing:.08em; list-style:none; text-transform:uppercase; }
.nav-group summary::-webkit-details-marker { display:none; }
.nav-group summary::marker { display:none; }
.nav-chevron { color:#d6ebf8; font-size:14px; line-height:1; transform:rotate(0deg); transition:transform .15s ease; }
.nav-group[open] .nav-chevron { transform:rotate(180deg); }
.nav-items { display:grid; gap:2px; }
@media (max-width:960px) {
    .shell { grid-template-columns:220px minmax(0,1fr); }
    .side { position:sticky; top:0; }
}
@media (max-width:720px) {
    .shell { display:block; }
    .side { position:static; display:block; width:100%; height:auto; min-height:0; overflow:visible; }
    .side-brand { min-height:58px; padding:10px 12px; }
    .brand-logo-slot { width:32px; height:32px; flex-basis:32px; border-radius:8px; }
    .brand-copy strong { font-size:14px; }
    .tenant-chip { margin:7px 12px; padding:8px 10px; }
    .nav-scroll { display:flex; gap:4px; overflow-x:auto; overflow-y:hidden; padding:5px 10px 9px; white-space:nowrap; }
    .nav-group { display:contents; }
    .nav-group summary { display:none; }
    .nav-items { display:contents; }
    .side a { display:inline-flex; min-height:31px; margin:0; padding:7px 10px; font-size:12px; }
    .side-footer { display:none; }
    .main { padding:16px 16px 34px; }
    .app-topbar { margin-bottom:18px; padding-bottom:10px; }
}

/* Design system v2.27 — contexto comercial no fluxo diário */
.subscription-banner { display:flex; align-items:center; gap:7px; border-color:#e3c18a; background:#fff8e9; color:#76501d; }
.subscription-banner a { color:#684615; font-weight:750; white-space:nowrap; }
.subscription-banner a:hover { color:#4d3210; }
@media (max-width:720px) { .subscription-banner { display:block; } .subscription-banner a { display:block; margin-top:5px; } }

/* Design system v2.29 — alinhamento transversal de painéis, títulos e ações */
.main > .grid > .box,
.main > .grid > .box + .box,
.grid > .box + .box { margin-top:0; }
.grid > *, .three > *, .section-heading > div, .page-head > div { min-width:0; }
.section-heading > div { flex:1 1 auto; }
.section-heading > .btn, .section-heading > a { flex:0 0 auto; }
.section-heading h2, .section-heading p, .page-head h1, .page-head .sub { overflow-wrap:anywhere; }
.page-head { align-items:flex-start; }
.page-actions { min-width:0; max-width:100%; }
.table-wrap table:has(.icon-button) th:last-child,
.table-wrap table:has(.icon-button) td:last-child { width:1%; white-space:nowrap; }
.table-wrap table:has(.icon-button) td:last-child { text-align:center; }
.table-wrap table:has(.icon-button) .icon-button { display:inline-flex; vertical-align:middle; }
.main > h1 + .sub { margin-top:0; }
.table-wrap th, .table-wrap td { overflow-wrap:anywhere; }
@media (max-width:720px) {
    .page-head, .section-heading { align-items:flex-start; }
    .page-actions { width:100%; }
    .page-actions > * { max-width:100%; }
}

/* Design system v2.31 — onboarding orientado à conversão */
.conversion-panel { display:grid; gap:3px; margin-top:16px; padding:12px 14px; border:1px solid var(--line); border-left:4px solid var(--warn); border-radius:8px; background:#fffaf0; }
.conversion-panel.ready { border-left-color:var(--ok); background:#f2f8f5; }
.conversion-panel strong { color:var(--ink); font-size:13px; }
.conversion-panel span { color:var(--ink-soft); font-size:12px; }
.commercial-editor { margin-top:14px; padding-top:13px; border-top:1px solid var(--line); }
.commercial-editor > summary { color:var(--brand-dark); font-weight:750; cursor:pointer; }
.commercial-editor[open] > summary { margin-bottom:12px; }
.commercial-editor form { margin-top:8px; }

/* Design system v2.47 — ações compactas nos cadastros */
.catalog-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.catalog-actions form { margin:0; }
.catalog-icon-action { width:30px!important; min-width:30px!important; height:30px!important; min-height:30px!important; padding:0!important; font-size:14px!important; font-weight:800!important; }
.catalog-icon-action:hover { border-color:var(--brand)!important; background:var(--soft)!important; color:var(--brand-dark)!important; }
.catalog-icon-action[title*="Desativar"], .catalog-icon-action[title*="Excluir"] { color:var(--bad)!important; }
.catalog-icon-action[title*="Ativar"] { color:var(--ok)!important; }
@media (max-width:720px) { .catalog-actions { align-items:flex-start; } }

/* Design system v2.46 — guia de início para a primeira operação */
.setup-progress { height:8px; margin:2px 0 16px; overflow:hidden; border-radius:99px; background:#e5edf2; }
.setup-progress span { display:block; height:100%; border-radius:inherit; background:#4682b4; transition:width .2s ease; }
.onboarding .section-heading > .badge { flex:0 0 auto; }
@media (prefers-reduced-motion: reduce) { .setup-progress span { transition:none; } }

/* Design system v2.44 — acabamento final do menu */
.side { background:linear-gradient(180deg,#123b59 0%,#0e3049 100%); color:#e9f4fb; }
.side-brand { min-height:76px; padding:16px 16px 14px; border-bottom-color:rgba(211,235,249,.15); }
.brand-logo-slot { width:38px; height:38px; flex-basis:38px; border:1px solid rgba(220,241,252,.3); border-radius:11px; background:rgba(255,255,255,.11); }
.brand-copy strong { color:#fff; font-size:16px; }
.brand-copy span { color:#b9d8eb; }
.tenant-chip { margin:14px 14px 10px; border-color:rgba(164,212,239,.25); background:rgba(70,130,180,.18); }
.tenant-chip small { color:#a9cee3; }
.tenant-chip span { color:#bad6e6; }
.nav-scroll { padding:8px 12px 18px; scrollbar-color:rgba(174,215,237,.35) transparent; }
.nav-group { margin:0 0 10px; }
.nav-group summary { margin:0 6px 4px; padding:7px 5px; color:#9fc4da; font-size:10px; letter-spacing:.11em; }
.nav-group summary:hover { color:#e4f3fb; }
.nav-chevron { color:#9fc4da; }
.nav-items { gap:3px; }
.side a { display:flex; align-items:center; gap:9px; min-height:36px; margin:0; padding:7px 10px; border:1px solid transparent; border-radius:9px; color:#d6e8f2; font-size:13px; }
.side a:hover { border-color:rgba(174,215,237,.18); background:rgba(89,164,214,.18); color:#fff; }
.side a.active { border-color:rgba(188,226,247,.22); background:#4682b4; box-shadow:0 5px 14px rgba(0,0,0,.16), inset 3px 0 #d7edf9; color:#fff; font-weight:750; }
.nav-icon { display:grid; place-items:center; flex:0 0 21px; width:21px; height:21px; border-radius:6px; color:#8fb9d3; font-size:14px; line-height:1; }
.side a:hover .nav-icon,.side a.active .nav-icon { color:#fff; }
.nav-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-footer { padding:13px 14px; border-top-color:rgba(211,235,249,.15); background:rgba(5,28,46,.26); }
.side-avatar { width:34px; height:34px; flex-basis:34px; border-radius:10px; background:#75acd2; color:#092d49; }
.side-user small { color:#b9d6e5; }
.side-logout { border:1px solid rgba(210,236,249,.18); border-radius:8px; color:#b9d6e5; }
.side-logout:hover { background:rgba(89,164,214,.22); color:#fff; }
@media (max-width:720px) {
    .side-brand { min-height:62px; padding:11px 12px; }
    .tenant-chip { margin:8px 12px; }
    .nav-scroll { gap:6px; padding:6px 10px 10px; }
    .nav-group { margin:0; }
    .nav-items { gap:4px; }
    .side a { min-height:34px; padding:7px 10px; }
    .nav-icon { flex-basis:18px; width:18px; font-size:13px; }
}

/* v2.50 final precedence: compact records and left-aligned actions. */
.table-wrap table { width:max-content; min-width:100%; table-layout:auto; }
.table-wrap th, .table-wrap td { font-size:13px; }
.table-wrap td { white-space:nowrap; overflow-wrap:normal; }
.table-wrap td:last-child, .table-wrap table:has(.icon-button) td:last-child { text-align:left; white-space:nowrap; }
.table-wrap table:has(.icon-button) th:last-child { text-align:left; }
.catalog-actions { justify-content:flex-start; align-items:center; text-align:left; white-space:nowrap; }
.catalog-actions form { flex:0 0 auto; }
input[type="number"] { max-width:132px; font-variant-numeric:tabular-nums; }
input[type="number"][name*="quantity"], input[type="number"][name*="stock"], input[type="number"][name="mileage"] { max-width:96px; }
input[name="unit"] { max-width:100px; }
input[type="date"], input[type="month"] { max-width:160px; }
@media (max-width:720px) {
    .table-wrap th, .table-wrap td { font-size:12px; padding:8px 9px; }
    .table-wrap table { min-width:620px; }
    .catalog-actions { flex-wrap:nowrap; }
    .catalog-actions input[type="password"] { width:150px; max-width:150px; }
    input[type="number"] { max-width:100%; }
}.table-wrap table:has(.icon-button) td:last-child { width:1%; min-width:0; }
/* v2.52 — retornos compactos por ícone. */
.back-link { display:inline-flex; align-items:center; justify-content:center; width:30px; min-width:30px; height:30px; padding:0; border:1px solid var(--line-strong); border-radius:8px; background:#fff; color:var(--brand-dark); font-size:18px; line-height:1; text-decoration:none; }
.back-link:hover { border-color:var(--brand); background:var(--soft); color:var(--brand-dark); }
.login-help .back-link { margin-top:2px; }
/* v2.53 — exportações discretas no cabeçalho das telas. */
.inventory-page-head .page-actions { align-self:flex-start; flex:0 0 auto; }
.export-icon { width:32px!important; min-width:32px!important; height:32px!important; min-height:32px!important; padding:0!important; font-size:17px!important; font-weight:800!important; line-height:1!important; }
.export-icon:hover { border-color:var(--brand)!important; background:var(--soft)!important; color:var(--brand-dark)!important; }
@media (max-width:720px) { .inventory-page-head .page-actions { width:auto; } }
/* v2.54 — revisão visual página a página: títulos, filtros e ações sem sobras. */
h1 { font-size:clamp(22px,2.4vw,28px); }
.main > h1 { margin-top:0; }
.main > h1 + .sub { margin-top:0; margin-bottom:20px; }
.password-reset-form { width:240px; max-width:100%; }
.password-reset-form input { width:190px; max-width:190px; }
.tenant-actions { min-width:260px; vertical-align:top!important; }
.tenant-actions > .btn { margin-bottom:6px; }
.tenant-actions > form { display:inline-flex; vertical-align:middle; margin:0 4px 6px 0; }
.tenant-actions > form.actions { display:flex; align-items:center; gap:6px; }
.tenant-actions input[type="file"] { width:190px; max-width:190px; min-height:34px; padding:6px 8px; font-size:12px; }
.tenant-actions .btn { min-height:32px; padding:7px 10px; font-size:12px; }
.closing-release, .closing-delete { margin:4px 0 0; }
.closing-release button, .closing-delete button { min-height:30px; padding:6px 9px!important; font-size:12px; }
.closing-payment { display:grid; gap:7px; min-width:250px; margin-top:7px; }
.closing-payment .three { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.closing-payment input, .closing-payment select { min-height:32px; padding:6px 7px; font-size:12px; }
.closing-payment > input[name="notes"] { min-height:32px; }
.closing-payment button { min-height:30px; padding:6px 9px; font-size:12px; }
.report-filter-actions > button { min-height:40px; }
@media (max-width:720px) {
    .password-reset-form { width:100%; }
    .password-reset-form input { flex:1; width:auto; max-width:none; }
    .tenant-actions { min-width:0; }
    .tenant-actions > form.actions { display:flex; }
    .closing-payment .three { grid-template-columns:1fr; }
}

/* v2.54 — linguagem visual unificada para controles, ícones e superfícies. */
:root {
    --brand:#4682b4;
    --brand-dark:#2f6592;
    --soft:#eef5fa;
    --line:#d8e3ec;
    --line-strong:#b9ccdc;
    --ink:#16324a;
    --ink-soft:#4f6d84;
    --muted:#6d8497;
    --menu-green:#173f60;
    --menu-green-dark:#102f49;
    --bg:#ffffff;
    --paper:#ffffff;
    --focus-ring:0 0 0 3px rgba(70,130,180,.22);
    --control-height:38px;
}
body { color:var(--ink); }
label { color:var(--ink-soft); font-size:12px; font-weight:700; }
input, select, textarea { min-height:var(--control-height); padding:8px 11px; border-color:var(--line-strong); border-radius:9px; background:#fff; color:var(--ink); box-shadow:0 1px 1px rgba(20,50,74,.03); }
select { appearance:none; padding-right:34px; background-image:linear-gradient(45deg,transparent 50%,var(--brand) 50%),linear-gradient(135deg,var(--brand) 50%,transparent 50%); background-position:calc(100% - 15px) 16px,calc(100% - 10px) 16px; background-repeat:no-repeat; background-size:5px 5px,5px 5px; }
textarea { min-height:92px; }
input:hover, select:hover, textarea:hover { border-color:#9fb8cb; }
input:focus, select:focus, textarea:focus { border-color:var(--brand); box-shadow:var(--focus-ring); }
button, .btn { min-height:var(--control-height); padding:8px 13px; border-radius:9px; background:var(--brand); color:#fff; font-size:13px; font-weight:750; box-shadow:0 1px 2px rgba(31,80,118,.12); }
button:hover, .btn:hover { background:var(--brand-dark); box-shadow:0 3px 8px rgba(31,80,118,.16); }
.btn.light { border-color:var(--line-strong); background:#fff; color:var(--brand-dark); box-shadow:none; }
.btn.light:hover { border-color:#8eacc3; background:var(--soft); color:var(--brand-dark); }
.icon-button { width:32px!important; min-width:32px!important; height:32px!important; min-height:32px!important; border-radius:8px!important; border-color:var(--line-strong)!important; background:#fff!important; color:var(--brand-dark)!important; box-shadow:none!important; }
.icon-button:hover { border-color:var(--brand)!important; background:var(--soft)!important; color:var(--brand-dark)!important; }
.actions { gap:9px; }
.form-row { margin-bottom:13px; }
.box, .card { border-color:var(--line); box-shadow:0 2px 8px rgba(29,67,95,.04); }
.table-wrap { border-color:var(--line); border-radius:10px; }
.table-wrap th { color:#607b91; background:#f3f7fa; }
.table-wrap td { color:#23445f; }
.export-icon { position:relative; display:inline-grid!important; place-items:center; overflow:hidden; font-size:0!important; }
.export-icon > span { position:relative; z-index:1; display:block; font-size:0; width:16px; height:24px; }
.export-icon > span::before { content:'↑'; position:absolute; inset:0 0 6px; color:currentColor; font-size:20px; font-weight:800; line-height:18px; text-align:center; }
.export-icon > span::after { content:''; position:absolute; left:1px; right:1px; bottom:1px; height:9px; border:2px solid currentColor; border-top:0; border-radius:0 0 3px 3px; }
.export-icon:hover > span::before, .export-icon:hover > span::after { color:var(--brand-dark); }
@media (max-width:720px) {
    input, select, textarea { font-size:16px; }
    button, .btn { min-height:42px; }
    .icon-button, .export-icon { min-height:34px!important; height:34px!important; }
}

/* v2.56 — biblioteca de ícones do menu: SVG linear, consistente e sem dependência externa. */
.icon-sprite { position:absolute; width:0; height:0; overflow:hidden; pointer-events:none; }
.nav-icon { display:block; flex:0 0 20px; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; color:#9fc4da; }
.nav-icon use { pointer-events:none; }
.side a:hover .nav-icon, .side a.active .nav-icon { color:#fff; }
.side-action-icon { display:block; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.side-logout { display:grid; place-items:center; width:32px; min-width:32px; height:32px; min-height:32px; padding:0; }
@media (max-width:720px) {
    .nav-icon { flex-basis:18px; width:18px; height:18px; }
}

/* v2.57 — ícones discretos no menu, alinhados à referência visual. */
.nav-icon { flex:0 0 18px; width:16px; height:16px; stroke-width:1.55; color:#a6c3d4; }
.side a { gap:10px; }
.side-action-icon { width:16px; height:16px; stroke-width:1.6; }
@media (max-width:720px) {
    .nav-icon { flex-basis:17px; width:15px; height:15px; }
}

/* v2.59 — tela de usuários: formulário equilibrado, filtros compactos e tabela sem quebras. */
.users-create-form { row-gap:13px; }
.users-create-submit { grid-column:1 / -1; display:flex; justify-content:center; margin-top:1px; }
.users-create-submit button { min-width:150px; }
.users-filters { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:4px 0 14px; }
.users-filter-line { display:flex; align-items:center; gap:7px; margin:0; }
.users-filter-line input { width:290px; max-width:290px; }
.users-filter-line input + button { flex:0 0 auto; }
.users-status-line select { width:150px; max-width:150px; }
.users-status-line .btn { min-height:38px; }
.users-table { min-width:980px; table-layout:fixed; }
.users-table th:nth-child(1), .users-table td:nth-child(1) { width:190px; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { width:330px; }
.users-table th:nth-child(3), .users-table td:nth-child(3) { width:145px; }
.users-table th:nth-child(4), .users-table td:nth-child(4) { width:155px; }
.users-table th:nth-child(5), .users-table td:nth-child(5) { width:95px; }
.users-table th:nth-child(6), .users-table td:nth-child(6) { width:275px; }
.users-table td:nth-child(1), .users-table td:nth-child(2), .users-table td:nth-child(3), .users-table td:nth-child(4) { white-space:nowrap; }
.users-table .catalog-actions { display:flex; flex-wrap:nowrap; align-items:center; gap:6px; min-width:260px; }
.users-table .catalog-actions form.actions { display:flex; align-items:center; margin:0; }
.users-table .password-reset-form { display:grid; grid-template-columns:minmax(0,1fr) 30px; width:235px; min-width:235px; gap:6px; margin:0; }
.users-table .password-reset-form input { width:auto; min-width:0; }
.catalog-action-icon { display:block; width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.users-table .user-toggle-action { color:var(--bad)!important; }
.users-table .user-toggle-action:hover { color:var(--bad)!important; }
@media (max-width:720px) {
    .users-filters { display:grid; gap:9px; justify-content:stretch; }
    .users-filter-line { width:100%; }
    .users-filter-line input { flex:1; width:auto; max-width:none; }
    .users-status-line select { flex:1; width:auto; max-width:none; }
    .users-create-submit { justify-content:stretch; }
    .users-create-submit button { width:100%; }
}

/* v2.60 — grade fixa para que todas as ações de usuários compartilhem o mesmo eixo. */
.users-table td.catalog-actions { display:grid; grid-template-columns:235px 30px; align-items:center; justify-items:start; column-gap:6px; min-width:275px; padding-top:10px; padding-bottom:10px; vertical-align:middle; }
.users-table td.catalog-actions > .password-reset-form { grid-column:1; grid-row:1; }
.users-table td.catalog-actions > form.actions { grid-column:2; grid-row:1; }
.users-table td.catalog-actions > form.actions .icon-button { margin:0; }
.users-table td.catalog-actions .icon-button { flex:0 0 30px; }

/* v2.61 — filtros de cadastro em uma linha com campo de busca 40% menor. */
form.actions.no-print:has(> input[name="q"]), form.filter-inline.no-print:has(> input[name="q"]) { display:flex; flex-wrap:nowrap; align-items:center; gap:8px; }
form.actions.no-print:has(> input[name="q"]) > input[name="q"], form.filter-inline.no-print:has(> input[name="q"]) > input[name="q"] { flex:0 1 60%; width:60%; max-width:60%; }
form.actions.no-print:has(> input[name="q"]) > button, form.actions.no-print:has(> input[name="q"]) > .btn, form.filter-inline.no-print:has(> input[name="q"]) > button, form.filter-inline.no-print:has(> input[name="q"]) > .btn { flex:0 0 auto; }
@media (max-width:720px) {
    form.actions.no-print:has(> input[name="q"]), form.filter-inline.no-print:has(> input[name="q"]) { flex-wrap:wrap; }
    form.actions.no-print:has(> input[name="q"]) > input[name="q"], form.filter-inline.no-print:has(> input[name="q"]) > input[name="q"] { flex:1 1 100%; width:100%; max-width:none; }
}

/* v2.58 — chevron SVG discreto e grupo aberto com destaque sutil. */
.nav-group summary { border:1px solid transparent; border-radius:6px; transition:background .15s ease, border-color .15s ease, color .15s ease; }
.nav-group summary:hover { background:rgba(135,190,222,.08); }
.nav-group[open] > summary { border-color:rgba(174,215,237,.12); background:rgba(135,190,222,.11); color:#d6ebf8; }
.nav-chevron { display:block; flex:0 0 14px; width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; color:#9fc4da; transform:rotate(0deg); transition:transform .15s ease, color .15s ease; }
.nav-group[open] .nav-chevron { color:#d6ebf8; transform:rotate(180deg); }

/* Design system v2.64 — cabeçalhos consistentes nos fluxos principais. */
.dashboard-head.page-head { align-items:flex-end; }
.dashboard-head.page-head .page-actions { align-items:center; }
@media (max-width:720px) { .dashboard-head.page-head { align-items:flex-start; } }

/* Design system v2.65 — recibos, estados vazios e fluxo financeiro. */
.receipt-actions { justify-content:flex-end; margin-bottom:12px; }
.receipt-document { max-width:1100px; margin:0 auto; }
.receipt-document > h1 { margin-top:0; }
.receipt-document > p { line-height:1.6; }
.closing-select-all + .table-wrap { margin-top:4px; }
@media (max-width:720px) {
    .receipt-actions { justify-content:flex-start; }
    .receipt-actions .btn { flex:1 1 auto; }
    .receipt-document { padding:14px; }
}
@media print {
    .receipt-document { max-width:none; border:0; padding:0; }
    .receipt-document h1 { font-size:18pt; }
}

/* Design system v2.66 — hierarquia final e feedback acessível. */
.page-head .eyebrow { margin-bottom:6px; }
.page-head + .box, .page-head + .grid, .page-head + .cards { margin-top:0; }
[aria-live="polite"] { min-height:1.4em; }

/* Design system v2.67 — centro de lançamento com contexto claro. */
.launch-gate-summary { border-left:3px solid var(--brand); }

/* Design system v2.68 — cabeçalho contextual em cadastros e configurações. */
.catalogs-page-head, .tenant-details-page-head { margin-bottom:22px; }

/* Design system v2.69 — sessão segura atrás de proxy HTTPS. */

/* Design system v2.72 — segurança 2FA. */
.two-factor-secret { margin: 18px 0; padding: 16px; border: 1px solid #c8dbea; border-radius: 10px; background: #f4f8fb; text-align: center; overflow-wrap: anywhere; }
.two-factor-secret code { color: #174a73; font-size: 1.15rem; letter-spacing: .12em; font-weight: 700; }
.two-factor-uri { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-size: .72rem; color: #46677f; }

/* Design system v2.76 — identidade da plataforma e do tenant no menu. */
.platform-brand { display:flex; align-items:center; flex:1 1 auto; min-width:0; height:42px; text-decoration:none; }
.platform-brand img { display:block; width:100%; max-width:178px; height:42px; object-fit:contain; object-position:left center; }
.side-brand { gap:7px; }
.brand-copy { flex:0 0 auto; align-self:flex-end; padding-bottom:3px; }
.brand-copy span { color:#b9d8eb; font-size:10px; font-weight:800; }
.tenant-identity { display:flex; align-items:center; gap:9px; min-width:0; }
.tenant-identity > img { display:block; flex:0 0 31px; width:31px; height:31px; object-fit:contain; border-radius:7px; }
.tenant-identity > span { display:grid; min-width:0; gap:2px; }
.tenant-identity strong, .tenant-identity span span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tenant-identity strong { color:#fff; font-size:13px; }
.tenant-identity span span { color:#d8eaf6; font-size:11px; }
@media (max-width:720px) {
    .platform-brand { height:34px; }
    .platform-brand img { max-width:158px; height:34px; }
    .brand-copy { padding-bottom:1px; }
}

/* Design system v2.77 — logo configurável pelo tenant. */
.form-inline { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.form-inline input[type=file] { flex:1 1 260px; min-width:0; }
@media (max-width:720px) { .form-inline { align-items:stretch; flex-direction:column; } .form-inline button { align-self:flex-start; } }

/* Design system v2.82 — consultas legíveis, ações vetoriais e impressão do resultado. */
.report-action-icon { width:16px; height:16px; display:block; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.report-subnav { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 16px; padding:0; border:0; background:transparent; }
.report-subnav a { display:inline-flex; align-items:center; min-height:32px; padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink-soft); font-size:11px; font-weight:700; line-height:1.2; text-decoration:none; white-space:nowrap; }
.report-subnav a:hover { border-color:var(--brand); background:var(--soft); color:var(--brand-dark); }
.report-subnav a.active { border-color:var(--brand); background:#eaf2f8; color:var(--brand-dark); box-shadow:inset 0 0 0 1px rgba(70,130,180,.12); }
.report-query-filters { grid-template-columns:140px 140px minmax(150px,1fr) minmax(150px,1fr) 140px 242px auto; gap:10px; align-items:end; }
.report-query-filters .form-row { min-width:0; }
.report-query-filters .form-row input, .report-query-filters .form-row select { width:100%; min-width:0; }
.report-query-filters .report-payment-status { grid-column:auto; min-width:0; padding:6px 8px; }
.report-query-filters .report-status-options { flex-wrap:nowrap; gap:5px; }
.report-query-filters .report-status-options label { padding:5px 6px; font-size:11px; white-space:nowrap; }
.report-query-filters .report-filter-actions { grid-column:auto; margin:0; gap:6px; justify-content:flex-end; }
.report-query-filters .report-filter-actions .btn, .report-query-filters .report-filter-actions button { min-height:36px; padding:7px 10px; white-space:nowrap; }
.report-summary-cards { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:20px 0; }
.report-summary-cards .card { min-width:0; min-height:86px; padding:13px 14px; }
.report-summary-cards .card small { font-size:11px; white-space:nowrap; }
.report-summary-cards .card b { font-size:18px; }
.report-print-area { min-width:0; }
.report-print-title { color:var(--ink); margin:0 0 12px; }
.report-catalog-filters { padding:14px 16px; }
.report-catalog-filters .filter-inline { display:flex; flex-wrap:nowrap; gap:8px; margin:0; }
.report-catalog-filters .filter-inline input { flex:1 1 auto; min-width:0; }
.report-catalog-filters .filter-inline button, .report-catalog-filters .filter-inline .btn { flex:0 0 auto; }
@media (max-width:1180px) {
    .report-query-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .report-query-filters .report-payment-status { grid-column:1/-1; }
    .report-query-filters .report-filter-actions { grid-column:1/-1; justify-content:flex-end; }
    .report-summary-cards { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:720px) {
    .report-subnav { overflow-x:auto; flex-wrap:nowrap; padding-bottom:3px; }
    .report-subnav a { flex:0 0 auto; }
    .report-query-filters { grid-template-columns:1fr; }
    .report-query-filters .report-payment-status, .report-query-filters .report-filter-actions { grid-column:auto; }
    .report-query-filters .report-status-options { flex-wrap:wrap; }
    .report-query-filters .report-filter-actions { justify-content:stretch; }
    .report-query-filters .report-filter-actions > * { flex:1; }
    .report-summary-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .report-summary-cards .card { min-height:76px; padding:11px; }
    .report-catalog-filters .filter-inline { flex-wrap:wrap; }
    .report-catalog-filters .filter-inline input { flex:1 1 100%; }
}
@media print {
    .reports-page > * { display:none !important; }
    .reports-page > .report-print-area { display:block !important; }
    .reports-page > .report-print-area .print-only { display:block !important; }
    .reports-page > .report-print-area .box { margin:0; padding:0; border:0; box-shadow:none; }
    .reports-page > .report-print-area .report-summary-cards { display:grid; grid-template-columns:repeat(6,1fr); margin:0 0 12px; gap:6px; }
    .reports-page > .report-print-area .report-summary-cards .card { min-height:auto; padding:7px; }
    .reports-page > .report-print-area .report-summary-cards .card b { font-size:11pt; }
    .reports-page > .report-print-area .report-result h2 { margin:0 0 8px; font-size:13pt; }
    .reports-page > .report-print-area .report-catalog-panel h2 { margin:0 0 8px; font-size:13pt; }
}

/* v2.83 — cabeçalho padronizado para impressão dos relatórios. */
.report-print-header { display:none; }
.report-print-brand { min-height:28px; display:flex; align-items:center; }
.report-print-brand img { display:block; width:auto; max-width:190px; height:28px; object-fit:contain; object-position:left center; }
.report-print-brand strong { color:var(--ink); font-size:15px; }
.report-print-meta { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1.8fr) minmax(120px,1fr) minmax(0,1.2fr); gap:12px; margin-top:8px; padding-top:7px; border-top:1px solid var(--line); color:var(--ink-soft); font-size:10px; line-height:1.35; }
.report-print-meta span { display:block; min-width:0; overflow-wrap:anywhere; }
.report-print-report, .report-print-date { text-align:center; }
.report-print-user { text-align:right; }
@media print {
    .reports-page > .report-print-area .report-print-header { display:block !important; margin-bottom:12px; }
    .reports-page > .report-print-area .report-print-brand img { display:block !important; width:190px !important; max-width:190px !important; height:28px !important; object-fit:contain !important; }
    .reports-page > .report-print-area .report-print-meta { color:#3b5265; border-color:#cbd7df; }
}

/* v2.84 — guia de início alinhado em quatro etapas. */
.onboarding-steps { grid-template-columns:repeat(4,minmax(0,1fr)); align-items:stretch; gap:10px; }
.onboarding-step { min-width:0; min-height:76px; align-content:start; }
@media (max-width:1100px) { .onboarding-steps { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) { .onboarding-steps { grid-template-columns:1fr; } }

/* v2.86 — impressão direta e tabelas compactas. */
.report-screen-only { display:block; }
@media print {
    .reports-page > .report-print-area .report-screen-only { display:none !important; }
    .reports-page > .report-print-area .table-wrap { margin:0; border-radius:0; }
    .reports-page > .report-print-area table { border-spacing:0; }
    .reports-page > .report-print-area th,
    .reports-page > .report-print-area td { padding:3px 5px; line-height:1.15; font-size:8.5pt; }
    .reports-page > .report-print-area .report-catalog-panel table { width:auto; min-width:0; }
    .reports-page > .report-print-area .report-catalog-panel th:first-child,
    .reports-page > .report-print-area .report-catalog-panel td:first-child { width:110px; white-space:nowrap; }
}

/* v2.90 — Marco 3: Reestruturação da OS em 3 Fases Lógicas */
.order-phases-nav {
    display: flex;
    gap: 8px;
    margin: 16px 0 16px;
    padding: 6px;
    background: #edf3f2;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow-x: auto;
}
.phase-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13.5px;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s ease;
}
.phase-tab-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink);
}
.phase-tab-btn.active {
    background: #fff;
    color: var(--brand-dark);
    border-color: var(--line-strong);
    box-shadow: 0 1px 4px rgba(31, 49, 55, 0.08);
}
.phase-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--line);
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 750;
}
.phase-tab-btn.active .phase-step {
    background: var(--brand);
    color: #fff;
}
.phase-pill {
    padding: 2px 7px;
    border-radius: 999px;
    background: #e1e9ec;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 600;
}
.phase-tab-btn.active .phase-pill {
    background: var(--soft);
    color: var(--brand-dark);
}
.phase-panel[hidden] {
    display: none !important;
}
@media (max-width: 720px) {
    .order-phases-nav {
        flex-direction: column;
        gap: 5px;
    }
    .phase-tab-btn {
        width: 100%;
        justify-content: space-between;
    }
}
@media print {
    .order-phases-nav {
        display: none !important;
    }
    .phase-panel {
        display: block !important;
    }
}
