/* ============================================================================
   JCE Plataforma  ·  Estilos específicos (sobre o design system PRUMAI app.css)
   ========================================================================== */

/* ----------------------------- Login ------------------------------------- */
body.login-mode { background: radial-gradient(120% 80% at 50% -10%, rgba(79,195,247,.10), transparent 60%), var(--bg); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--hair); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 36px 34px 30px; }
.login-brand { display: flex; justify-content: center; margin-bottom: 18px; }
.login-title { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--ink-deep); text-align: center; }
.login-sub { color: var(--muted); font-size: 13.5px; text-align: center; margin: 8px 0 26px; line-height: 1.55; }
.login-users { display: flex; flex-direction: column; gap: 9px; }
.login-user { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; background: var(--el); border: 1px solid var(--line); border-radius: 12px; padding: 12px 15px; transition: .15s; }
.login-user:hover { border-color: rgba(79,195,247,.5); background: rgba(79,195,247,.07); transform: translateY(-1px); }
.login-user .lu-info { flex: 1; min-width: 0; } .login-user b { display: block; color: var(--ink); font-size: 14px; } .login-user small { color: var(--muted); font-size: 12px; }
.login-user .lu-arrow { width: 16px; height: 16px; color: var(--faint); } .login-user:hover .lu-arrow { color: var(--cyan); }
.login-foot { text-align: center; font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: .5px; margin-top: 24px; text-transform: uppercase; }

/* ----------------------------- Topbar icons ------------------------------ */
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--el); color: var(--muted); transition: .15s; flex: 0 0 36px; position: relative; }
.icon-btn:hover { color: var(--cyan); border-color: rgba(79,195,247,.4); }
.icon-btn svg { width: 17px; height: 17px; }
.nav-user .icon-btn { width: 30px; height: 30px; flex: 0 0 30px; }
.nav-user .icon-btn svg { width: 15px; height: 15px; }
.notif-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--red); color: #fff; border-radius: 100px; font-family: var(--mono); font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.topbar-search { cursor: pointer; } .topbar-search input { cursor: pointer; }

/* ----------------------------- Busca global ------------------------------ */
.search-bg { position: fixed; inset: 0; background: rgba(3,5,10,.7); backdrop-filter: blur(4px); z-index: 120; display: flex; align-items: flex-start; justify-content: center; padding: 80px 20px; }
.search-box { width: 100%; max-width: 600px; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-input { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search-input svg { width: 18px; height: 18px; color: var(--cyan); flex: 0 0 18px; }
.search-input input { flex: 1; border: none; background: none; outline: none; font-size: 15px; color: var(--ink); font-family: var(--sans); }
.search-input kbd { font-family: var(--mono); font-size: 10px; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }
.search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.sr-group { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--cyan); padding: 12px 12px 6px; }
.sr-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; transition: background .12s; }
.sr-item:hover { background: var(--blue-soft); }
.sr-item .sr-main { flex: 1; min-width: 0; } .sr-item b { display: block; color: var(--ink); font-size: 13.5px; } .sr-item small { color: var(--muted); font-size: 12px; }
.sr-item svg { width: 15px; height: 15px; color: var(--faint); }

/* ----------------------------- Notificações ------------------------------ */
.notif-bg { position: fixed; inset: 0; z-index: 110; }
.notif-panel { position: absolute; top: 56px; right: 24px; width: 360px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--hair); border-radius: 13px; box-shadow: var(--shadow-lg); overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.notif-head b { font-family: var(--display); font-size: 15px; color: var(--ink); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-item { display: flex; gap: 11px; width: 100%; text-align: left; padding: 14px 17px; border-bottom: 1px solid var(--line); transition: background .12s; }
.notif-item:hover { background: var(--el); }
.notif-item .ni-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; flex: 0 0 8px; margin-top: 5px; }
.notif-item.unread .ni-dot { background: var(--cyan); box-shadow: 0 0 7px var(--cyan-glow); }
.ni-t { font-size: 13.5px; font-weight: 600; color: var(--ink); } .ni-d { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ni-date { font-family: var(--mono); font-size: 10.5px; color: var(--faint); margin-top: 5px; }

/* ----------------------------- Alertas (dashboard) ----------------------- */
.alert-list { display: flex; flex-direction: column; gap: 4px; }
.alert-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border-radius: 10px; cursor: pointer; transition: background .12s; border: 1px solid transparent; }
.alert-row:hover { background: var(--el); }
.alert-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 30px; }
.alert-ic svg { width: 15px; height: 15px; }
.alert-row.a-red .alert-ic { background: var(--red-soft); color: var(--red); }
.alert-row.a-amber .alert-ic { background: var(--amber-soft); color: var(--amber); }
.alert-row.a-graph .alert-ic { background: var(--graph-soft); color: var(--graph); }
.alert-row.a-green .alert-ic { background: var(--green-soft); color: var(--green); }
.alert-t { font-size: 13px; font-weight: 600; color: var(--ink); }
.alert-d { font-size: 12.5px; color: var(--muted); margin-top: 1px; line-height: 1.4; }

