/* Controle Patrimonial — shell claro (padrão ERP) com a paleta Gramiscelli */
:root {
  --green-900: #0d3a1e; --green-800: #144a25; --green: #1b5125; --green-100: #e4efe6; --green-50: #f1f7f2;
  --olive: #78935f; --sand: #af8c62; --ivory: #f2f1df;
  --bg: #f4f5f4; --card: #ffffff; --line: #e4e7e4; --line-2: #eef0ee;
  --ink: #1d221e; --ink-2: #4b524d; --ink-3: #7c847e; --ink-4: #a9b0aa;
  --red: #c8352b; --red-50: #fdecea; --amber: #b7791f; --amber-50: #fdf3e1;
  --sans: "Inter", -apple-system, system-ui, sans-serif; --serif: "Inter", -apple-system, system-ui, sans-serif; /* sem serifa (decisão 2026-09-21) */ --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 12px; --shadow: 0 1px 2px rgba(20,30,22,.06), 0 8px 24px -12px rgba(20,30,22,.12);
  --top: 56px; --side: 296px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.hidden { display: none !important; }
.mono, .num { font-family: var(--mono); font-size: .86em; }
.r { text-align: right; }

/* ---------- Login (escuro, identidade da marca) ---------- */
.login { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; color: var(--ivory);
  background: radial-gradient(120% 60% at 80% 0%, rgba(120,147,95,.12), transparent 50%), linear-gradient(180deg,#081d15,#04100c); }
.login-card { position: relative; overflow: hidden; width: min(392px, 100%); padding: 42px 34px 32px; text-align: center;
  border-radius: 22px; border: 1px solid rgba(175,140,98,.28);
  background: linear-gradient(180deg, rgba(11,32,24,.94), rgba(6,19,15,.96));
  box-shadow: 0 40px 100px rgba(0,0,0,.55), inset 0 1px 0 rgba(242,241,223,.06);
  animation: cardIn .7s cubic-bezier(.22,1,.36,1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.login-glow { position: absolute; top: -42%; left: 50%; width: 320px; height: 320px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(120,147,95,.2), transparent 62%); pointer-events: none; }
.login-logo { position: relative; display: block; width: 174px; height: auto; margin: 0 auto 12px; opacity: .96; }
.login-sub { position: relative; margin: 2px 0 28px; color: rgba(242,241,223,.5); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; }
.gate { position: relative; display: flex; flex-direction: column; gap: 12px; }
.gate input { width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid rgba(242,241,223,.2); background: rgba(242,241,223,.05); color: var(--ivory); font-size: 15px; transition: border-color .2s, background .2s; }
.gate input::placeholder { color: rgba(242,241,223,.4); }
.gate input:focus { outline: none; border-color: var(--sand); background: rgba(242,241,223,.07); }
.btn-login { width: 100%; padding: 14px; margin-top: 4px; border-radius: 10px; background: var(--sand); color: #241a0e; font-weight: 600; font-size: 15px; }
.login-err { color: #e0a48a; margin: 16px 0 0; }
.gate .pw input { padding-right: 46px; }
.gate .eye { color: rgba(242,241,223,.5); }
.gate .eye:hover { color: var(--sand); }
.remember { display: flex; align-items: center; gap: 9px; margin: -2px 0 0 2px; color: rgba(242,241,223,.6); font-size: 12.5px; text-align: left; cursor: pointer; }
.remember input { width: 15px; height: 15px; accent-color: var(--sand); margin: 0; }

/* Campo de senha com "olhinho" */
.pw { position: relative; display: flex; }
.pw input { flex: 1; padding-right: 44px !important; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--ink-3); }
.eye svg { width: 17px; height: 17px; }
.eye:hover { color: var(--ink); }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; }
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--top); z-index: 20; display: flex; align-items: center; gap: 20px; padding: 0 18px 0 16px; color: var(--ivory);
  background: radial-gradient(90% 140% at 0% 0%, rgba(120,147,95,.22), transparent 55%), linear-gradient(90deg, #071b14, #0c2f1c 55%, #0d3a1e);
  border-bottom: 1px solid rgba(175,140,98,.38); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, var(--sand), rgba(175,140,98,.15) 45%, transparent 80%); }
.brand { display: flex; align-items: center; gap: 14px; flex: none; }
.brand img { height: 34px; width: auto; opacity: .96; }
.brand-sep { width: 1px; height: 26px; background: rgba(175,140,98,.35); }
.brand-module { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--ivory); line-height: 1; }
.global-search { flex: 0 1 460px; margin-left: 12px; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px 0 12px; border-radius: 8px;
  background: rgba(242,241,223,.04); border: 1px solid rgba(175,140,98,.22); color: rgba(242,241,223,.55); transition: border-color .15s, background .15s; }
.global-search:focus-within { border-color: rgba(175,140,98,.7); background: rgba(242,241,223,.07); color: var(--ivory); }
.global-search svg { width: 15px; height: 15px; color: var(--sand); }
.global-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ivory); font-size: 13.5px; }
.global-search input::placeholder { color: rgba(242,241,223,.42); }
.global-search kbd { font-family: var(--mono); font-size: 10.5px; color: rgba(242,241,223,.45); border: 1px solid rgba(242,241,223,.18); border-radius: 4px; padding: 1px 5px; }
.top-actions { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; }
.signature { margin-right: 14px; padding-right: 18px; border-right: 1px solid rgba(175,140,98,.3); color: var(--sand); font-size: 10.5px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: rgba(242,241,223,.7); transition: background .15s, color .15s; }
.icon-btn:hover { background: rgba(242,241,223,.08); color: var(--ivory); }
.icon-btn svg { width: 17px; height: 17px; }
.user { display: flex; align-items: center; gap: 10px; margin-left: 8px; padding: 3px 3px 3px 10px; border-radius: 999px; transition: background .15s; }
.user:hover { background: rgba(242,241,223,.08); }
.user-name { font-size: 12.5px; color: rgba(242,241,223,.75); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sand); color: #241a0e; font-weight: 700; font-size: 12.5px; display: grid; place-items: center; box-shadow: 0 0 0 2px rgba(175,140,98,.25); }

