/* Escritório virtual */
:root { --of-bg: #DCD8CF; }
/* o tema escuro inverte a página; o desenho do escritório volta às cores certas e fica mais escuro */
html[data-theme="dark"] .of-stage canvas, html[data-theme="dark"] .of-preview canvas { filter: invert(1) hue-rotate(180deg) brightness(.82); }
.of-root { min-width: 0; }
.of-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.of-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.of-bar select.form-control { width: auto; min-width: 150px; }
.of-ico { min-width: 38px; padding: 6px 9px; font-size: 16px; line-height: 1; }
.of-editbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #FFF7D1; border: 1px solid #F2C200; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 13.5px; color: #1E1E1E; }
.of-stage { position: relative; height: calc(100vh - 230px); min-height: 420px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--of-bg); touch-action: none; }
.of-stage canvas { display: block; cursor: pointer; }
.of-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.of-zoom .btn { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.of-online { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.94); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: #1E1E1E; box-shadow: 0 2px 10px rgba(0,0,0,.1); max-width: 200px; }
.of-online strong { display: block; margin-bottom: 4px; }
.of-online div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0; }
.of-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.of-conn { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: #1E1E1E; color: #F2C200; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; }
.of-card { position: absolute; right: 12px; top: 12px; width: 280px; max-width: calc(100% - 24px); background: #fff; color: #1E1E1E; border-radius: 14px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.of-card-x { position: absolute; right: 6px; top: 6px; }
.of-card-head { display: flex; gap: 10px; align-items: center; padding-right: 24px; }
.of-card-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.of-editor { display: flex; gap: 18px; flex-wrap: wrap; }
.of-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #F4F1EA; border-radius: 14px; padding: 10px; flex: 0 0 200px; margin: 0 auto; }
.of-fields { flex: 1; min-width: 240px; }
.of-fields .form-label { margin: 10px 0 6px; display: block; }
.of-swatches, .of-opts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.of-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); cursor: pointer; padding: 0; }
.of-sw.active { outline: 3px solid #F2C200; outline-offset: 2px; }
.of-opt.active { background: #F2C200 !important; color: #1E1E1E; }
@media (max-width: 700px) {
  .of-stage { height: 62vh; min-height: 360px; }
  .of-online { display: none; }
  .of-bar select.form-control { min-width: 0; flex: 1; }
}

/* Ponto + prestação de contas do dia (Escritório, Meu painel, Atividades da equipe) */
.of-work { margin-bottom: 10px; }
.wl-widget { display: flex; flex-direction: column; gap: 10px; }
.wl-widget.compact { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.wl-state { font-size: 14px; color: var(--text-primary); }
.wl-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-pills .g-pill { font-size: 12px; font-weight: 500; }
.wl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wl-warn { background: #FFF7D1; color: #6B4E00; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-top: 8px; width: 100%; }
.wl-warn a { color: inherit; font-weight: 700; text-decoration: underline; }
.wl-note { background: #E9F7EF; color: #1E6B3E; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.wl-review { background: #EEF3FF; color: #22407A; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 10px 0; }
.wl-review div { margin-top: 4px; white-space: pre-wrap; }
.wl-review .btn { margin-top: 8px; }
.wl-h { margin: 14px 0 8px; font-size: 14px; }
.wl-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.wl-item:last-child { border-bottom: 0; }
.wl-item .g-pill { flex-shrink: 0; margin-top: 2px; }
.wl-item-text { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.wl-item-text .g-muted { font-size: 12px; }
.wl-add { margin-top: 10px; padding: 10px; border: 1px dashed var(--border); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.wl-add-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.wl-add-row > select, .wl-add-row > input { flex: 1 1 160px; min-width: 0; }
.wl-add-row #wl-text { flex: 3 1 260px; }
.wl-mini { display: flex; flex-direction: column; font-size: 11.5px; color: var(--text-secondary); gap: 2px; width: 92px; }
.wk-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.wk-filters:empty { display: none; }
#wk-tabs .g-tabs { margin-bottom: 12px; }
.wk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.wk-card .card-body { display: flex; flex-direction: column; gap: 8px; }
.wk-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wk-card-head > div:last-child { flex-shrink: 0; }
.wk-card-head .g-pill { white-space: nowrap; }
.wk-items { border-top: 1px solid var(--border); }
@media (max-width: 600px) {
  .wk-cards { grid-template-columns: 1fr; }
  .wl-mini { width: calc(50% - 4px); }
}
.wk-card .wl-item { flex-direction: column; gap: 4px; }
.wk-card .wl-item .btn { align-self: flex-start; }

/* Cartão "Meu dia" ao lado do escritório */
.of-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.of-main .of-stage { min-width: 0; }
.of-side { padding: 14px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 230px); overflow-y: auto; }
.of-side:empty { display: none; }
.wl-side-head { display: flex; justify-content: space-between; align-items: baseline; }
.wl-side-sec { border-top: 1px solid var(--border); padding-top: 10px; }
.wl-side-list { display: flex; flex-direction: column; gap: 6px; }
.wl-side-item { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; overflow-wrap: anywhere; }
.wl-side-item > span:nth-child(2) { flex: 1; min-width: 0; }
.wl-side-item .g-pill { flex-shrink: 0; margin-top: 1px; }
.wl-side-item .btn { padding: 2px 6px; }
.wl-side-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; }
@media (max-width: 1100px) {
  .of-main { grid-template-columns: 1fr; }
  .of-side { max-height: none; }
}
.of-main.no-side { grid-template-columns: 1fr; }

/* Ajuda de cada tela */
.btn-help { display: inline-flex; align-items: center; gap: 4px; }
.help-list { padding-left: 20px; margin: 0 0 12px; }
.help-list li { margin: 6px 0; line-height: 1.5; }
@media (max-width: 600px) { .btn-help-label { display: none; } }

/* Editor do escritório: ferramentas, pincel e cores */
.of-sw.on { outline: 3px solid #1E1E1E; outline-offset: 2px; }
.of-tool-panel { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(0,0,0,.08); padding-top: 8px; }
.of-tool-panel .of-sw { width: 22px; height: 22px; }
.of-layout-err { background: #FDEEEE; color: #C9353A; border-radius: 8px; padding: 6px 10px; font-size: 13px; }

/* Balão ao passar o mouse sobre uma pessoa */
.of-tip { position: absolute; z-index: 5; width: 260px; background: #fff; color: #1E1E1E; border-radius: 12px; padding: 10px 12px; font-size: 13px; box-shadow: 0 6px 24px rgba(0,0,0,.18); pointer-events: none; }
.of-tip-day, #of-card-day .of-tip-day { margin-top: 8px; padding-top: 8px; border-top: 1px solid #EEE; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.of-tip-acts { display: flex; flex-direction: column; gap: 2px; }