/* ----------------------------- Mini rows (listas compactas) -------------- */
.mini-row { display: flex; align-items: center; gap: 11px; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; border-radius: 8px; }
.mini-row:last-child { border-bottom: none; }
.mini-row:hover { background: var(--el); }
.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan-glow); flex: 0 0 8px; }
.mini-dot.r { background: var(--red); box-shadow: 0 0 6px rgba(239,68,68,.6); }
.mini-main { flex: 1; min-width: 0; }
.mini-t { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.mini-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.mini-meta.red { color: var(--red); }

/* guarda global: ícone dentro de card, subtítulo ou link nunca estoura */
.kcard svg, .kc-sub svg, .kc-client svg, .pill-link svg, .mini-row svg { width: 12px; height: 12px; flex: 0 0 12px; display: inline-block; vertical-align: -1px; }

/* ----------------------------- Kanban cards (CRM / tarefas) -------------- */
.kcard .kc-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; }
.kcard .kc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.kc-val.amber { color: var(--amber); }
.pipeline-board .kcol { flex: 0 0 250px; width: 250px; }
.kcol-head .kcol-sum { font-family: var(--mono); font-size: 10px; color: var(--cyan-light); display: block; margin-top: 3px; }

/* ----------------------------- Detalhe (genérico) ----------------------- */
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.detail-hero .dh-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.entity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px 22px; }
.eg-l { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.eg-v { font-size: 13.5px; color: var(--ink); margin-top: 4px; font-weight: 500; word-break: break-word; }
.eg-v a { color: var(--cyan); } .eg-v a:hover { text-decoration: underline; }

/* contato decisor / influencia */
.pill-yes { color: var(--green); font-weight: 600; } .pill-no { color: var(--faint); }

/* barra de progresso pequena em células */
.cell-prog { display: flex; align-items: center; gap: 8px; }
.cell-prog .pbar { width: 60px; height: 6px; background: var(--el); border-radius: 100px; overflow: hidden; }
.cell-prog .pbar > span { display: block; height: 100%; background: var(--cyan); border-radius: 100px; }
.cell-prog small { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ações no cabeçalho de detalhe (editar + excluir) */
.hero-actions { position: absolute; top: 18px; right: 20px; display: flex; gap: 8px; z-index: 2; }
.hero-actions .ch-edit { position: static; top: auto; right: auto; }
.ch-edit.danger { color: #fca5a5; }
.ch-edit.danger:hover { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.4); color: #fff; }

/* ações de linha em tabelas (editar/excluir) */
.row-actions { display: inline-flex; gap: 5px; }
.row-actions .ra-btn { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); background: var(--el); transition: .12s; }
.row-actions .ra-btn svg { width: 14px; height: 14px; }
.row-actions .ra-btn:hover { color: var(--cyan); border-color: rgba(79,195,247,.4); }
.row-actions .ra-btn.danger:hover { color: #fca5a5; border-color: rgba(239,68,68,.4); background: var(--red-soft); }

/* link externo (Action Hub) */
.ext-card { display: flex; align-items: center; gap: 16px; padding: 20px 22px; background: linear-gradient(135deg, rgba(79,195,247,.10), rgba(2,119,189,.06)); border: 1px solid rgba(79,195,247,.25); border-radius: var(--radius); }
.ext-card .ec-ic { width: 46px; height: 46px; border-radius: 11px; background: rgba(79,195,247,.15); display: grid; place-items: center; flex: 0 0 46px; box-shadow: 0 0 18px var(--cyan-glow); }
.ext-card .ec-ic svg { width: 22px; height: 22px; color: var(--cyan); }
.ext-card .ec-main { flex: 1; min-width: 0; } .ext-card .ec-main b { color: var(--ink); font-size: 15px; } .ext-card .ec-main p { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* tab bar simples */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabbar .tab { padding: 10px 15px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; transition: .15s; }
.tabbar .tab:hover { color: var(--ink2); }
.tabbar .tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

/* segmented quick filters (views de tarefas) */
.segbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.seg { font-size: 12.5px; color: var(--muted); background: var(--el); border: 1px solid var(--line); border-radius: 100px; padding: 7px 14px; font-weight: 500; transition: .15s; }
.seg:hover { border-color: rgba(79,195,247,.4); color: var(--cyan-light); }
.seg.on { background: rgba(79,195,247,.14); color: var(--cyan-light); border-color: rgba(79,195,247,.5); }
.seg .c { font-family: var(--mono); margin-left: 6px; opacity: .8; }

/* search input inline em filtros */
.filters .input.search-inline { min-width: 220px; }

/* menu lateral em acordeão (grupos abrem/fecham ao clicar no título) */
.nav-group { margin-bottom: 2px; }
.nav-group-head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 11px; border-radius: 9px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; color: rgba(240,244,248,.40); font-weight: 500; transition: .15s; }
.nav-group-head:hover { color: rgba(240,244,248,.78); background: rgba(255,255,255,.04); }
.nav-group-head .ng-chevron { width: 12px; height: 12px; flex: 0 0 12px; transition: transform .18s ease; opacity: .8; }
.nav-group.open .nav-group-head { color: rgba(240,244,248,.62); }
.nav-group.open .nav-group-head .ng-chevron { transform: rotate(90deg); color: var(--cyan); opacity: 1; }
.nav-group-head span { flex: 1; text-align: left; }
.nav-group-items { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .22s ease, opacity .18s ease; padding-left: 4px; }
.nav-group.open .nav-group-items { max-height: 520px; opacity: 1; margin-top: 2px; }
/* no modo rail (recolhido), mostra todos os ícones e esconde os títulos de grupo */
@media (min-width: 881px) {
  .app.collapsed .nav-group-head { display: none; }
  .app.collapsed .nav-group-items { max-height: none !important; opacity: 1 !important; padding-left: 0; }
}

/* lista de navegação: ocupa o espaço e rola até o fim quando não couber */
.sidebar { overflow: hidden; }
.nav-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin-right: -8px; padding-right: 8px; }
.nav-list::-webkit-scrollbar { width: 8px; }
.nav-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.nav-list::-webkit-scrollbar-thumb:hover { background: rgba(79,195,247,.35); background-clip: padding-box; }
.brand, .nav-foot { flex: 0 0 auto; }

/* marca da barra lateral (lockup horizontal, sempre visível por inteiro) */
.brand { display: flex; align-items: center; gap: 11px; justify-content: flex-start; padding: 6px 8px 18px; }
.brand-mark { width: 20px; height: 46px; flex: 0 0 20px; }
.brand-wm { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-wm .wm { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: 1px; color: #EAF2F8; }
.brand-wm .wm i { color: var(--cyan); font-style: normal; text-shadow: 0 0 10px var(--cyan-glow); }
.brand-wm .bt { font-family: var(--mono); font-size: 8px; letter-spacing: 2.4px; text-transform: uppercase; color: rgba(79,195,247,.72); margin-top: 6px; }
@media (min-width: 881px) {
  .app.collapsed .brand { justify-content: center; padding: 6px 0 16px; }
  .app.collapsed .brand-wm { display: none; }
}

/* seletor "atuando como" na barra lateral */
.actor-select { width: 100%; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: #dfe7ef; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 7px; padding: 5px 8px; appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%234FC3F7' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; padding-right: 26px; }
.actor-select option { background: var(--card); color: var(--ink); }
.nav-user small { text-transform: uppercase; letter-spacing: .5px; font-size: 9.5px; }
.app.collapsed .nav-user > div { display: none; }

/* barra de adição rápida de tarefas */
.quick-add { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 18px; flex-wrap: wrap; }
.quick-add .qa-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--blue-soft); color: var(--cyan); display: grid; place-items: center; flex: 0 0 32px; }
.quick-add .qa-ic svg { width: 16px; height: 16px; }
.quick-add .qa-input { flex: 1 1 280px; min-width: 200px; font-family: var(--sans); font-size: 14px; color: var(--ink); background: var(--el); border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px; outline: none; transition: .15s; }
.quick-add .qa-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--blue-soft); }
.quick-add .qa-input::placeholder { color: var(--faint); }
.quick-add .qa-prio { flex: 0 0 auto; }
.quick-add .qa-venc { flex: 0 0 auto; width: auto; }
@media (max-width: 880px) { .quick-add .qa-input { flex: 1 1 100%; } .quick-add .qa-prio, .quick-add .qa-venc, .quick-add .btn { flex: 1 1 auto; } }

/* checkbox inline na tabela de tarefas */
.check-box-inline { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--hair); display: grid; place-items: center; transition: .15s; background: transparent; }
.check-box-inline svg { width: 12px; height: 12px; color: #06121c; opacity: 0; }
.check-box-inline:hover { border-color: var(--cyan); }
.check-box-inline.done { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px rgba(34,197,94,.45); }
.check-box-inline.done svg { opacity: 1; }

/* boards roláveis */
.task-board, .pipeline-board { overflow-x: visible; }

/* barra de rolagem no topo do kanban (arrastável, espelha a de baixo) */
.kanban-topbar { overflow-x: auto; overflow-y: hidden; margin-bottom: 10px; }
.kanban-topbar .kt-spacer { height: 1px; }
.kanban-topbar::-webkit-scrollbar { height: 13px; }
.kanban-topbar::-webkit-scrollbar-track { background: var(--el); border-radius: 100px; }
.kanban-topbar::-webkit-scrollbar-thumb { background: rgba(79,195,247,.38); border-radius: 100px; border: 3px solid var(--bg); background-clip: padding-box; }
.kanban-topbar::-webkit-scrollbar-thumb:hover { background: rgba(79,195,247,.65); background-clip: padding-box; }

/* ------------------- Ações inline na timeline (editar/apagar) ------------ */
.tl-act, .cmt-del { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; color: var(--faint); transition: .12s; vertical-align: middle; margin-left: 4px; }
.tl-act svg, .cmt-del svg { width: 12px; height: 12px; }
.tl-act:hover { color: var(--cyan); background: var(--blue-soft); }
.tl-act.danger:hover, .cmt-del:hover { color: var(--red); background: var(--red-soft); }

/* ----------------------------- Banner de sincronização ------------------- */
.sync-banner { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 150; display: flex; align-items: center; gap: 13px; background: var(--card); border: 1px solid rgba(79,195,247,.45); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg), 0 0 24px var(--cyan-glow); max-width: min(560px, calc(100vw - 32px)); }
.sync-banner .sb-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-soft); color: var(--cyan); display: grid; place-items: center; flex: 0 0 34px; }
.sync-banner .sb-ic svg { width: 16px; height: 16px; }
.sync-banner .sb-txt { flex: 1; min-width: 0; }
.sync-banner .sb-txt b { display: block; font-size: 13.5px; color: var(--ink); }
.sync-banner .sb-txt small { font-size: 12px; color: var(--muted); }