/* ---------- Sidebar (acordeão, pele verde) ---------- */
.menu-btn { display: none; margin-right: 4px; }
.side { position: fixed; top: var(--top); left: 0; bottom: 0; width: var(--side); z-index: 30; display: flex; flex-direction: column; padding: 18px 14px 12px; overflow-y: auto; overflow-x: visible;
  background: linear-gradient(180deg, #0a2618, #071b14); border-right: 1px solid rgba(175,140,98,.18); color: rgba(242,241,223,.7); }
.side-backdrop { display: none; }
.side-sec { padding: 0 10px; margin: 0 0 8px; color: var(--sand); font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.side-sec.serif { text-transform: uppercase; letter-spacing: .2em; font-size: 10.5px; font-weight: 600; color: var(--sand); margin-bottom: 10px; }
.side-div { height: 1px; margin: 12px 0 16px; background: linear-gradient(90deg, rgba(175,140,98,.6), rgba(175,140,98,.05)); flex: none; }
.short { display: flex; align-items: center; gap: 12px; width: 100%; height: 38px; padding: 0 10px; border-radius: 9px; color: rgba(242,241,223,.7); font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s; }
.short svg { width: 17px; height: 17px; color: rgba(242,241,223,.55); }
.short:hover { background: rgba(242,241,223,.06); color: var(--ivory); }
.short:hover svg { color: var(--sand); }

.mod { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 10px; border-radius: 12px; color: rgba(242,241,223,.8); font-size: 14px; white-space: nowrap; transition: background .15s; }
.mod .ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(242,241,223,.06); box-shadow: inset 0 0 0 1px rgba(242,241,223,.12); color: rgba(242,241,223,.75); transition: background .15s, color .15s, box-shadow .15s; }
.mod .ico svg { width: 16px; height: 16px; }
.mod .chev { margin-left: auto; width: 14px; height: 14px; opacity: .45; transition: transform .2s; }
.mod:hover { background: rgba(242,241,223,.05); color: var(--ivory); }
.mod-group.open > .mod { background: rgba(175,140,98,.12); color: var(--ivory); font-weight: 600; }
.mod-group.open > .mod .ico { background: var(--sand); color: #241a0e; box-shadow: none; }
.mod-group.open > .mod .chev { transform: rotate(180deg); opacity: .8; }
.mod-group { flex: none; }
.mod-pages { display: none; flex-direction: column; gap: 2px; padding: 4px 0 8px 22px; }
.mod-group.open > .mod-pages { display: flex; }
.pg { position: relative; display: flex; align-items: center; width: 100%; height: 34px; padding: 0 12px 0 34px; border-radius: 8px; color: rgba(242,241,223,.6); font-size: 13px; white-space: nowrap; transition: background .15s, color .15s; }
.pg:hover { background: rgba(242,241,223,.05); color: var(--ivory); }
.pg.active { background: rgba(242,241,223,.08); color: var(--ivory); font-weight: 600; box-shadow: inset 3px 0 0 var(--sand); }
.pg.parent.active { font-weight: 500; }
.pg .n { margin-left: auto; font-family: var(--mono); font-size: 10.5px; opacity: .55; }
.pg .chev { margin-left: auto; width: 14px; height: 14px; opacity: .55; }
.pg .n + .chev { margin-left: 8px; }
.side-foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid rgba(175,140,98,.18); display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(242,241,223,.7); flex: none; }
.side-foot .avatar { width: 28px; height: 28px; font-size: 11.5px; }
.side-foot b { display: block; color: var(--ivory); font-weight: 600; }
.side-foot small { display: block; font-size: 11px; color: rgba(242,241,223,.5); }

/* Cartão flutuante das subpáginas */
.flyout { position: fixed; z-index: 40; width: 270px; padding: 14px 8px 8px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(7,27,20,.45), 0 0 0 1px rgba(175,140,98,.15); animation: cardIn .16s cubic-bezier(.22,1,.36,1) both; }
.flyout[hidden] { display: none; }
.flyout::before { content: ""; position: absolute; left: -7px; top: 26px; width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.flyout h4 { margin: 0 8px 10px; font-weight: 700; font-size: 14px; color: var(--ink); }
.flyout button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13px; text-align: left; }
.flyout button svg { width: 15px; height: 15px; color: var(--ink-3); }
.flyout button .n { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.flyout button:hover { background: #f3f5f3; color: var(--ink); }
.flyout button.active { background: var(--green-100); color: var(--green); font-weight: 600; }
.flyout button.active svg { color: var(--green); }

.main { padding: calc(var(--top) + 22px) 22px 40px calc(var(--side) + 22px); }
.page { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Cabeçalho de página ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 4px 4px 0; }
.page-title { display: flex; align-items: center; gap: 12px; }
.title-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--green-100); color: var(--green); flex: none; }
.title-icon svg { width: 20px; height: 20px; }
h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.help-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink-4); color: var(--ink-3); font-size: 10px; font-weight: 600; cursor: help; }
.page-sub { margin: 3px 0 0; color: var(--ink-3); font-size: 13px; }
.crumb { margin: 0 0 2px; color: var(--sand); font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Botões ---------- */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; background: var(--green); color: #fff; font-weight: 600; font-size: 13.5px; transition: background .15s, transform .05s; }
.btn-primary svg { width: 16px; height: 16px; stroke-width: 2.2; }
.btn-primary:hover { background: var(--green-800); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
.btn-ghost:hover { border-color: var(--ink-4); color: var(--ink); }
.btn-danger { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid #f0c9c5; background: #fff; color: var(--red); font-weight: 500; font-size: 13.5px; }
.btn-danger svg { width: 16px; height: 16px; }
.btn-danger:hover { background: var(--red-50); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 10px; }
.card-meta { color: var(--ink-3); font-size: 12.5px; }
.card-meta b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 7px; border-radius: 999px; background: #eceeec; color: var(--ink-2); font-size: 11.5px; font-weight: 600; font-family: var(--mono); }

/* Filtros */
.filters-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 20px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.filters-head svg { width: 15px; height: 15px; color: var(--ink-3); }
.filters-head .chev { transition: transform .2s; }
.filters.collapsed .chev { transform: rotate(-90deg); }
.filters.collapsed .filters-body { display: none; }
.filters-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--green); color: #fff; font-size: 10.5px; font-family: var(--mono); }
.filters-body { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 18px; }
.search-field { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-3); transition: border-color .15s, box-shadow .15s; }
.search-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,81,37,.1); color: var(--ink); }
.search-field svg { width: 16px; height: 16px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 13.5px; color: var(--ink); }
.filters-row { display: flex; gap: 10px; flex-wrap: wrap; }
select { height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c847e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 15px; appearance: none; min-width: 220px; font-size: 13.5px; color: var(--ink); }
select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,81,37,.1); }

