/* Seu Lóza · Plataforma real — login de verdade (rl-), selos do menu e Configurações › Usuários e acessos (us-).
   Só tokens de tokens.css; o tema claro fica em tema-claro.css (o login continua uma "ilha escura" nos dois temas). */

/* ============ Login ============ */
.rl-view[hidden], .rl-msg[hidden], .rl-quem[hidden], #la-alt[hidden] { display: none !important; }
.rl-view { display: block; animation: rise .35s var(--ease) both; }
.login-card .rl-view h2 { font-size: var(--fs-xl); }
.login-row { justify-content: flex-end; }
.rl-link { font-size: var(--fs-sm); color: var(--tx-2); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; padding: 4px 0; }
.rl-link:hover, .rl-link:focus-visible { color: var(--red-tx); text-decoration-color: currentColor; }
.rl-voltar { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--tx-3); }
.rl-voltar:hover, .rl-voltar:focus-visible { color: var(--tx); background: var(--s3); }
.rl-voltar svg { width: 16px; height: 16px; }
.rl-msg { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; margin: -10px 0 16px; border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 1.45; background: var(--crit-soft); color: var(--tx); border: 1px solid rgba(255, 75, 92, .3); }
.rl-msg svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--crit); }
.rl-msg.ok { background: var(--ok-soft); border-color: rgba(52, 209, 127, .3); } .rl-msg.ok svg { color: var(--ok); }
.rl-msg.info { background: var(--info-soft); border-color: rgba(92, 168, 255, .3); } .rl-msg.info svg { color: var(--info); }
.field input[aria-invalid="true"] { border-color: rgba(255, 75, 92, .7); }
.rl-regras { list-style: none; padding: 0; margin: -2px 0 20px; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--tx-3); }
.rl-regras li { display: flex; align-items: center; gap: 8px; }
.rl-regras svg { width: 15px; height: 15px; flex: none; }
.rl-regras li.ok { color: var(--ok); }
.rl-oculto { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; pointer-events: none; }
.rl-aviso { text-align: left; }
.rl-aviso__ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; background: var(--red-soft); color: var(--red-tx); }
.rl-aviso__ic.erro { background: var(--warn-soft); color: var(--warn); }
.rl-aviso__ic svg { width: 24px; height: 24px; }
.rl-aviso .sub { margin-bottom: 14px; }
.rl-quem { font-size: var(--fs-xs); color: var(--tx-3); margin: 0 0 20px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.rl-treme { animation: rl-treme .42s var(--ease) 1; }
@keyframes rl-treme { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .rl-treme, .rl-view { animation: none; } }
.login__live .live-chip { font-size: var(--fs-xs); }
.login-card .btn.loading { opacity: .9; }
@media (max-width: 900px) {
  .login__brand { min-height: 0; }
  .login__claim h1 { font-size: 26px; }
  .login__claim p { display: none; }
}
@media (max-width: 480px) {
  .login-card { padding: 26px 18px 20px; border-radius: var(--r-lg); }
  .login__brand-inner { padding: 18px 16px; gap: 12px; }
  .login__brand .logo { width: 120px; }
  .login__claim .eyebrow { margin-bottom: 10px; }
  .login__claim h1 { font-size: 22px; }
}

/* faixa do modo de teste (só com ?mock=1 em localhost) */
.rl-mock { position: fixed; z-index: 990; left: 50%; bottom: 8px; transform: translateX(-50%); pointer-events: none; max-width: calc(100vw - 24px);
  padding: 4px 12px; border-radius: var(--r-pill); background: var(--warn); color: #1C1300; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 18px -8px rgba(0,0,0,.6); }

/* ============ Menu e estrutura ============ */
.nav-item .badge.demo { min-width: 0; height: 18px; padding: 0 7px; font-size: 10px; font-weight: 500; background: var(--warn-soft); color: var(--warn); }
.crumb-demo { margin-left: 8px; height: 22px; font-size: 10.5px; }
.crumbs { min-width: 0; }
.sidebar__head .env[hidden] { display: none; }
.sidebar__demo:empty { display: none; }
.user-card:empty { display: none; }
.user-card .who { overflow: hidden; }
.user-card .who, .user-card .who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu__h small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu button.user-menu__sair svg { color: var(--red-tx); }
.soon-volta { margin-top: 22px; }

/* ============ Configurações › Usuários e acessos ============ */
.us { display: grid; gap: 14px; min-width: 0; }
.us-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.us-bar__t { display: grid; gap: 2px; min-width: 0; }
.us-bar__t h2 { font-size: var(--fs-lg); font-weight: 600; }
.us-bar__t small { font-size: var(--fs-xs); }
.us-bar__a { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; min-width: 0; }
.us-busca { width: 260px; max-width: 100%; }
.us-filtros { display: flex; gap: 6px; flex-wrap: wrap; }
.us-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s1); font-size: var(--fs-xs); color: var(--tx-2); }
.us-chip b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tx-3); }
.us-chip:hover { border-color: var(--line-3); color: var(--tx); }
.us-chip.on { background: var(--red-soft); border-color: var(--red-line); color: var(--tx); }
.us-chip.on b { color: var(--red-tx); }

