/* OrgFlow Studio — complementos da versão em nuvem (login, administração, colaboração) */
#auth { min-height: calc(100vh - var(--top)); display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: linear-gradient(160deg, #eff6ff 0%, #f4f6fa 55%); }
.auth-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 28px 28px 24px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand b { font-size: 19px; display: block; }
.auth-brand b span { color: var(--accent); }
.auth-brand small { color: var(--muted); font-size: 12.5px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form h2 { margin: 0; font-size: 18px; }
.auth-form p { margin: 0; color: #475569; font-size: 13.5px; }
.auth-tabs { margin-bottom: 4px; }
.auth-btn { height: 40px; font-size: 14.5px; width: 100%; }
.auth-err { background: #fef2f2; color: #b91c1c; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.auth-ok { background: #f0fdf4; color: #166534; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.auth-form .link { align-self: center; font-size: 13px; }

#userBox { margin-left: auto; display: flex; align-items: center; }
#tbRight:not([hidden]) ~ #userBox { margin-left: 8px; }
.user-btn { border: 0; background: transparent; padding: 2px; border-radius: 50%; cursor: pointer; }
.user-btn:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.av-ini { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex-shrink: 0; }

#lockBox { display: flex; align-items: center; margin-right: 6px; }
.lock-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: #fffbeb; color: #92400e; white-space: nowrap; }
.tb-tools.ro .ro-ok { flex-shrink: 0; }
#roBanner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4; font-size: 12.5px; padding: 6px 14px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; box-shadow: var(--shadow); max-width: calc(100% - 120px); text-align: center; }

.doc-thumb.org-art { background: linear-gradient(160deg, #eff6ff, #dbeafe); color: #2563eb; }
.doc-thumb.flow-art { background: linear-gradient(160deg, #f0fdf4, #fefce8); color: #16a34a; }
.doc-thumb.pop-art { background: linear-gradient(160deg, #f5f3ff, #ede9fe); color: #7c3aed; }
.profile-box { display: flex; align-items: center; gap: 10px; padding: 10px 6px 4px; }
.profile-box b { display: block; font-size: 13px; }
.profile-box small { color: var(--muted); font-size: 12px; }
.access-dlg { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.search-res { border: 1px solid var(--line); border-radius: 8px; max-height: 240px; overflow-y: auto; padding: 4px; }
.search-res:empty { display: none; }
.search-res .popup-item small { margin-left: auto; }
.picker { display: flex; flex-direction: column; gap: 6px; }
.tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: var(--soft); color: var(--muted); margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; white-space: nowrap; }
label.chip { padding: 3px 10px; gap: 6px; }
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 14px 0; }
.role-legend > div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; display: flex; flex-direction: column; }
.role-legend span { color: var(--muted); }
.cell-sel { width: auto !important; padding: 4px 8px !important; font-size: 13px !important; }
.doc-table tr.inactive td { opacity: .55; }
.doc-table.compact td, .doc-table.compact th { padding: 6px 10px; }
.meta.info { margin-top: 14px; background: #eff6ff; color: #1e40af; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.group-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.group-card .avatars { display: flex; align-items: center; }
.group-card .avatars .av-ini { margin-right: -6px; border: 2px solid #fff; }
.group-card .avatars small { margin-left: 12px; color: var(--muted); }
.audit { display: flex; flex-direction: column; gap: 6px; }
/* custos de pessoal */
.cost-toggle { border: 1px solid #99f6e4; color: #0f766e; margin-right: 6px; }
.cost-toggle.on { background: #0f766e; color: #fff; border-color: #0f766e; }
.comp-warn { background: #fffbeb; color: #92400e; }
.comp-out { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.comp-out > div:first-child { display: flex; flex-direction: column; }
.comp-out > div:first-child span { font-size: 11.5px; color: #0f766e; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.comp-out b { font-size: 18px; color: #0f172a; font-variant-numeric: tabular-nums; }
.comp-team { font-size: 12.5px; color: #1e40af; }
.comp-table td { vertical-align: middle; font-variant-numeric: tabular-nums; }
.comp-bar { height: 6px; background: #e2e8f0; border-radius: 3px; margin-top: 4px; min-width: 120px; }
.comp-bar span { display: block; height: 100%; background: #0f766e; border-radius: 3px; }
.comp-bar.b span { background: #6366f1; }
.comp-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.comp-delta.up { color: #b91c1c; } .comp-delta.down { color: #15803d; }
.ws-tools .field { flex: 0 1 auto; }
@media (max-width: 800px) { #roBanner { max-width: calc(100% - 24px); } }
#roBanner.warn { background: #fffbeb; color: #92400e; border-color: #fcd34d; font-weight: 600; }
.tb-tools .ro-ok { flex-shrink: 0; }
.folder-acc { display: inline-flex; color: var(--muted); margin-left: 2px; }
/* configurações */
.cfg-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; }
.cfg-tab { border: 0; background: transparent; padding: 9px 14px; font-size: 13.5px; color: #475569; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.cfg-tab:hover { color: var(--text); }
.cfg-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.cfg-body { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.cfg-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.cfg-card h2 { margin: 0; font-size: 15px; }
.cfg-card > p { margin: -6px 0 0; font-size: 13px; }
.cfg-table input:not([type=checkbox]):not([type=color]) { width: 100%; min-width: 110px; }
.cfg-table td { vertical-align: middle; }
.cfg-color { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; cursor: pointer; }
.cfg-card .kpis { margin: 0; }
.cfg-batch { min-height: 30px; align-items: center; }
.cfg-table tr.sel td { background: var(--accent-soft); }
.cfg-table .cfg-money { min-width: 96px; max-width: 140px; }
.cfg-search { max-width: 220px; }
.row.wrap { flex-wrap: wrap; }
/* empresas */
.co-filter { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.co-filter select { font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); }
.co-badge { color: #6d28d9 !important; border-color: #ddd6fe !important; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-company { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 4px; }
.cfg-company select { width: auto; min-width: 220px; max-width: 100%; font-weight: 600; }
/* organograma societário */
.type-badge.soc { background: #fffbeb; color: #b45309; }
.doc-thumb.soc-art, .sc-art.soc-art { background: linear-gradient(160deg, #fffbeb, #fef3c7); color: #d97706; }
.co-name { font-size: 13px; color: var(--text); text-transform: none; letter-spacing: 0; }