/* ----------------------------- Avatar vazio / seleção de busca ----------- */
.avatar.none { background: var(--el); color: var(--faint); border: 1px dashed var(--hair); font-weight: 500; }
.sr-item.sel { background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(79,195,247,.35); }
svg.flip { transform: rotate(180deg); }

/* ----------------------------- Telefone / WhatsApp ----------------------- */
.phone-acts { display: inline-flex; gap: 5px; }
.pa-btn { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); background: var(--el); transition: .12s; }
.pa-btn svg { width: 13px; height: 13px; }
.pa-btn:hover { color: var(--cyan); border-color: rgba(79,195,247,.4); }
.pa-btn.wa:hover { color: #25D366; border-color: rgba(37,211,102,.45); background: rgba(37,211,102,.10); }

/* ----------------------------- Aviso de duplicado ------------------------ */
.dup-warn { font-size: 12.5px; color: var(--amber); font-weight: 600; margin-right: 12px; }

/* ----------------------------- Metas (dashboard) ------------------------- */
.goal-row { margin-bottom: 16px; }
.goal-row:last-child { margin-bottom: 0; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink2); margin-bottom: 7px; }
.goal-top b { font-family: var(--mono); color: var(--ink); }
.goal-meta { color: var(--faint); font-weight: 500; font-size: 11.5px; }