.us-lista { overflow: hidden; }
.us-row { display: grid; grid-template-columns: minmax(220px, 2.2fr) minmax(150px, 1.3fr) minmax(150px, 1.3fr) minmax(110px, 1fr) 124px; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); min-width: 0; }
.us-row:first-child { border-top: 0; }
.us-row.head { font-size: var(--fs-2xs); letter-spacing: .06em; text-transform: uppercase; color: var(--tx-4); padding-top: 12px; padding-bottom: 10px; background: var(--bg-2); }
.us-row:not(.head) { cursor: pointer; transition: background var(--t-fast); }
.us-row:not(.head):hover { background: var(--s2); }
.us-row.off .us-p b, .us-row.off .us-p .avatar { opacity: .55; }
.us-p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.us-p > div { display: grid; min-width: 0; }
.us-p b { font-weight: 500; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-p small { font-size: var(--fs-xs); color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-p em { font-style: normal; color: var(--tx-4); font-size: var(--fs-2xs); }
.us-tags { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.us-tags .pill { height: 22px; font-size: 11px; }
.us-ult { font-size: var(--fs-xs); color: var(--tx-2); }
.us-ult.nunca { color: var(--tx-4); }
.us-row .r { text-align: right; }
.us-vazio { padding: 36px 20px; text-align: center; color: var(--tx-3); font-size: var(--fs-sm); display: grid; gap: 10px; justify-items: center; }
.us-vazio svg { width: 26px; height: 26px; color: var(--tx-4); }
.us-carregando { display: grid; gap: 1px; }
.us-carregando i { display: block; height: 58px; background: linear-gradient(90deg, var(--s1), var(--s2), var(--s1)); background-size: 200% 100%; animation: us-brilho 1.2s linear infinite; }
@keyframes us-brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.us-nota { font-size: var(--fs-xs); color: var(--tx-3); display: flex; gap: 8px; align-items: flex-start; }
.us-nota svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

@media (max-width: 900px) {
  .us-row.head { display: none; }
  .us-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "p a" "t t" "s s" "u u"; gap: 8px 12px; padding: 14px 16px; }
  .us-row > :nth-child(1) { grid-area: p; }
  .us-row > :nth-child(2) { grid-area: t; }
  .us-row > :nth-child(3) { grid-area: s; }
  .us-row > :nth-child(4) { grid-area: u; }
  .us-row > :nth-child(5) { grid-area: a; }
  .us-ult::before { content: "Último acesso: "; color: var(--tx-4); }
  .us-busca { width: 100%; }
  .us-bar__a { width: 100%; }
  .us-bar__a .btn { flex: 1; }
}

/* gaveta do usuário */
.us-drawer { width: min(620px, 100vw); }
.us-form { display: grid; gap: 18px; }
.us-form .input, .us-form .select { width: 100%; }
.us-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.us-f2 > div { min-width: 0; }
.us-sec { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.us-sec__h { display: grid; gap: 2px; }
.us-sec__h h4 { font-size: var(--fs-sm); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.us-sec__h h4 svg { width: 15px; height: 15px; color: var(--tx-3); }
.us-sec__h small { font-size: var(--fs-xs); color: var(--tx-3); }
.us-perfis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.us-perfil { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; align-items: center; text-align: left; padding: 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s1); transition: border-color var(--t-fast), background var(--t-fast); min-width: 0; }
.us-perfil:hover { border-color: var(--line-3); }
.us-perfil.on { border-color: var(--red-line); background: var(--red-soft); box-shadow: 0 0 0 3px var(--red-soft); }
.us-perfil > svg { grid-row: span 2; width: 18px; height: 18px; color: var(--tx-3); justify-self: center; }
.us-perfil.on > svg { color: var(--red-tx); }
.us-perfil b { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-perfil small { font-size: var(--fs-2xs); color: var(--tx-3); line-height: 1.35; }
.us-grupo { display: grid; gap: 6px; min-width: 0; }
.us-grupo > small { font-size: var(--fs-2xs); letter-spacing: .08em; text-transform: uppercase; color: var(--tx-4); }
.us-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.us-chk { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--s1); font-size: var(--fs-sm); color: var(--tx-2); cursor: pointer; user-select: none; max-width: 100%; }
.us-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.us-chk i { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-3); flex: none; display: grid; place-items: center; transition: background var(--t-fast), border-color var(--t-fast); }
.us-chk i::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.us-chk input:checked + i { background: var(--red); border-color: var(--red); }
.us-chk input:checked + i::after { opacity: 1; }
.us-chk input:checked ~ span { color: var(--tx); }
.us-chk:has(input:checked) { border-color: var(--red-line); }
.us-chk input:focus-visible + i { outline: 2px solid var(--red-tx); outline-offset: 2px; }
.us-chk input:disabled ~ * { opacity: .5; }
.us-chk:has(input:disabled) { cursor: not-allowed; }
.us-chk span small { color: var(--tx-4); font-size: var(--fs-2xs); margin-left: 4px; }
.us-chk.total { width: 100%; }
.us-sws { display: grid; gap: 10px; }
.us-sw { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s1); cursor: pointer; min-width: 0; }
.us-sw > span { display: grid; gap: 2px; min-width: 0; }
.us-sw b { font-size: var(--fs-sm); font-weight: 500; }
.us-sw small { font-size: var(--fs-xs); color: var(--tx-3); }
.us-sw input { position: absolute; opacity: 0; pointer-events: none; }
.us-sw:has(input:disabled) { opacity: .7; cursor: not-allowed; }
.us-conta { display: flex; flex-wrap: wrap; gap: 8px; }
.us-conta .btn-perigo { color: var(--crit); }
.us-conta .btn-perigo:hover { background: var(--crit-soft); border-color: rgba(255, 75, 92, .35); }
.us-erro { margin: 0; }
.us-erro[hidden] { display: none; }
@media (max-width: 560px) {
  .us-f2 { grid-template-columns: 1fr; }
  .us-perfis { grid-template-columns: 1fr 1fr; }
  .drawer.us-drawer .drawer__foot .btn { flex: 1; }
}

/* senha provisória e confirmações */
.modal.us-modal { width: min(520px, calc(100vw - 32px)); }
.us-modal .modal__body { display: grid; gap: 14px; }
.us-modal .modal__body p { color: var(--tx-2); font-size: var(--fs-sm); }
.us-modal .alert { margin: 0; }
.us-senha { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: var(--r-md); background: var(--bg-2); border: 1px dashed var(--line-3); min-width: 0; }
.us-senha code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 20px; letter-spacing: .08em; color: var(--tx); overflow-wrap: anywhere; user-select: all; }
.us-dados { display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--tx-2); }
.us-dados b { color: var(--tx); font-weight: 500; overflow-wrap: anywhere; }
.kpi__ic.ok { background: var(--ok-soft); color: var(--ok); }
.kpi__ic.crit { background: var(--crit-soft); color: var(--crit); }
.kpi__ic.warn { background: var(--warn-soft); color: var(--warn); }
.btn-perigo-cheio { background: var(--crit); color: #fff; }
.btn-perigo-cheio:hover { filter: brightness(1.08); }
@media (max-width: 480px) {
  .us-senha { flex-wrap: wrap; }
  .us-senha code { font-size: 18px; }
  .us-senha .btn { width: 100%; }
  .us-modal .modal__foot { flex-wrap: wrap; }
  .us-modal .modal__foot .spacer { display: none; }
  .us-modal .modal__foot .btn { flex: 1 1 auto; white-space: normal; height: auto; min-height: 40px; padding-block: 8px; }
}

/* ---------- Parte 2 · dados de verdade (js/real-dados.js) ---------- */
/* indicador discreto no topo: Salvando… / Salvo / Sem conexão */
.rd-sv { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); color: var(--tx-3); white-space: nowrap; border: 1px solid transparent; transition: opacity var(--t-med) var(--ease), color var(--t-fast); flex: none; }
.rd-sv[hidden] { display: none; }
.rd-sv svg { width: 15px; height: 15px; flex: none; }
.rd-sv.salvando svg { animation: rd-gira 1s linear infinite; }
.rd-sv.ok { color: var(--ok); }
.rd-sv.ok.quieto { opacity: .55; }
.rd-sv.off { color: var(--warn); background: var(--warn-soft); border-color: var(--line-2); }
@keyframes rd-gira { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .rd-sv span { display: none; } .rd-sv { padding: 0 6px; } .rd-sv.off span { display: none; } }