/* Tabela */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1120px; }
th { padding: 10px 14px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line); text-align: left; color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 16px; }
td { padding: 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: #fafbfa; }
tbody tr:last-child td { border-bottom: 0; }
td.desc { color: var(--ink); font-weight: 500; white-space: normal; min-width: 260px; max-width: 380px; }
.sub { display: block; margin-top: 2px; color: var(--ink-3); font-weight: 400; font-size: 12px; }
.plq { font-family: var(--mono); font-weight: 600; font-size: 12.5px; color: var(--green); white-space: nowrap; }
.dash { color: var(--ink-4); }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.pill.state-Novo { border-color: #cfe3d3; color: var(--green); }
.pill.state-Ruim { border-color: #f0c9c5; color: var(--red); }
.pill.state-Regular { border-color: #f0dcb0; color: var(--amber); }
.status { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.status.ativo { background: var(--green); color: #fff; }
.status.manutencao { background: var(--amber-50); color: var(--amber); }
.status.baixado { background: #eceeec; color: var(--ink-3); }
.warn { color: var(--red); font-weight: 700; }
.actions { display: flex; justify-content: flex-end; gap: 2px; }
.act { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: var(--ink-2); transition: background .12s, color .12s; }
.act svg { width: 16px; height: 16px; }
.act:hover { background: #f0f2f0; color: var(--ink); }
.act.red { color: var(--red); }
.act.red:hover { background: var(--red-50); }
.act.ok { color: var(--olive); }
.empty { text-align: center; padding: 48px 20px !important; color: var(--ink-3); line-height: 1.7; cursor: default; }
.empty b { color: var(--green); font-family: var(--mono); font-weight: 600; }

/* Cadastros auxiliares */
.tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ink-3); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: color .15s, border-color .15s; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--green); border-color: var(--green); }
.tab.active .count { background: var(--green-100); color: var(--green); }
.aux-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
.aux-add { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; }
.aux-add input { flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 13.5px; }
.aux-add input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,81,37,.1); }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--green); }
.aux-table { min-width: 0; }
.aux-table tbody tr { cursor: default; }
.aux-table td.name { color: var(--ink); font-weight: 500; width: 60%; }
.aux-table tr.inativo td.name { color: var(--ink-3); font-weight: 400; }
.inline-edit { display: flex; gap: 6px; align-items: center; max-width: 480px; }
.inline-edit input { flex: 1; height: 34px; padding: 0 10px; border: 1px solid var(--green); border-radius: 8px; box-shadow: 0 0 0 3px rgba(27,81,37,.1); font-size: 13.5px; }
.inline-edit input:focus { outline: none; }
.status.inativo { background: #eceeec; color: var(--ink-3); }
.act:disabled { opacity: .35; cursor: not-allowed; }
.act:disabled:hover { background: none; }

/* select com botão de inclusão rápida */
.sel-add { display: flex; gap: 6px; }
.sel-add select { flex: 1; }
.add-inline { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--green); transition: background .12s, border-color .12s; }
.add-inline svg { width: 16px; height: 16px; stroke-width: 2.2; }
.add-inline:hover { background: var(--green-50); border-color: #cfe3d3; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(13,30,18,.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-overlay[hidden] { display: none; }
.modal-card { width: min(820px, 100%); max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.35); animation: cardIn .3s cubic-bezier(.22,1,.36,1) both; }
.asset-form { display: flex; flex-direction: column; min-height: 0; }
.form-head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.form-head .page-title { flex: 1; }
.form-head h2 { font-size: 19px; font-weight: 700; }
.modal-close { color: var(--ink-3); }
.modal-close:hover { background: #f0f2f0; color: var(--ink); }
.plate { text-align: right; padding-right: 6px; }
.plate span { display: block; color: var(--ink-3); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.plate b { display: block; font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--green); line-height: 1.3; }
.plate.pending b { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--ink-3); max-width: 190px; padding-top: 3px; }
.form-body { overflow: auto; padding: 18px 22px 6px; display: flex; flex-direction: column; gap: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; min-width: 0; }
legend { padding: 0 8px; color: var(--ink-2); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid .span2 { grid-column: 1 / -1; }
.asset-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); min-width: 0; }
.asset-form label em { color: var(--red); font-style: normal; }
.asset-form input, .asset-form select, .asset-form textarea { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background-color: #fff; color: var(--ink); font-size: 13.5px; font-weight: 400; }
.asset-form select { padding-right: 34px; }
.asset-form label.check { flex-direction: row; align-items: center; gap: 9px; font-size: 13px; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.asset-form label.check input { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--green); }
.asset-form textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.asset-form input:focus, .asset-form select:focus, .asset-form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,81,37,.1); }
.asset-form input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,53,43,.1); }
.asset-form select { min-width: 0; }
.modal-actions { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fafbfa; }
.spacer { flex: 1; }