/* ----------------------------- Calendário de tarefas --------------------- */
.cal-wrap { padding: 16px 18px 18px; }
.cal-head { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 14px; }
.cal-head b { font-family: var(--display); font-size: 16px; color: var(--ink); min-width: 170px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dows { margin-bottom: 6px; }
.cal-dow { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint); text-align: center; padding: 4px 0; }
.cal-cell { min-height: 92px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 9px; padding: 6px; }
.cal-cell.off { background: transparent; border-color: transparent; }
.cal-cell.today { border-color: rgba(79,195,247,.55); box-shadow: inset 0 0 0 1px rgba(79,195,247,.3); }
.cal-cell.today .cal-day { color: var(--cyan); font-weight: 700; }
.cal-day { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.cal-task { font-size: 11px; line-height: 1.3; color: var(--ink2); background: var(--el); border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 5px; padding: 3px 6px; margin-bottom: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: .12s; }
.cal-task:hover { border-color: rgba(79,195,247,.45); color: var(--ink); }
.cal-task.late { border-left-color: var(--red); }
.cal-task.hot { border-left-color: var(--amber); }
.cal-task.done { border-left-color: var(--green); color: var(--faint); text-decoration: line-through; }
@media (max-width: 880px) { .cal-cell { min-height: 60px; } .cal-task { font-size: 10px; } }

/* ----------------------------- Relatório semanal ------------------------- */
.rw-toolbar { max-width: 860px; margin: 0 auto 16px; display: flex; justify-content: flex-end; }
.rw-doc { max-width: 860px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.rw-band { height: 4px; background: linear-gradient(90deg, var(--blue-ink), var(--cyan)); box-shadow: 0 0 14px var(--cyan-glow); }
.rw-inner { padding: 34px 42px 38px; }
.rw-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 22px; }
.rw-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); margin-bottom: 8px; }
.rw-head h2 { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--ink-deep); }
.rw-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; line-height: 1.7; }
.rw-meta b { color: var(--ink); }
.rw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
.rw-stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg-alt); }
.rw-v { font-family: var(--mono); font-size: 20px; font-weight: 600; color: var(--ink-deep); }
.rw-stat.g .rw-v { color: var(--green); } .rw-stat.r .rw-v { color: var(--red); }
.rw-l { font-size: 11px; color: var(--muted); margin-top: 4px; }
.rw-sec { margin-bottom: 22px; }
.rw-sec h3 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--cyan); font-weight: 500; margin-bottom: 10px; }
.rw-sec ul { list-style: none; }
.rw-sec li { font-size: 13.5px; color: var(--ink2); padding: 5px 0 5px 18px; position: relative; line-height: 1.5; }
.rw-sec li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: rgba(79,195,247,.55); }
.rw-sec li b { color: var(--ink); }
.rw-sub { color: var(--muted); font-size: 12.5px; }
.rw-money { font-family: var(--mono); color: var(--green); font-weight: 600; }
.rw-empty { color: var(--faint); }
.rw-empty::before { background: var(--faint) !important; }
.rw-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.rw-note b { color: var(--ink); }
.rw-foot { display: flex; justify-content: space-between; margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .6px; }
@media (max-width: 880px) { .rw-inner { padding: 22px; } .rw-stats { grid-template-columns: repeat(2, 1fr); } }
@media print {
  .sidebar, .topbar, .scrim, .rw-toolbar, .page-head, .toast { display: none !important; }
  body, .app, .main, .content { background: #fff !important; }
  .content { padding: 0 !important; max-width: 100% !important; }
  .rw-doc { box-shadow: none; border: none; max-width: 100%; border-radius: 0; background: #fff; }
  .rw-inner { padding: 10mm 8mm; }
  .rw-head h2, .rw-v, .rw-sec li b { color: #111 !important; }
  .rw-sec li, .rw-note { color: #333 !important; }
  .rw-l, .rw-sub, .rw-meta, .rw-foot { color: #666 !important; }
  .rw-stat { background: #fff; border-color: #ddd; }
}

@media (max-width: 880px) {
  .notif-panel { right: 8px; left: 8px; width: auto; }
  .entity-grid { grid-template-columns: 1fr 1fr; }
}