/* faixa "Há atualizações · Atualizar" (mudança de outra pessoa com janela aberta ou campo em uso) */
.rd-faixa { position: fixed; z-index: 980; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 14px; border-radius: var(--r-pill); background: var(--s3); border: 1px solid var(--line-3); box-shadow: var(--shadow-2); font-size: var(--fs-sm); color: var(--tx); animation: rd-desce .35s var(--ease) both; }
.rd-faixa[hidden] { display: none; }
.rd-faixa > svg { width: 16px; height: 16px; color: var(--info); flex: none; }
.rd-faixa span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-faixa__x { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--tx-3); flex: none; }
.rd-faixa__x:hover, .rd-faixa__x:focus-visible { background: var(--s4); color: var(--tx); }
.rd-faixa__x svg { width: 15px; height: 15px; }
@keyframes rd-desce { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* carregando o sistema (sessão já aberta, sem a abertura) */
.rd-carga { position: fixed; inset: 0; z-index: 970; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); color: var(--tx-3); font-size: var(--fs-sm); }
.rd-carga img { width: 44px; height: auto; opacity: .9; }

/* estado vazio das telas ("Nenhum cliente ainda · Novo cliente") */
.rd-vazio { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 20px; max-width: 520px; margin: 0 auto; }
.rd-vazio__ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--red-soft); color: var(--red-tx); border: 1px solid var(--red-line); }
.rd-vazio__ic svg { width: 28px; height: 28px; }
.rd-vazio h3 { margin: 6px 0 0; font-size: var(--fs-lg); font-weight: 600; color: var(--tx); }
.rd-vazio p { margin: 0; font-size: var(--fs-sm); color: var(--tx-3); line-height: 1.55; }
.rd-vazio .rd-vazio__acoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.rd-vazio--mini { padding: 28px 16px; }
.rd-vazio--mini .rd-vazio__ic { width: 48px; height: 48px; border-radius: 14px; }
.rd-vazio--mini .rd-vazio__ic svg { width: 22px; height: 22px; }
td .rd-vazio { padding: 36px 16px; }

