/* Aval — cromo do revisor (barra, gaveta, balões, pinos). Escopo .ap para funcionar dentro do widget. */
.ap, .ap * { box-sizing: border-box; }
:root, .ap {
  --ap-dark: #1F2433;
  --ap-dark-2: #2B3144;
  --ap-dark-line: #363D52;
  --ap-icon: #A9AFBF;
  --ap-blue: #4353FF;
  --ap-blue-2: #3444EE;
  --ap-green: #3FA66A;
  --ap-green-2: #36935C;
  --ap-ink: #252A37;
  --ap-muted: #8C92A3;
  --ap-line: #E6E8EE;
  --ap-field: #F1F2F5;
  --ap-panel: #F6F7F9;
  --st-active: #4353FF;
  --st-progress: #F0A328;
  --st-review: #9A4DE8;
  --st-resolved: #3FA66A;
}
.ap {
  font: 400 15px/1.5 "Roboto", system-ui, sans-serif;
  color: var(--ap-ink);
  -webkit-font-smoothing: antialiased;
}
:where(.ap) :where(button, input, textarea, select) { font: inherit; color: inherit; }
.ap :focus-visible { outline: 2px solid var(--ap-blue); outline-offset: 2px; }
.ap [hidden] { display: none !important; }
.ap svg { display: block; }

/* rótulo em caixa alta espaçada — assinatura visual do SureFeedback */
.ap-caps { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: 12.5px; }