/* Menu do usuário (topo) */
.user-wrap { position: relative; }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 240px; padding: 6px; border-radius: 12px; background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 18px 50px -12px rgba(0,0,0,.35); animation: cardIn .18s cubic-bezier(.22,1,.36,1) both; }
.user-menu[hidden] { display: none; }
.user-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.user-menu-head b { display: block; font-size: 14px; }
.user-menu-head span { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12px; }
.user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; text-align: left; }
.user-menu button svg { width: 16px; height: 16px; color: var(--ink-3); }
.user-menu button:hover { background: #f3f5f3; color: var(--ink); }

/* Usuários */
.pill.perfil-admin { border-color: #d9c7ab; color: #7a5a2e; background: #fbf6ee; }
.pill.perfil-operador { border-color: #cfe3d3; color: var(--green); background: var(--green-50); }
.pill.perfil-leitura { color: var(--ink-3); }
.users-table td.name { color: var(--ink); font-weight: 500; }
.you { margin-left: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sand); }
.modal-card.sm { width: min(560px, 100%); }
.pw-block { display: flex; gap: 8px; align-items: flex-end; }
.pw-block label { flex: 1; }
.pw-block .btn-ghost { height: 38px; flex: none; }
.pw-block .btn-ghost svg { width: 15px; height: 15px; }
.hint { display: block; margin: 4px 0 0; color: var(--ink-3); font-size: 12px; font-weight: 400; line-height: 1.5; }
.asset-form fieldset:disabled input, .asset-form fieldset:disabled select, .asset-form fieldset:disabled textarea { background: #fafbfa; color: var(--ink-2); }
.asset-form fieldset:disabled .add-inline { display: none; }

/* Permissões: leitura não vê ações de escrita; só admin vê usuários */
body[data-perfil="leitura"] .only-write { display: none !important; }
body:not([data-perfil="admin"]) .only-admin { display: none !important; }

/* Abas do modal do ativo e painéis */
.modal-tabs { padding: 0 16px; flex: none; background: #fff; }
.modal-tabs .tab svg { width: 15px; height: 15px; }
.pane-lock { margin: 0; padding: 14px 16px; border-radius: 10px; background: #fafbfa; border: 1px dashed var(--line); color: var(--ink-3); font-size: 13px; }
.upload-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.upload-bar .btn-primary, .upload-bar .btn-ghost { cursor: pointer; flex-direction: row; align-items: center; font-size: 13.5px; text-transform: none; letter-spacing: 0; min-width: 0; }
.upload-bar .btn-primary { color: #fff; font-weight: 600; }
.upload-bar .btn-ghost { color: var(--ink-2); font-weight: 500; }
.upload-bar .btn-ghost svg { width: 16px; height: 16px; }
.upload-status { color: var(--green); font-size: 12.5px; font-weight: 500; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumb { margin: 0; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #eef0ee; cursor: zoom-in; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.thumb:hover img { transform: scale(1.04); }
.thumb figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-empty, .doc-empty { grid-column: 1 / -1; text-align: center; padding: 34px 16px; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; line-height: 1.6; }
.doc-list { display: flex; flex-direction: column; }
.doc { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line-2); }
.doc:last-child { border-bottom: 0; }
.doc-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--green-50); color: var(--green); flex: none; }
.doc-ico b { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; }
.doc-main { flex: 1; min-width: 0; }
.doc-main a { display: block; color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-main a:hover { color: var(--green); text-decoration: underline; }
.doc-main .sub { margin-top: 2px; }
.doc .pill { flex: none; }

/* Mini-modal e lightbox ficam acima do modal do ativo */
.modal-overlay.mini { z-index: 120; }
.modal-card.xs { width: min(420px, 100%); }
.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(4,12,8,.92); display: flex; align-items: center; justify-content: center; padding: 56px 72px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox figcaption { display: flex; align-items: center; gap: 14px; color: rgba(242,241,223,.85); font-size: 13px; }
.lb-actions { display: flex; gap: 4px; }
.lb-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: rgba(242,241,223,.8); }
.lb-btn svg { width: 17px; height: 17px; }
.lb-btn:hover { background: rgba(242,241,223,.12); color: #fff; }
.lb-btn.red:hover { color: #f0a090; }
.lb-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 10px; color: rgba(242,241,223,.8); display: grid; place-items: center; }
.lb-close:hover { background: rgba(242,241,223,.12); color: #fff; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: rgba(242,241,223,.8); background: rgba(242,241,223,.08); }
.lb-nav:hover { background: rgba(242,241,223,.18); color: #fff; }
.lb-nav.prev { left: 16px; } .lb-nav.prev svg { transform: rotate(90deg); }
.lb-nav.next { right: 16px; } .lb-nav.next svg { transform: rotate(-90deg); }
.lb-nav:disabled { opacity: .25; cursor: default; }
@media (max-width: 720px) { .lightbox { padding: 56px 12px; } .lb-nav { display: none; } }
.att { display: inline-flex; gap: 10px; align-items: center; }
.att i { display: inline-flex; align-items: center; gap: 3px; font-style: normal; }
.att svg { width: 12px; height: 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 26px; left: 50%; z-index: 200; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px;
  box-shadow: 0 14px 40px -8px rgba(0,0,0,.4); font-size: 13.5px; font-weight: 500; opacity: 0; transform: translate(-50%, 12px); transition: opacity .25s, transform .25s cubic-bezier(.22,1,.36,1); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .toast-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--olive); color: #fff; font-size: 11px; font-weight: 800; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) { .signature { display: none; } .user-name { display: none; } }
@media (max-width: 900px) { .global-search { display: none; } }
@media (max-width: 720px) {
  :root { --side: 0px; }
  .menu-btn { display: grid; }
  .side { width: 296px; transform: translateX(-100%); transition: transform .22s cubic-bezier(.22,1,.36,1); box-shadow: 30px 0 60px -30px rgba(0,0,0,.6); }
  body.side-open .side { transform: none; }
  .side-backdrop { display: block; position: fixed; inset: var(--top) 0 0 0; z-index: 25; background: rgba(4,12,8,.5); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.side-open .side-backdrop { opacity: 1; pointer-events: auto; }
  .main { padding: calc(var(--top) + 16px) 14px 32px; }
  .brand-module { font-size: 18px; }
  .grid { grid-template-columns: 1fr; }
  .form-head { flex-wrap: wrap; }
  .plate { text-align: left; order: 3; width: 100%; }
  select { min-width: 0; flex: 1 1 160px; }
}
a.act { text-decoration: none; }

/* ---------- Manutenção ---------- */
.legend-note { margin-left: 8px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 11px; }
.hint-inline { color: var(--ink-3); font-weight: 400; font-size: 11px; }
table.min0 { min-width: 900px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .05s; }
.kpi:hover { border-color: var(--ink-4); }
.kpi:active { transform: translateY(1px); }
.kpi b { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.kpi.red b { color: var(--red); } .kpi.amber b { color: var(--amber); } .kpi.green b { color: var(--green); } .kpi.blue b { color: #2b5f8f; } .kpi.gray b { color: var(--ink-3); }
.kpi.active { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.sem { display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sem::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sem.vencida { background: var(--red-50); color: var(--red); }
.sem.tolerancia { background: #fdf3e1; color: #b7791f; }
.sem.proxima { background: #eef4fb; color: #2b5f8f; }
.sem.emDia { background: var(--green-100); color: var(--green); }
.sem.semPeriodicidade { background: #eceeec; color: var(--ink-3); }
.status.aberta { background: #eef4fb; color: #2b5f8f; }
.status.agendada { background: #fdf3e1; color: #b7791f; }
.status.execucao { background: var(--green-100); color: var(--green); }
.status.concluida { background: var(--green); color: #fff; }
.status.cancelada { background: #eceeec; color: var(--ink-3); }
.pill.res-aprovado { border-color: #cfe3d3; color: var(--green); }
.pill.res-ressalva { border-color: #f0dcb0; color: var(--amber); }
.pill.res-reprovado { border-color: #f0c9c5; color: var(--red); }
.pill.nat-corretiva { border-color: #f0c9c5; color: var(--red); }
.pill.nat-preventiva { border-color: #cfe3d3; color: var(--green); }
.pill.nat-calibracao { border-color: #cfe0f0; color: #2b5f8f; }
.n.alert { background: var(--red); color: #fff; opacity: 1; padding: 1px 6px; border-radius: 999px; }

/* modal da OS */
.os-status-bar { display: flex; align-items: center; gap: 6px; padding: 10px 22px; border-bottom: 1px solid var(--line); background: #fafbfa; font-size: 12px; color: var(--ink-3); overflow-x: auto; }
.os-step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.os-step.done { color: var(--green); }
.os-step.now { background: var(--green); color: #fff; font-weight: 600; }
.os-step.off { color: var(--ink-4); }
.os-step + .os-step::before { content: "›"; margin-right: 6px; color: var(--ink-4); }
.os-status-bar .lock { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-weight: 600; }
.os-status-bar .lock svg { width: 14px; height: 14px; }
.checklist { display: flex; flex-direction: column; gap: 4px; }
.ck { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; }
.ck:nth-child(odd) { background: #fafbfa; }
.ck .txt { font-size: 13px; color: var(--ink); }
.ck .obs { grid-column: 1 / -1; height: 30px !important; font-size: 12px !important; }
.ck-opts { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ck-opts button { height: 28px; padding: 0 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); border-right: 1px solid var(--line); background: #fff; }
.ck-opts button:last-child { border-right: 0; }
.ck-opts button.on-ok { background: var(--green); color: #fff; }
.ck-opts button.on-nok { background: var(--red); color: #fff; }
.ck-opts button.on-na { background: #eceeec; color: var(--ink-2); }
.ck-opts button:disabled { cursor: default; }
.checklist-empty { color: var(--ink-3); font-size: 12.5px; padding: 6px 8px; }
.os-anexos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.os-anexo { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.os-anexo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; cursor: zoom-in; }
.os-anexo .doc-ico { margin: 12px auto 0; width: 44px; height: 44px; }
.os-anexo .meta { padding: 8px 10px; font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.os-anexo .meta a { color: var(--ink); font-weight: 500; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-anexo .meta .pill { margin-top: 4px; height: 20px; font-size: 10.5px; }
.os-anexo .acts { display: flex; justify-content: flex-end; padding: 0 6px 6px; }
.adendo { padding: 10px 12px; border-left: 3px solid var(--sand); background: #fbf8f3; border-radius: 0 8px 8px 0; margin-bottom: 8px; font-size: 13px; }
.adendo small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 11.5px; }
.adendo-add { display: flex; gap: 8px; margin-top: 6px; }
.adendo-add input { flex: 1; }
.readonly fieldset { pointer-events: none; }
.readonly fieldset#os_fs5, .readonly fieldset#os_fs6 { pointer-events: auto; }
.readonly input, .readonly select, .readonly textarea { background: #fafbfa !important; color: var(--ink-2) !important; }
.manut-sec { margin-bottom: 18px; }
.manut-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.manut-sec h3 .btn-ghost { margin-left: auto; height: 30px; font-size: 12.5px; }
.tl { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 8px; }
.tl-item:hover { background: #fafbfa; }
.tl-item .num { color: var(--green); font-weight: 600; }
.tl-item .desc { font-size: 13px; color: var(--ink); }
.tl-item .desc .sub { margin-top: 2px; }
#osModal, #planoModal, #tipoModal, #auxModal, #dossieModal { z-index: 110; }

/* Help com hover ao lado do rótulo de campos menos óbvios */
.help { position: relative; display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 4px; border-radius: 50%; border: 1.5px solid var(--ink-4); color: var(--ink-3); font-size: 9.5px; font-weight: 700; font-style: normal; letter-spacing: 0; text-transform: none; cursor: help; vertical-align: middle; }
.help:hover { border-color: var(--green); color: var(--green); }
.help::after { content: attr(data-help); position: absolute; left: -8px; bottom: calc(100% + 9px); transform: translateY(3px); z-index: 130; width: 250px; padding: 8px 11px; border-radius: 8px;
  background: #0b2418; color: var(--ivory); border: 1px solid rgba(175,140,98,.45); box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal; text-transform: none; letter-spacing: 0;
  opacity: 0; pointer-events: none; transition: opacity .12s, transform .15s; }
.help::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 4px); margin-left: -5px; border: 5px solid transparent; border-top-color: #0b2418; opacity: 0; transition: opacity .12s; z-index: 131; }
.help:hover::after, .help:hover::before { opacity: 1; transform: none; transition-delay: .15s; }
.asset-form label.check .help { margin-left: 2px; }

/* ---------- Formulários: estilo "seções abertas" (rótulo em caixa-alta, campo com preenchimento claro) ---------- */
.modal-card { width: min(1040px, 100%); }
.modal-card.sm { width: min(640px, 100%); }
.modal-card.xs { width: min(440px, 100%); }
.form-head { padding: 22px 28px 16px; }
.form-body { padding: 22px 28px 8px; gap: 0; }
.modal-actions { padding: 14px 28px; }
.asset-form fieldset { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 24px; margin: 0 0 22px; }
.asset-form fieldset:last-child { border-bottom: 0; margin-bottom: 8px; }
.asset-form legend { padding: 0; margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: 0; text-transform: none; }
.asset-form legend .legend-note { display: block; margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.asset-form .grid { grid-template-columns: repeat(3, 1fr); gap: 16px 18px; }
.modal-card.sm .asset-form .grid, .modal-card.xs .asset-form .grid { grid-template-columns: 1fr 1fr; }
.modal-card.xs .asset-form .grid { grid-template-columns: 1fr; }
.asset-form label { gap: 7px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.asset-form label em { color: var(--red); }
.asset-form input, .asset-form select, .asset-form textarea { height: 40px; padding: 0 12px; background-color: #f6f7f6; border-color: #e4e8e4; border-radius: 8px; font-size: 13.5px; color: var(--ink); transition: background-color .15s, border-color .15s, box-shadow .15s; }
.asset-form textarea { height: auto; padding: 10px 12px; }
.asset-form input:hover, .asset-form select:hover, .asset-form textarea:hover { border-color: #cfd6cf; }
.asset-form input:focus, .asset-form select:focus, .asset-form textarea:focus { background-color: #fff; border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,81,37,.1); }
.asset-form input::placeholder, .asset-form textarea::placeholder { color: var(--ink-4); }
.asset-form label.check { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; color: var(--ink-2); align-self: end; min-height: 40px; }
.asset-form .pw-block { align-items: flex-end; }
.asset-form .hint { text-transform: none; letter-spacing: 0; }
.asset-form .pane-lock { margin-bottom: 14px; }
.upload-bar .btn-primary, .upload-bar .btn-ghost { height: 38px; }
.sel-add .add-inline { height: 40px; width: 40px; background: #f6f7f6; border-color: #e4e8e4; }
.plate b { font-size: 22px; }
@media (max-width: 900px) { .asset-form .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .asset-form .grid, .modal-card.sm .asset-form .grid { grid-template-columns: 1fr; } .form-head, .form-body, .modal-actions { padding-left: 18px; padding-right: 18px; } }

/* Plaqueta vinculável */
.plate-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--green); font-size: 12px; font-weight: 600; }
.plate-link svg { width: 14px; height: 14px; }
.plate-link:hover { background: var(--green-50); border-color: #cfe3d3; }
.plate.none b { color: var(--ink-4); font-family: var(--sans); font-weight: 500; font-size: 14px; }
.pill.noplq { border-style: dashed; color: var(--ink-3); }
.qr-scan { position: fixed; inset: 0; z-index: 140; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.qr-scan[hidden] { display: none; }
.qr-scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qr-frame { position: relative; width: min(70vw, 300px); aspect-ratio: 1; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); border: 2px solid var(--sand); }
.qr-msg { position: relative; margin: 0; color: var(--ivory); font-size: 14px; text-align: center; padding: 0 20px; }
.qr-scan .btn-ghost { position: relative; }

/* Ficha do cadastro auxiliar */
.aux-table td.name { cursor: pointer; }
.aux-table td.name:hover { color: var(--green); }
table.aux-link { min-width: 0; }
table.aux-link tbody tr { cursor: pointer; }
.aux-link .empty { padding: 22px !important; }

/* Situação da garantia */
.gar { font-family: var(--sans); display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; margin-top: 2px; }
.gar::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gar.vigente { background: var(--green-100); color: var(--green); }
.gar.vencendo { background: #fdf3e1; color: var(--amber); }
.gar.vencida { background: #fdecea; color: var(--red); }
.gar.sem { background: transparent; border: 1px dashed var(--line); color: var(--ink-3); font-weight: 500; }
.gar.sem::before { display: none; }
.page-sub .gar { vertical-align: middle; }