/* WhatsApp em preparação */
.rd-wa { display: grid; gap: 18px; max-width: 980px; margin: 0 auto; }
.rd-wa__hero { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 28px; }
.rd-wa__ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--wa-soft); color: var(--wa); border: 1px solid var(--line-2); }
.rd-wa__ic svg { width: 34px; height: 34px; }
.rd-wa__hero h1 { margin: 4px 0 6px; font-size: var(--fs-2xl); line-height: 1.15; }
.rd-wa__hero p { margin: 0; color: var(--tx-2); font-size: var(--fs-md); line-height: 1.6; max-width: 640px; }
.rd-wa__acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.rd-wa__grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rd-wa__item { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 16px; }
.rd-wa__item > svg { width: 20px; height: 20px; color: var(--red-tx); margin-top: 2px; }
.rd-wa__item b { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--tx); }
.rd-wa__item small { display: block; margin-top: 3px; font-size: var(--fs-xs); color: var(--tx-3); line-height: 1.5; }
.rd-wa__passos { display: grid; gap: 10px; padding: 20px; }
.rd-wa__passo { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; font-size: var(--fs-sm); color: var(--tx-2); }
.rd-wa__passo i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--s3); color: var(--tx-3); font-style: normal; font-size: var(--fs-xs); font-weight: 600; }
.rd-wa__passo.ok i { background: var(--ok-soft); color: var(--ok); }
.rd-wa__passo.agora i { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 640px) { .rd-wa__hero { grid-template-columns: 1fr; padding: 22px; } .rd-wa__hero h1 { font-size: var(--fs-xl); } }
.rd-carga .spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--red-tx); animation: spin .7s linear infinite; }
.rd-wa { grid-template-columns: minmax(0, 1fr); }
.rd-wa > *, .rd-wa__hero > * { min-width: 0; }
@media (max-width: 480px) {
  .rd-sv.ok.quieto { display: none; }
  .topbar .crumb-demo { display: none; }
}
/* Gestão comercial só leitura (sem a ação "Mexer na Gestão comercial") */
.gc-ro button[disabled], .gc-ro input[disabled], .gc-ro select[disabled], .gc-ro textarea[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Fase 3 · ajustes de OS e Orçamento ---------- */
/* aviso discreto de "somente leitura" (Produtos & fichas, Modelo da OS) */
.rd-soleitura { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s1); color: var(--tx-2); font-size: var(--fs-xs); line-height: 1.5; }
.rd-soleitura > svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--tx-3); }
.rd-soleitura b { color: var(--tx); font-weight: 600; }
.rd-soleitura span { min-width: 0; }
/* aviso para o admin: armazenamento de arquivos (bucket) ainda não ativado */
.rd-arqaviso { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--warn-soft); color: var(--tx-2); font-size: var(--fs-xs); line-height: 1.45; }
.rd-arqaviso > svg { width: 16px; height: 16px; flex: none; color: var(--warn); margin-top: 1px; }
.rd-arqaviso span { display: grid; gap: 2px; min-width: 0; }
.rd-arqaviso b { color: var(--tx); font-weight: 600; }
.card > .rd-arqaviso { margin: 12px 20px 0; }
/* fotos e anexos vindos do Storage */
img.arq-falhou { opacity: .35; }
.os-foto--env { display: grid; align-content: center; justify-items: center; gap: 8px; min-height: 140px; padding: 14px; text-align: center; animation: none; }
.os-foto--env .spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--red-tx); animation: spin .7s linear infinite; }
.os-foto--env figcaption { padding: 0; }
.ox-fchip__a { display: grid; min-width: 0; color: inherit; text-decoration: none; }
.ox-fchip__a:hover .ox-fchip__n, .ox-fchip__a:focus-visible .ox-fchip__n { color: var(--red-tx); text-decoration: underline; }
.ox-fchip__a small { font-size: 10.5px; }
.ox-fchip.tem { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.ox-art__file { min-width: 0; }
.ox-art__file .mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-art__dl { margin-left: auto; width: 30px; height: 30px; flex: none; }
.ox-art__dl svg { width: 15px; height: 15px; }
.ox-artup__in { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.ox-artup__in b { word-break: break-all; }
.ox-upbtn.loading { pointer-events: none; opacity: .8; }
.ox-upbtn .spinner, .ox-arq__foot .spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--red-tx); animation: spin .7s linear infinite; }
.ox-arq__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ox-arq__foot small { font-size: 10.5px; }
.nx-art__doc { display: grid; justify-items: center; gap: 6px; padding: 36px 16px; background: var(--bg-2); color: var(--tx-2); text-align: center; }
.nx-art__doc svg { width: 32px; height: 32px; color: var(--tx-3); }
.nx-art__doc b { font-size: var(--fs-sm); word-break: break-all; }
.oq-mk .nx-art__doc { width: 104px; height: 68px; padding: 6px; border-radius: 8px; gap: 2px; }
.oq-mk .nx-art__doc svg { width: 20px; height: 20px; }
.oq-mk .nx-art__doc b { font-size: 9px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fb-foto .spinner { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 6px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--red-tx); animation: spin .7s linear infinite; }
/* Modelo da OS: quem salvou e versão só leitura */
.tp__by { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: var(--fs-xs); }
.tp__by svg { width: 13px; height: 13px; flex: none; }
.tp--ro .tp-list input[disabled], .tp--ro .tp-list select[disabled], .tp--ro .tp-tog input[disabled] + .sw { opacity: .75; cursor: default; }
.tp--ro .tp-req[disabled] { cursor: default; }
.ox-tplby { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); }
.ox-tplby svg { width: 12px; height: 12px; }
/* Nova OS direta: formas de pagamento da Gestão comercial (mesmo visual do orçamento) */
.nx-pgs { display: grid; gap: 10px; }
.nx-pgs .oq-pg { min-width: 0; }
.fte-image-icon .spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--red-tx); animation: spin .7s linear infinite; }