/* ---------- botões ---------- */
.ap-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px;
  border: 0; border-radius: 3px; cursor: pointer; text-transform: uppercase; letter-spacing: .14em;
  font-weight: 700; font-size: 13px; white-space: nowrap; text-decoration: none;
}
.ap-btn svg { width: 16px; height: 16px; }
.ap-btn.blue { background: var(--ap-blue); color: #fff; }
.ap-btn.blue:hover { background: var(--ap-blue-2); }
.ap-btn.green { background: var(--ap-green); color: #fff; }
.ap-btn.green:hover { background: var(--ap-green-2); }
.ap-btn.approved { background: transparent; color: #7CD39E; box-shadow: inset 0 0 0 2px var(--ap-green); }
.ap-btn.red { background: transparent; color: #F08A8A; box-shadow: inset 0 0 0 2px #C94848; }
.ap-btn.red:hover { background: rgba(201, 72, 72, .14); color: #FFB3B3; }
.ap-btn.red.solid { background: #C94848; color: #fff; box-shadow: none; }
.ap-btn.red.solid:hover { background: #B53D3D; }
.ap-btn.rejected { background: #C94848; color: #fff; }
.ap-btn.link { background: none; color: var(--ap-muted); padding: 0 8px; }
.ap-btn.link:hover { color: var(--ap-ink); }
.ap-btn.sm { height: 36px; padding: 0 16px; font-size: 12px; }
.ap-btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- barra flutuante ---------- */
.ap-toolbar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 4px; padding: 10px 12px 10px 0; background: var(--ap-dark);
  border-radius: 6px; box-shadow: 0 14px 40px rgba(15, 18, 30, .35); color: #fff; user-select: none;
}
.ap-grip { align-self: stretch; width: 22px; margin: -10px 6px -10px 0; display: grid; place-items: center; cursor: grab; border-radius: 6px 0 0 6px; background: var(--ap-dark-2); color: #5B6379; }
.ap-grip:active { cursor: grabbing; }
.ap-grip svg { width: 10px; height: 22px; }
.ap-toolbar:not(.min) .ap-expand { display: none; }
.ap-toolbar.min { padding-right: 6px; }
.ap-toolbar.min > :not(.ap-grip):not(.ap-expand) { display: none !important; }
.ap-toolbar.min .ap-grip { margin-right: 4px; }
.ap-tool { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ap-icon); cursor: pointer; border-radius: 4px; text-decoration: none; }
.ap-tool:hover, .ap-tool[aria-pressed="true"] { color: #fff; background: rgba(255,255,255,.06); }
.ap-tool svg { width: 24px; height: 24px; }
.ap-badge { position: absolute; top: 2px; right: 1px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ap-blue); color: #fff; font: 700 11.5px/20px "Roboto", sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--ap-dark); }
.ap-brand { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 4px; margin-right: 4px; font-weight: 700; font-size: 16px; max-width: 220px; }
.ap-brand img { width: 32px; height: 32px; border-radius: 4px; object-fit: contain; background: #fff; padding: 2px; }
.ap-brand .ap-mono { width: 32px; height: 32px; border: 2px solid #fff; border-radius: 3px; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.ap-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-sep { width: 1px; align-self: stretch; margin: 4px 6px; background: var(--ap-dark-line); }
.ap-toolbar .ap-btn { margin-left: 8px; }
.ap-toolbar [data-approve-slot] { display: inline-flex; flex-wrap: nowrap; }
.ap-tip { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); background: #000; color: #fff; font: 500 12.5px/1 "Roboto", sans-serif; padding: 7px 9px; border-radius: 3px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; }
.ap-tool:hover .ap-tip { opacity: 1; }

/* ---------- pinos ---------- */
.ap-pin {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; z-index: 30; touch-action: none;
  background: var(--pin, var(--st-active)); border: 3px solid #fff; color: #fff; padding: 0; cursor: pointer;
  font: 700 14px/28px "Roboto", sans-serif; text-align: center; box-shadow: 0 3px 10px rgba(20, 24, 60, .35);
  transition: transform .12s;
}
.ap-pin:hover { transform: scale(1.08); }
.ap-pin.is-active { transform: scale(1.12); box-shadow: 0 0 0 5px rgba(67, 83, 255, .25), 0 3px 10px rgba(20, 24, 60, .35); z-index: 31; }
.ap-pin.dragging { cursor: move; transform: scale(1.15); transition: none; }
.ap-pin.draft { background: var(--ap-dark); }
.ap-hide-pins .ap-pin:not(.draft) { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .ap-pin.draft { animation: ap-pop .22s cubic-bezier(.3, 1.6, .6, 1); }
  @keyframes ap-pop { from { transform: scale(.3); opacity: 0; } }
}

/* ---------- balão de comentário ---------- */
.ap-pop {
  position: absolute; z-index: 40; width: 380px; background: #fff; border-radius: 3px; padding: 22px 24px 24px;
  box-shadow: 0 12px 44px rgba(20, 24, 40, .22), 0 0 0 1px rgba(20, 24, 40, .04); cursor: default; line-height: 1.5; text-align: left;
}
.ap-pop::before { content: ""; position: absolute; top: 22px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.ap-pop.right::before { left: -7px; box-shadow: -2px 2px 3px rgba(20, 24, 40, .06); }
.ap-pop.left::before { right: -7px; box-shadow: 2px -2px 3px rgba(20, 24, 40, .06); }
.ap-pop.below::before { top: -7px; left: 26px; }
.ap-pop.floating { position: fixed; top: 96px; left: 50%; margin-left: -190px; z-index: 1150; }
.ap-pop.floating::before { display: none; }
.ap-pop .ap-go { font-size: 13px; color: var(--ap-blue); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; margin: -6px 0 14px; }
.ap-pop .ap-go svg { width: 14px; height: 14px; }
.ap-pop-head { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.ap-pop-head .ap-caps { color: var(--ap-ink); flex: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ap-check { width: 22px; height: 22px; border: 2px solid var(--ap-blue); border-radius: 3px; display: grid; place-items: center; flex: none; }
.ap-check svg { width: 14px; height: 14px; color: #fff; }
.ap-check.on { background: var(--st-resolved); border-color: var(--st-resolved); }
.ap-icon-btn { width: 34px; height: 34px; border: 0; background: none; border-radius: 4px; display: grid; place-items: center; cursor: pointer; color: #5D6475; position: relative; }
.ap-icon-btn:hover { background: var(--ap-field); color: var(--ap-ink); }
.ap-icon-btn svg { width: 20px; height: 20px; }
.ap-assign { display: flex; align-items: center; gap: 2px; border: 0; background: none; cursor: pointer; padding: 2px; color: #5D6475; border-radius: 20px; }
.ap-assign:hover { background: var(--ap-field); }
.ap-assign .ap-dash { width: 30px; height: 30px; border-radius: 50%; border: 1.5px dashed #9EA4B3; display: grid; place-items: center; }
.ap-assign .ap-dash svg { width: 14px; height: 14px; }
.ap-assign .ap-chev { width: 14px; height: 14px; }

.ap-msgs { display: grid; gap: 16px; margin-bottom: 18px; max-height: 320px; overflow: auto; }
.ap-msg { display: grid; grid-template-columns: 40px 1fr; gap: 12px; position: relative; }
.ap-msg.private { background: #FFF8E6; margin: 0 -10px; padding: 8px 10px; border-radius: 4px; }
.ap-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.ap-avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.ap-who { font-weight: 700; font-size: 15.5px; }
.ap-when { color: var(--ap-muted); font-size: 13px; margin-left: 6px; font-weight: 400; }
.ap-text { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; color: #3C4252; }
.ap-text .ap-at { color: var(--ap-blue); font-weight: 500; }
.ap-msg-tools { position: absolute; right: 0; top: -2px; display: none; gap: 2px; }
.ap-reply-link { border: 0; background: none; padding: 4px 0 0; font: 500 12.5px/1 "Roboto", sans-serif; color: var(--ap-muted); cursor: pointer; }
.ap-reply-link:hover { color: var(--ap-blue); }
.ap-inreply { display: flex; gap: 6px; align-items: flex-start; width: 100%; text-align: left; margin: 4px 0 2px; padding: 6px 8px; border: 0; border-left: 3px solid #C9CDD8; background: var(--ap-field); border-radius: 2px; font: 13px/1.35 "Roboto", sans-serif; color: #5D6475; cursor: pointer; }
.ap-inreply svg, .ap-replying > svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.ap-inreply b { color: var(--ap-ink); font-weight: 600; }
.ap-replying { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; padding: 6px 4px 6px 10px; border-left: 3px solid var(--ap-blue); background: #EEF0FF; font-size: 13px; color: #3C4252; }
.ap-replying > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-replying .ap-icon-btn { width: 26px; height: 26px; }
.ap-replying .ap-icon-btn svg { width: 14px; height: 14px; }
.ap-msg.ap-flash { animation: ap-flash 1.2s ease; }
@keyframes ap-flash { 0%, 60% { background: #FFF3CF; } 100% { background: transparent; } }
.ap-msg:hover .ap-msg-tools { display: flex; }
.ap-msg-tools .ap-icon-btn { width: 26px; height: 26px; }
.ap-msg-tools svg { width: 15px; height: 15px; }
.ap-attach { display: inline-block; margin-top: 8px; border-radius: 3px; overflow: hidden; border: 1px solid var(--ap-line); }
.ap-attach img { max-width: 220px; max-height: 140px; display: block; }
.ap-attach.file { padding: 6px 10px; font-size: 13px; color: var(--ap-blue); text-decoration: none; }
.ap-lock { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: #C48A00; }
.ap-lock svg { width: 14px; height: 14px; }
.ap-quote { font-size: 14px; color: #5D6475; border-left: 3px solid #F2C94C; padding: 2px 0 2px 10px; margin: -4px 0 14px; max-height: 66px; overflow: hidden; }

.ap-field { position: relative; background: var(--ap-field); border-radius: 2px; }
.ap-field textarea { display: block; width: 100%; min-height: 96px; border: 0; background: transparent; resize: vertical; padding: 14px 16px 38px; outline: none; font-size: 15.5px; }
.ap-field textarea::placeholder { color: #9EA4B3; }
.ap-field:focus-within { box-shadow: inset 0 0 0 2px rgba(67, 83, 255, .35); }
.ap-field-tools { position: absolute; right: 8px; bottom: 6px; display: flex; gap: 2px; }
.ap-field-tools .ap-icon-btn { width: 30px; height: 30px; }
.ap-field-tools .ap-icon-btn.on { color: #C48A00; background: #FFF3CF; }
.ap-icon-btn.rec { width: auto !important; padding: 0 10px 0 8px; display: inline-flex; gap: 5px; color: #fff; background: #D64545; border-radius: 999px; animation: ap-rec 1.4s ease-in-out infinite; }
.ap-icon-btn.rec svg { width: 16px; height: 16px; }
.ap-icon-btn.rec::after { content: attr(data-time); font: 600 12px/1 "Roboto", sans-serif; font-variant-numeric: tabular-nums; }
@keyframes ap-rec { 50% { box-shadow: 0 0 0 4px rgba(214, 69, 69, .22); } }
.ap-voicebox { position: relative; }
.ap-voicebox textarea { padding-right: 52px; }
.ap-voicebox [data-mic] { position: absolute; right: 8px; bottom: 8px; }
.ap-audio { display: block; margin-top: 8px; width: 100%; max-width: 280px; height: 36px; }
.ap-pending-file { font-size: 13px; color: var(--ap-blue); margin: 8px 0 0; display: flex; gap: 8px; align-items: center; }
.ap-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.ap-hint { margin-left: auto; font-size: 12px; color: var(--ap-muted); }

/* menus suspensos */
.ap-menu { position: absolute; z-index: 60; background: #fff; border-radius: 3px; min-width: 210px; padding: 6px 0; box-shadow: 0 10px 30px rgba(20, 24, 40, .18), 0 0 0 1px rgba(20, 24, 40, .06); }
.ap-menu button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 16px; cursor: pointer; text-align: left; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #6B7183; }
.ap-menu button:hover { background: var(--ap-panel); color: var(--ap-ink); }
.ap-menu button svg { width: 14px; height: 14px; }
.ap-menu .ap-dot { width: 10px; height: 10px; border-radius: 50%; }
.ap-menu .ap-menu-label { padding: 8px 16px 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #A7ACBA; font-weight: 700; }
.ap-menu .person { text-transform: none; letter-spacing: 0; font-size: 14.5px; font-weight: 500; color: var(--ap-ink); }
.ap-menu hr { border: 0; border-top: 1px solid var(--ap-line); margin: 6px 0; }

/* ---------- gaveta ---------- */
.ap-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 1100; background: #fff; display: flex; flex-direction: column; box-shadow: -14px 0 40px rgba(15, 18, 30, .18); transform: translateX(105%); transition: transform .22s ease; }
.ap-drawer.open { transform: none; }
.ap-drawer-head { background: var(--ap-dark); color: #fff; padding: 26px 32px 0; }
.ap-drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.ap-drawer-top .ap-brand { padding: 0; font-size: 19px; max-width: 300px; }
.ap-drawer-top .ap-icon-btn { color: #fff; }
.ap-drawer-top .ap-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.ap-tabs { display: flex; gap: 26px; }
.ap-tabs .ap-caps { letter-spacing: .1em; }
.ap-tabs button { border: 0; background: none; color: #8E95A8; padding: 0 0 18px; cursor: pointer; border-bottom: 3px solid transparent; }
.ap-tabs button[aria-selected="true"] { color: #fff; border-color: var(--ap-blue); }
.ap-filters { display: flex; align-items: center; gap: 18px; padding: 14px 32px; background: var(--ap-panel); border-bottom: 1px solid var(--ap-line); font-size: 15px; color: #5D6475; flex-wrap: wrap; }
.ap-filters select { border: 0; background: transparent; cursor: pointer; padding: 2px 0; color: #4A5163; max-width: 150px; }
.ap-toggle { margin-left: auto; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ap-toggle input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: #B7BCC8; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.ap-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ap-toggle input:checked { background: var(--st-resolved); }
.ap-toggle input:checked::after { transform: translateX(16px); }
.ap-drawer-body { flex: 1; overflow: auto; }
.ap-thread { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 22px 32px; border-bottom: 1px solid var(--ap-line); cursor: pointer; }
.ap-thread:hover { background: #FAFBFC; }
.ap-thread.is-active { background: #F2F3FF; }
.ap-thread .ap-av-wrap { position: relative; width: 44px; }
.ap-thread .ap-avatar { width: 44px; height: 44px; }
.ap-thread .ap-num { position: absolute; left: -10px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--pin, var(--st-active)); color: #fff; font: 700 11px/22px "Roboto", sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff; }
.ap-thread .ap-text { font-size: 15px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ap-thread-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; color: #9EA4B3; font-size: 13px; }
.ap-thread-foot svg { width: 17px; height: 17px; }
.ap-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--pin); }
.ap-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pin); }
.ap-bubble { margin-left: auto; min-width: 28px; height: 22px; padding: 0 7px; border-radius: 3px; background: #9EA4B3; color: #fff; font: 700 12px/22px "Roboto", sans-serif; text-align: center; position: relative; }
.ap-bubble::after { content: ""; position: absolute; left: 7px; bottom: -5px; border: 5px solid transparent; border-top-color: #9EA4B3; border-bottom: 0; }
.ap-assignee { display: inline-flex; align-items: center; gap: 6px; color: #6B7183; }
.ap-where { color: var(--ap-muted); font-size: 13px; margin-top: 2px; }
.ap-empty { padding: 56px 32px; text-align: center; color: var(--ap-muted); }
.ap-empty strong { display: block; color: var(--ap-ink); font-size: 17px; margin-bottom: 6px; font-weight: 500; }

.ap-list-row { display: flex; align-items: center; gap: 14px; padding: 16px 32px; border-bottom: 1px solid var(--ap-line); cursor: pointer; text-decoration: none; color: inherit; }
.ap-list-row:hover { background: #FAFBFC; }
.ap-list-row.is-current { background: #F2F3FF; }
.ap-list-row .ap-thumb { width: 56px; height: 56px; border-radius: 3px; background: var(--ap-field) center/cover; flex: none; display: grid; place-items: center; color: #9EA4B3; }
.ap-list-row .ap-thumb svg { width: 22px; height: 22px; }
.ap-list-row strong { display: block; font-weight: 500; }
.ap-list-row small { color: var(--ap-muted); font-size: 13px; }
.ap-list-row .ap-bubble { flex: none; }

.ap-event { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 16px 32px; border-bottom: 1px solid var(--ap-line); font-size: 14.5px; }
.ap-event .ap-ev-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ap-field); color: #6B7183; }
.ap-event .ap-ev-ico svg { width: 16px; height: 16px; }
.ap-event .ap-ev-ico.ok { background: #E3F4EA; color: var(--ap-green); }
.ap-event .ap-ev-ico.warn { background: #FDEFE3; color: #D9731C; }
.ap-event .ap-ev-ico.bad { background: #FBE6E6; color: #C94848; }
.ap-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.ap-reason { font: 500 13px/1 "Roboto", sans-serif; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--ap-line); background: #fff; color: var(--ap-ink); cursor: pointer; }
.ap-reason:hover { border-color: #C9CDD8; }
.ap-reason.on { background: #FBE6E6; border-color: #C94848; color: #B23A3A; }
.ap-event b { font-weight: 700; }
.ap-event q { color: #5D6475; display: block; margin-top: 2px; quotes: "“" "”"; }

/* ---------- bandeja de peças (grade) ---------- */
.ap-tray { position: fixed; left: 0; right: 0; top: 0; z-index: 1050; background: var(--ap-dark); color: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.35); transform: translateY(-105%); transition: transform .22s ease; }
.ap-tray.open { transform: none; }
.ap-tray-list { display: flex; gap: 22px; padding: 24px 28px 18px; overflow-x: auto; }
.ap-tray-item { flex: none; width: 168px; text-align: center; text-decoration: none; color: #fff; cursor: pointer; background: none; border: 0; padding: 0; }
.ap-tray-thumb { position: relative; width: 168px; height: 124px; border-radius: 3px; background: var(--ap-dark-2) center/cover no-repeat; display: grid; place-items: center; color: #6B7389; outline: 3px solid transparent; outline-offset: 2px; overflow: hidden; }
.ap-tray-thumb svg { width: 32px; height: 32px; }
.ap-tray-thumb .ap-excerpt { font-size: 11px; line-height: 1.4; color: #3C4252; background: #fff; padding: 10px; text-align: left; width: 100%; height: 100%; overflow: hidden; }
.ap-tray-item.is-current .ap-tray-thumb { outline-color: var(--ap-blue); }
.ap-tray-item:hover .ap-tray-thumb { outline-color: #5B6379; }
.ap-tray-meta { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: space-between; }
.ap-chip { font: 700 10.5px/1 "Roboto", sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 5px 7px; border-radius: 3px; background: rgba(20,24,40,.8); color: #fff; }
.ap-chip.approved { background: var(--ap-green); }
.ap-chip.changes { background: #D9731C; }
.ap-chip.rejected { background: #C94848; }
.ap-tray-item span.t { display: block; margin-top: 10px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-tray-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 28px; background: rgba(0,0,0,.2); color: #8E95A8; }
.ap-tray-foot .ap-icon-btn { color: #8E95A8; }
.ap-tray-foot .ap-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ---------- título flutuante (só nas peças) ---------- */
.ap-title { position: fixed; top: 18px; left: 18px; z-index: 900; display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 4px; padding: 6px; box-shadow: 0 4px 18px rgba(20, 24, 40, .12); max-width: calc(100vw - 36px); }
.ap-title .ap-icon-btn { width: 30px; height: 30px; }
.ap-title .ap-count { font-size: 13px; color: var(--ap-muted); padding: 0 2px; white-space: nowrap; }
.ap-title strong { font-weight: 500; font-size: 15px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-title select { border: 1px solid var(--ap-line); border-radius: 3px; background: #fff; height: 30px; padding: 0 6px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ap-status { font: 700 11px/1 "Roboto", sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 7px 9px; border-radius: 3px; background: var(--ap-field); color: #6B7183; white-space: nowrap; margin-left: 4px; }
.ap-status.approved { background: #E3F4EA; color: var(--ap-green-2); }
.ap-status.changes { background: #FDEFE3; color: #C4600F; }
.ap-status.rejected { background: #FBE6E6; color: #B23A3A; }
.ap-old { font-size: 12.5px; color: #C4600F; padding: 0 8px; white-space: nowrap; }

/* modo comentário */
.ap-commenting { cursor: crosshair; }
.ap-banner { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 950; background: var(--ap-blue); color: #fff; padding: 10px 18px; border-radius: 3px; box-shadow: 0 6px 20px rgba(67,83,255,.35); font-size: 14px; }

/* ---------- modal ---------- */
.ap-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 24, 40, .55); display: grid; place-items: center; padding: 16px; }
.ap-modal { width: min(100%, 560px); background: #fff; border-radius: 3px; padding: 34px 36px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.3); max-height: calc(100dvh - 32px); overflow: auto; }
.ap-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--ap-line); }
.ap-modal h2 { margin: 0; font-size: 26px; font-weight: 400; line-height: 1.25; }
.ap-modal p.lead { margin: -8px 0 20px; color: #5D6475; }
.ap-label { display: block; margin: 0 0 8px; }
.ap-input { width: 100%; border: 0; background: var(--ap-field); padding: 13px 16px; border-radius: 2px; outline: none; font-size: 15.5px; margin-bottom: 18px; }
.ap-input:focus { box-shadow: inset 0 0 0 2px rgba(67, 83, 255, .35); }
textarea.ap-input { min-height: 110px; resize: vertical; }
.ap-modal .ap-actions { justify-content: flex-end; margin-top: 8px; }

.ap-toast { position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 2100; background: #000; color: #fff; padding: 11px 18px; border-radius: 3px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .ap-toolbar { left: 8px; right: 8px; bottom: 8px; transform: none; padding: 6px 6px 6px 0; gap: 0; justify-content: space-between; }
  .ap-grip, .ap-toolbar .ap-brand, .ap-sep, .ap-tip, .ap-toolbar [data-eye], .ap-toolbar [data-drawer="activity"] { display: none; }
  .ap-tabs { gap: 18px; }
  .ap-toolbar { padding-left: 4px; }
  .ap-tool { width: 38px; }
  .ap-tool svg { width: 22px; height: 22px; }
  .ap-toolbar .ap-btn { height: 40px; padding: 0 12px; font-size: 11.5px; letter-spacing: .08em; margin-left: 4px; }
  .ap-toolbar .ap-btn .lbl-long { display: none; }
  .ap-toolbar .ap-btn.red { padding: 0 11px; }
  .ap-toolbar .ap-btn.red span { display: none; }
  .ap-drawer { width: 100vw; }
  .ap-drawer-head, .ap-filters { padding-left: 20px; padding-right: 20px; }
  .ap-thread, .ap-list-row, .ap-event { padding-left: 20px; padding-right: 20px; }
  .ap-pop { width: min(340px, calc(100vw - 24px)); padding: 18px; }
  .ap-title { top: 10px; left: 10px; max-width: calc(100vw - 20px); }
  .ap-title strong { max-width: 34vw; }
  .ap-modal { padding: 24px 20px; }
  .ap-toast { bottom: 76px; }
  .ap-banner { top: auto; bottom: 76px; left: 12px; right: 12px; transform: none; font-size: 13px; padding: 8px 12px; text-align: center; }
}
@media (min-width: 761px) { .ap-toolbar .ap-btn .lbl-short { display: none; } }
/* telas bem estreitas (iPhone SE, Androids pequenos) */
@media (max-width: 380px) {
  .ap-toolbar [data-tray], .ap-title .ap-count, .ap-title [data-upver] { display: none; }
  .ap-tool { width: 34px; }
  .ap-toolbar .ap-btn { padding: 0 9px; font-size: 11px; letter-spacing: .04em; gap: 5px; margin-left: 3px; }
  .ap-toolbar .ap-btn svg { width: 13px; height: 13px; }
  .ap-title strong { max-width: 28vw; padding: 0 4px; }
  .ap-status { padding: 7px 6px; letter-spacing: .04em; }
}

/* ---------- área desenhada na peça ---------- */
.ap-box { position: absolute; z-index: 29; pointer-events: none; border: 2px solid var(--pin, var(--st-active)); border-radius: 3px; background: color-mix(in srgb, var(--pin, var(--st-active)) 10%, transparent); box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.ap-box.draft { --pin: var(--ap-dark); border-style: dashed; background: rgba(31, 36, 51, .08); }
.ap-box.is-active { border-width: 3px; }
.ap-hide-pins .ap-box:not(.draft) { display: none; }

/* ---------- QR code ---------- */
.ap-qr { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
.ap-qr-code { width: 200px; height: 200px; padding: 12px; background: #fff; border: 1px solid var(--ap-line); border-radius: 4px; }
.ap-qr-code svg { width: 100%; height: 100%; }
@media (max-width: 760px) {
  .ap-toolbar [data-qr] { display: none; }
  .ap-qr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