/* Configurações › Recebimentos (revisão 10/11 · D7/D8): chave Pix e contas da empresa */
.cfg-rec { display: grid; gap: 14px; max-width: 720px; }
.cfg-rec__h { display: grid; gap: 2px; }
.cfg-rec__h h3 { display: flex; align-items: center; gap: 8px; }
.cfg-rec__h h3 svg { width: 18px; height: 18px; color: var(--red); }
.cfg-rec__g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cfg-rec textarea { min-height: 96px; resize: vertical; }
.cfg-rec__foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) { .cfg-rec__g { grid-template-columns: minmax(0, 1fr); } .cfg-rec__foot .btn { flex: 1; } }
.ow-pix { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); }
.ow-pix b { font-size: var(--fs-md, 15px); word-break: break-all; }

/* faixa fixa "Sem internet · N alterações guardadas neste aparelho" (revisão 10/11 · C15) */
.rd-semnet { position: fixed; z-index: 975; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: calc(100vw - 24px); padding: 10px 14px; border-radius: var(--r-md); background: var(--warn); color: #1a1208; font-size: var(--fs-sm); line-height: 1.35; box-shadow: var(--shadow-2); }
.rd-semnet[hidden] { display: none; }
.rd-semnet svg { width: 18px; height: 18px; flex: none; }
.qo-com-barra .rd-semnet { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 769px) { .qo-com-barra .rd-semnet { bottom: 16px; } }
/* login: "Primeiro acesso? Fale com a Diretoria" (revisão 10/11 · S7) */
.rl-primeiro { margin-top: 14px; text-align: center; font-size: var(--fs-sm); color: var(--tx-3); }
/* cadastro de usuário: "Ajustes avançados" (revisão 10/11 · T6) */
.us-avancado { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 0 14px; }
.us-avancado > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-weight: 600; list-style: none; }
.us-avancado > summary::-webkit-details-marker { display: none; }
.us-avancado > summary small { font-weight: 400; color: var(--tx-3); }
.us-avancado > summary svg { width: 16px; height: 16px; }
.us-avancado[open] { padding-bottom: 12px; }
