/* ZS Partners — folha de estilos única.
   Cores e tipografia seguem o Manual de Identidade Visual v1.0;
   a interface usa cantos arredondados e linhas suaves. */

:root {
  --onyx: #0A0A0B;
  --white: #FFFFFF;
  --sky: #4DB2EC;

  --bg: #FFFFFF;
  --surface: #F4F6F8;
  --surface-2: #FFFFFF;
  --elevated: #FFFFFF;
  --hairline: #DADDE2;
  --border: #C9CDD3;
  --border-strong: #8A9099;
  --ink: #0A0A0B;
  --ink-muted: #5B6068;
  --sky-tint: #E8F5FD;
  --sky-ink: #1A6EA3;
  --accent: #4DB2EC;
  --accent-ink: #0A0A0B;
  --primary-bg: #0A0A0B;
  --primary-ink: #FFFFFF;
  --success: #1E7F4F;
  --warning: #A35F00;
  --danger: #B42318;
  --success-tint: #E7F4ED;
  --warning-tint: #FBF1E1;
  --danger-tint: #FBEAE8;
  --glass: rgba(255, 255, 255, 0.78);
  --shadow-sm: 0 1px 2px rgba(10, 10, 11, 0.06);
  --shadow-md: 0 6px 24px rgba(10, 10, 11, 0.08), 0 1px 3px rgba(10, 10, 11, 0.06);
  --shadow-lg: 0 24px 64px rgba(10, 10, 11, 0.18), 0 2px 8px rgba(10, 10, 11, 0.08);
  --focus: 0 0 0 3px rgba(77, 178, 236, 0.45);

  --topbar-h: 56px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #07080A;
  --surface: #101217;
  --surface-2: #161920;
  --elevated: #1A1E26;
  --hairline: #262B35;
  --border: #343A46;
  --border-strong: #5C6575;
  --ink: #F5F7FA;
  --ink-muted: #A3ABB8;
  --sky-tint: rgba(92, 192, 255, 0.14);
  --sky-ink: #7FCFFF;
  --accent: #5CC0FF;
  --accent-ink: #050608;
  --primary-bg: #FFFFFF;
  --primary-ink: #0A0A0B;
  --success: #3DDC97;
  --warning: #FFC24B;
  --danger: #FF6B6B;
  --success-tint: rgba(61, 220, 151, 0.14);
  --warning-tint: rgba(255, 194, 75, 0.14);
  --danger-tint: rgba(255, 107, 107, 0.14);
  --glass: rgba(22, 25, 32, 0.78);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 72px rgba(0, 0, 0, 0.6);
  --focus: 0 0 0 3px rgba(92, 192, 255, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--sky-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--ink-muted); }
.ic { flex: none; display: block; }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--sky-ink);
}

/* ---------- Logotipo ---------- */

.logo-h { display: inline-flex; align-items: center; gap: calc(var(--lh) * .32); height: var(--lh); color: var(--onyx); }
.logo-h.neg { color: #fff; }
.logo-h .logo-text { display: flex; flex-direction: column; justify-content: space-between; height: var(--lh); }
.logo-h .logo-name { font-size: calc(var(--lh) * .66); line-height: calc(var(--lh) * .62); font-weight: 300; letter-spacing: -0.01em; white-space: nowrap; margin-top: calc(var(--lh) * -.01); }
.logo-h .logo-pb { font-size: calc(var(--lh) * .2); line-height: calc(var(--lh) * .13); font-weight: 500; letter-spacing: .16em; white-space: nowrap; color: #5B6068; }
.logo-h.neg .logo-pb { color: #A9AEB6; }
.logo-name b { font-weight: 600; }
.logo-pb b { font-weight: 700; color: var(--onyx); }
.logo-h.neg .logo-pb b, .logo-v.neg .logo-pb b { color: #fff; }

.logo-v { display: inline-flex; flex-direction: column; align-items: center; color: var(--onyx); }
.logo-v.neg { color: #fff; }
.logo-v .zs-symbol { margin-bottom: calc(var(--ls) * .26); }
.logo-v .logo-name { font-size: calc(var(--ls) * .5); line-height: 1; font-weight: 300; letter-spacing: -0.01em; }
.logo-v .logo-pb { margin-top: calc(var(--ls) * .17); font-size: calc(var(--ls) * .14); line-height: 1; font-weight: 500; letter-spacing: .16em; color: #A9AEB6; }

/* Marca Zattar */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { display: block; width: auto; }
.brand-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, .22); }
.brand-app { font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: .02em; color: #C9CED6; white-space: nowrap; }
.brand-login { display: block; max-width: 100%; height: auto; }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid transparent; background: transparent;
  font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary-bg); color: var(--primary-ink); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.15); }
[data-theme='dark'] .btn-primary:hover:not(:disabled) { filter: brightness(.92); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover:not(:disabled) { filter: brightness(1.06); }
.btn-ghost { border-color: var(--border); background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--border-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; flex: none;
  border: 0; border-radius: 9px; background: transparent; color: inherit; cursor: pointer;
  transition: background-color .15s, color .15s, opacity .15s;
}
.icon-btn:hover { background: rgba(127, 135, 150, .14); }
.icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }

.link-btn { border: 0; background: none; padding: 0; color: var(--sky-ink); font-weight: 500; cursor: pointer; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Formulários ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink); }
.field-row { display: flex; align-items: center; justify-content: space-between; }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
  font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 22px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); opacity: .8; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface); color: var(--ink-muted); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-wrap .icon-btn { position: absolute; right: 7px; top: 7px; color: var(--ink-muted); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.form-error { display: none; padding: 10px 14px; border-radius: var(--r-md); background: var(--danger-tint); color: var(--danger); font-size: 13px; line-height: 18px; }
.form-error.show { display: block; }
.form-info { display: none; padding: 10px 14px; border-radius: var(--r-md); background: var(--sky-tint); color: var(--sky-ink); font-size: 13px; line-height: 18px; }
.form-info.show { display: block; }
.btn.loading { position: relative; opacity: 1; cursor: progress; }
.btn.loading::after {
  content: ''; width: 16px; height: 16px; margin-left: 2px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: btnSpin .7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
.form-error .err-code { display: block; margin-top: 4px; font-size: 11px; line-height: 15px; opacity: .7; letter-spacing: .02em; }
.form-note { font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.more-hint { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--warning); }
.more-hint[hidden] { display: none; }
.more-hint .ic { flex: none; }

/* Interruptor (switch) */
.switch { position: relative; display: inline-flex; flex: none; width: 36px; height: 20px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background-color .2s; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
.switch input:disabled + .track { opacity: .5; }
.switch.sm { width: 30px; height: 18px; }
.switch.sm .track::after { width: 14px; height: 14px; }
.switch.sm input:checked + .track::after { transform: translateX(12px); }

/* ---------- Avatar e selos ---------- */

.avatar {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; letter-spacing: .02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--surface); color: var(--ink); border: 1px solid var(--hairline);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-sky { background: var(--sky-tint); color: var(--sky-ink); border-color: transparent; }
.badge-success { background: var(--success-tint); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-tint); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-tint); color: var(--danger); border-color: transparent; }
.badge-onyx { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }

/* ---------- Estrutura geral ---------- */

#app { min-height: 100%; }
.boot { min-height: 100vh; display: grid; place-items: center; background: var(--onyx); }
.boot img { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.shell-main { padding-top: var(--topbar-h); min-height: 100vh; }
.page { max-width: 1200px; margin: 0 auto; padding: 40px 32px 96px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; line-height: 38px; margin-top: 6px; }
.page-head p { margin-top: 6px; color: var(--ink-muted); }
.page-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-actions .select, .page-actions .input { height: 44px; }

.card { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--hairline); }
.card-head h2 { font-size: 16px; line-height: 22px; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  padding: 56px 24px; color: var(--ink-muted);
  background-image: repeating-linear-gradient(141deg, transparent 0 13px, var(--hairline) 13px 14px);
  background-size: 100% 100%; border-radius: var(--r-lg);
  -webkit-mask-image: none;
}
.empty-inner { background: var(--surface-2); padding: 20px 28px; border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 420px; }
.empty-inner .ic { color: var(--sky-ink); }
.empty-inner strong { color: var(--ink); font-weight: 600; }

/* Tabelas */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-muted); padding: 14px 20px; border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
.table td { padding: 14px 20px; border-bottom: 1px solid var(--hairline); vertical-align: middle; height: 64px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: var(--surface); }
.table .cell-user { display: flex; align-items: center; gap: 12px; }
.table .cell-user div { display: flex; flex-direction: column; }
.table .cell-user small { color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.table .actions { display: flex; justify-content: flex-end; gap: 4px; }

/* ---------- Barra superior ---------- */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--topbar-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 16px; background: var(--onyx); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(77,178,236,.55), transparent); opacity: 0; transition: opacity .3s; }
.topbar.viewing::after { opacity: 1; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tb-right { justify-content: flex-end; }
.tb-left .logo-link { display: inline-flex; align-items: center; height: 36px; margin-left: 10px; padding: 0 8px; border-radius: 8px; }
.tb-left .logo-link:hover { text-decoration: none; background: rgba(255,255,255,.06); }
.tb-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .14); margin: 0 6px; flex: none; }
.topbar .icon-btn { color: #D5D9DF; }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.topbar .icon-btn.active { color: var(--sky); }

.tb-center {
  display: flex; align-items: center; gap: 2px; height: 40px; padding: 4px;
  border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
}
.tb-center .icon-btn { position: relative; }
.tb-center .tb-sep { margin: 0 4px; }
.tb-dock-toggle { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 7px; border-radius: 9px; color: #D5D9DF; cursor: pointer; }
.tb-dock-toggle:hover { background: rgba(255,255,255,.1); color: #fff; }
.tb-dock-toggle .switch .track { background: rgba(255,255,255,.22); }
.tb-dock-toggle .switch input:checked + .track { background: var(--sky); }

.notif-count {
  position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--sky); color: var(--onyx);
  font-size: 9px; font-weight: 700; line-height: 15px; text-align: center; box-shadow: 0 0 0 2px var(--onyx);
}

.user-btn {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 12px; border: 0; border-radius: 12px;
  background: transparent; color: #fff; cursor: pointer; transition: background-color .15s; max-width: 320px;
}
.user-btn:hover, .user-btn[aria-expanded='true'] { background: rgba(255, 255, 255, .08); }
.user-btn .u-text { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.user-btn .u-name { font-size: 13px; line-height: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.user-btn .u-role { font-size: 11px; line-height: 14px; color: #A9AEB6; }
.user-btn .ic { color: #A9AEB6; }

/* Menus suspensos */
.menu {
  position: fixed; z-index: 80; min-width: 260px; padding: 6px;
  background: var(--elevated); color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right;
  transition: opacity .14s ease, transform .14s ease; pointer-events: none;
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; border-bottom: 1px solid var(--hairline); margin-bottom: 6px; }
.menu-head div { display: flex; flex-direction: column; min-width: 0; }
.menu-head strong { font-size: 14px; line-height: 18px; font-weight: 600; }
.menu-head small { font-size: 12px; line-height: 16px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px;
  border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: 14px; text-align: left; cursor: pointer;
}
.menu-item .ic { color: var(--ink-muted); }
.menu-item:hover { background: var(--surface); text-decoration: none; }
.menu-item:hover .ic { color: var(--ink); }
.menu-sep { height: 1px; background: var(--hairline); margin: 6px 4px; }
.menu-label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); padding: 8px 12px 4px; }

/* Painel de notificações */
.notif-panel { width: 380px; padding: 0; transform-origin: top center; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
.notif-head h3 { font-size: 15px; }
.notif-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.notif-item { display: flex; gap: 12px; width: 100%; padding: 12px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.notif-item:hover { background: var(--surface); }
.notif-item .n-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.notif-item.unread .n-dot { background: var(--accent); }
.notif-item div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-item strong { font-size: 14px; line-height: 19px; font-weight: 600; }
.notif-item span { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.notif-item small { font-size: 12px; color: var(--ink-muted); }
.notif-empty { padding: 40px 16px; text-align: center; color: var(--ink-muted); font-size: 14px; }

/* Faixa discreta de "visualizar como" */
.viewas-pill {
  position: fixed; z-index: 55; top: calc(var(--topbar-h) + 12px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 6px 0 14px;
  border-radius: 999px; background: var(--elevated); color: var(--ink);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-md); font-size: 13px; white-space: nowrap;
}
.viewas-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--sky-tint); }
.viewas-pill strong { font-weight: 600; }
.viewas-pill .muted { font-size: 12px; }
.viewas-pill button { height: 26px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--primary-bg); color: var(--primary-ink); font-size: 12px; font-weight: 600; cursor: pointer; }

/* ---------- Dock flutuante (estilo macOS, discreto) ---------- */

.dock-hotzone { position: fixed; z-index: 50; left: 0; top: var(--topbar-h); bottom: 0; width: 12px; }
.dock {
  --ds: 36px;
  position: fixed; z-index: 51; left: 10px; top: calc(50% + var(--topbar-h) / 2);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 7px;
  max-height: calc(100vh - var(--topbar-h) - 24px);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--hairline); border-radius: 16px;
  box-shadow: 0 18px 48px -12px rgba(10, 10, 11, .22), 0 2px 6px rgba(10, 10, 11, .06);
  transform: translate(calc(-100% - 20px), -50%); opacity: 0;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.1), opacity .18s ease;
}
/* Fio sutil em Broker Sky no topo */
.dock::before { content: ''; position: absolute; top: -1px; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--sky), transparent); opacity: .7; }
.dock.show { transform: translate(0, -50%); opacity: 1; }
.dock-item {
  position: relative; display: grid; place-items: center; width: var(--ds); height: var(--ds); border-radius: 10px;
  color: var(--ink-muted); background: transparent;
  transition: width .12s ease-out, height .12s ease-out, background-color .15s, color .15s; cursor: pointer;
}
.dock-item:hover { text-decoration: none; background: var(--sky-tint); color: var(--sky-ink); }
.dock-item.active { background: var(--primary-bg); color: var(--primary-ink); box-shadow: 0 4px 12px -4px rgba(10, 10, 11, .35); }
.dock-item.active::before { content: ''; position: absolute; left: -7px; top: 50%; width: 3px; height: 14px; margin-top: -7px; border-radius: 3px; background: var(--sky); }
.dock-badge {
  position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--sky); color: var(--onyx); font-size: 9px; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface-2);
}
.dock-sep { width: 20px; height: 1px; margin: 2px calc((var(--ds) - 20px) / 2); background: var(--hairline); }
.dock-tip {
  position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-4px, -50%);
  padding: 6px 10px; border-radius: 8px; background: var(--onyx); color: #fff;
  font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .12s, transform .12s; box-shadow: var(--shadow-md);
}
[data-theme='dark'] .dock-tip { background: #fff; color: var(--onyx); }
.dock-item:hover .dock-tip { opacity: 1; transform: translate(0, -50%); }

/* ---------- Toasts ---------- */

#toasts { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: var(--onyx); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
[data-theme='dark'] .toast { background: #fff; color: var(--onyx); }
.toast.in { opacity: 1; transform: none; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.toast-success .toast-dot { background: #3DDC97; }
.toast-error .toast-dot { background: #FF6B6B; }

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 10, 11, .42); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s;
}
.modal-backdrop.in { opacity: 1; }
.modal {
  max-height: calc(100vh - 32px); overflow-y: auto; background: var(--elevated); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(.98); transition: transform .18s ease;
}
.modal-backdrop.in .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 4px 24px; }
.modal-head h2 { font-size: 18px; line-height: 24px; }
.modal-body { padding: 16px 24px 24px; }
.modal-body > p + .form-actions { margin-top: 24px; }

/* ---------- Login ---------- */

.login { display: grid; grid-template-columns: 7fr 3fr; min-height: 100vh; }
.login-hero {
  position: relative; display: grid; place-items: center; overflow: hidden; background-color: var(--onyx);
  background-image:
    repeating-linear-gradient(141deg, transparent 0 109px, var(--sky) 109px 112px),
    repeating-linear-gradient(141deg, #17191D 0 7px, transparent 7px 16px);
}
.login-hero-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 72px 88px 64px; background: var(--onyx); border-radius: 28px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 40px 120px rgba(0,0,0,.5);
}
.login-tagline { margin-top: 44px; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 50px; letter-spacing: -0.005em; color: #fff; max-width: 520px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px 40px; background: var(--bg); position: relative; }
.login-form { width: 100%; max-width: 360px; margin: 0 auto; }
.login-form h1 { font-size: 26px; line-height: 32px; margin: 10px 0 6px; }
.login-form .lead { color: var(--ink-muted); font-size: 14px; margin-bottom: 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-muted); font-size: 12px; margin: 4px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--hairline); }
.btn-google { background: var(--surface-2); border-color: var(--border); color: var(--ink); font-weight: 500; }
.btn-google:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface); }
.login-foot { position: absolute; left: 40px; right: 40px; bottom: 28px; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-muted); }
.login-theme { position: absolute; top: 20px; right: 20px; color: var(--ink-muted); }
.login-theme:hover { color: var(--ink); }

/* ---------- Início ---------- */

.home { max-width: 1200px; margin: 0 auto; padding: 72px 32px 96px; }
.home-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.home-hero h1 { font-size: 40px; line-height: 46px; font-weight: 600; letter-spacing: -0.02em; margin-top: 10px; }
.home-hero h1 span { font-weight: 300; }
.home-hero .sub { margin-top: 10px; color: var(--ink-muted); font-size: 16px; }

.search-box { position: relative; width: min(760px, 100%); margin-top: 36px; z-index: 46; }
.search-field {
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 10px 0 22px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  transition: border-color .15s, box-shadow .15s;
}
.search-field:focus-within { border-color: var(--accent); box-shadow: var(--shadow-md), var(--focus); }
.search-field .ic { color: var(--ink-muted); }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 17px; color: var(--ink); }
.search-field input::placeholder { color: var(--ink-muted); }
.search-field input:focus-visible { box-shadow: none; }
.search-field input::-webkit-search-cancel-button { display: none; }
.kbd { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); max-height: 460px; overflow-y: auto; padding: 8px;
  background: var(--elevated); border: 1px solid var(--hairline); border-radius: 20px; box-shadow: var(--shadow-lg); text-align: left; display: none;
}
.search-results.open { display: block; }
.sr-group { padding: 10px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.sr-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.sr-item:hover, .sr-item.sel { background: var(--surface); }
.sr-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--sky-tint); color: var(--sky-ink); }
.sr-item div { display: flex; flex-direction: column; min-width: 0; }
.sr-item strong { font-size: 14px; line-height: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item span { font-size: 13px; line-height: 18px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item mark { background: var(--sky-tint); color: var(--sky-ink); border-radius: 3px; padding: 0 1px; }
.sr-empty { padding: 28px 16px; text-align: center; color: var(--ink-muted); font-size: 14px; }

.news { margin-top: 72px; }
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.news-head h2 { font-size: 22px; line-height: 28px; margin-top: 6px; }
.news-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface-2);
  color: var(--ink-muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.chip:hover { color: var(--ink); border-color: var(--border); }
.chip.on { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.news-updated { font-size: 12px; color: var(--ink-muted); margin-left: 4px; }

.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 228px; gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; border-color: var(--border); }
.tile-img { flex: 1; min-height: 0; background: var(--surface) center / cover no-repeat; }
.tile-img.ph { background-image: repeating-linear-gradient(141deg, transparent 0 13px, var(--hairline) 13px 14px); display: grid; place-items: center; }
.tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.tile-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sky-ink); }
.tile-meta .t { color: var(--ink-muted); letter-spacing: 0; text-transform: none; font-weight: 500; }
.tile h3 { font-size: 15px; line-height: 20px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile.text-only .tile-body { flex: 1; justify-content: flex-start; padding-top: 18px; }
.tile.text-only h3 { -webkit-line-clamp: 5; font-size: 17px; line-height: 23px; }
.tile.text-only p { font-size: 13px; line-height: 19px; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile.featured { grid-column: span 2; grid-row: span 2; }
.tile.featured .tile-img { flex: 1; }
.tile.featured h3 { font-size: 24px; line-height: 30px; -webkit-line-clamp: 3; }
.tile.featured p { font-size: 14px; line-height: 21px; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile.featured .tile-body { padding: 20px 24px 22px; gap: 8px; }
.tile.wide { grid-column: span 2; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--hairline) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.news-error { grid-column: 1 / -1; }

/* ---------- Páginas internas ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.kv > div { padding: 18px 24px; border-bottom: 1px solid var(--hairline); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; min-height: 76px; }
.kv > div:nth-child(3n) { border-right: 0; }
.kv dt { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.kv dd { margin: 0; font-size: 15px; line-height: 22px; }
.kv .full { grid-column: 1 / -1; border-right: 0; }

.toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.toolbar .input, .toolbar .select { height: 40px; font-size: 14px; border-radius: 10px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.toolbar:last-child { border-bottom: 0; }

.msg-list { display: flex; flex-direction: column; }
.msg { padding: 20px 24px; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 10px; }
.msg:last-child { border-bottom: 0; }
.msg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.msg-top .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.msg-top .who div { display: flex; flex-direction: column; min-width: 0; }
.msg-top strong { font-size: 15px; line-height: 20px; }
.msg-top small { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.msg-body { white-space: pre-wrap; color: var(--ink); font-size: 14px; line-height: 21px; }
.msg-reply { margin-left: 44px; padding: 12px 16px; border-radius: 12px; background: var(--sky-tint); font-size: 14px; line-height: 21px; white-space: pre-wrap; }
.msg-reply small { display: block; color: var(--sky-ink); font-weight: 600; font-size: 12px; margin-bottom: 4px; white-space: normal; }
.msg-actions { display: flex; justify-content: flex-end; }

.perm-table { table-layout: fixed; min-width: 760px; }
.perm-table th:first-child, .perm-table td:first-child { width: 30%; }
.perm-table td.center, .perm-table th.center { text-align: center; }
.perm-table td.center > span { display: inline-flex; vertical-align: middle; }
.perm-table .switch { vertical-align: middle; }
.perm-fixed { color: var(--ink-muted); }

.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; border-bottom: 1px solid var(--hairline); }
.settings-row:last-child { border-bottom: 0; }
.settings-row div { display: flex; flex-direction: column; gap: 2px; }
.settings-row .seg { flex-direction: row; gap: 0; }
.settings-row strong { font-size: 15px; line-height: 20px; font-weight: 600; }
.settings-row span { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--hairline); }
.seg button { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.seg button.on { background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow-sm); }

.photo-preview { display: flex; align-items: center; gap: 20px; padding: 4px 0 8px; }
.drop { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 120px; border: 1.5px dashed var(--border); border-radius: 16px; color: var(--ink-muted); font-size: 13px; cursor: pointer; text-align: center; transition: border-color .15s, background-color .15s; }
.drop:hover { border-color: var(--accent); background: var(--sky-tint); color: var(--sky-ink); }

.user-pick { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; margin-top: 12px; }
.user-pick button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.user-pick button:hover { background: var(--surface); }
.user-pick button div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.user-pick strong { font-size: 14px; line-height: 19px; font-weight: 600; }
.user-pick small { font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* ---------- Componentes auxiliares ---------- */

.icon-btn.on { color: var(--sky-ink); background: var(--sky-tint); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-tint); }
.search-mini { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-muted); min-width: 240px; }
.search-mini:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.search-mini input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 14px; color: var(--ink); height: 100%; }
.search-mini input:focus-visible { box-shadow: none; }
.seg-count { margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--hairline); color: var(--ink-muted); font-size: 11px; font-weight: 600; line-height: 20px; text-align: center; }
.seg button.on .seg-count { background: var(--sky-tint); color: var(--sky-ink); }
.module-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 10px 24px -10px var(--c2); }
.module-badge .ic { color: #fff; stroke-width: 2; }
.empty-inner .module-badge .ic { color: #fff; }

/* ---------- Notas ---------- */

[data-color='sky']   { --n-bg: #E8F5FD; --n-bg-d: rgba(77, 178, 236, .16);  --n-dot: #4DB2EC; }
[data-color='mint']  { --n-bg: #E4F6EC; --n-bg-d: rgba(52, 211, 153, .15);  --n-dot: #34D399; }
[data-color='sand']  { --n-bg: #FFF3D6; --n-bg-d: rgba(251, 191, 36, .15);  --n-dot: #FBBF24; }
[data-color='rose']  { --n-bg: #FDE8EC; --n-bg-d: rgba(251, 113, 133, .15); --n-dot: #FB7185; }
[data-color='lilac'] { --n-bg: #EFE9FD; --n-bg-d: rgba(167, 139, 250, .17); --n-dot: #A78BFA; }
[data-color='mist']  { --n-bg: #F1F3F6; --n-bg-d: rgba(163, 171, 184, .13); --n-dot: #A3ABB8; }
[data-color='onyx']  { --n-bg: #F1F3F6; --n-bg-d: rgba(163, 171, 184, .13); --n-dot: #0A0A0B; }

.composer {
  max-width: 680px; margin: 0 auto 32px; padding: 6px 8px; border-radius: 18px;
  background: var(--n-bg); border: 1px solid rgba(10, 10, 11, .06); box-shadow: var(--shadow-md); transition: box-shadow .2s;
}
[data-theme='dark'] .composer, [data-theme='dark'] .note-card, [data-theme='dark'] .note-edit { background: var(--n-bg-d); border-color: var(--hairline); color: var(--ink); }
.composer-title, .composer-text {
  display: block; width: 100%; border: 0; outline: none; background: transparent; color: inherit; resize: none; padding: 10px 12px;
}
.composer-title:focus-visible, .composer-text:focus-visible { box-shadow: none; }
.composer-title { font-size: 16px; font-weight: 600; display: none; }
.composer-text { font-size: 15px; line-height: 22px; min-height: 44px; }
.composer.open .composer-title { display: block; }
.composer-foot { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 4px 6px 12px; }
.composer.open .composer-foot { display: flex; }
.composer-actions { display: flex; align-items: center; gap: 8px; }
.composer [aria-pressed='true'], .note-edit [aria-pressed='true'] { color: var(--sky-ink); background: var(--sky-tint); }
.note-swatches { display: flex; gap: 8px; }
.note-swatch { width: 22px; height: 22px; border-radius: 50%; padding: 0; cursor: pointer; background: var(--n-dot); border: 2px solid var(--surface-2); box-shadow: 0 0 0 1px var(--border); transition: transform .12s; }
.note-swatch:hover { transform: scale(1.12); }
.note-swatch[aria-checked='true'] { box-shadow: 0 0 0 2px var(--ink); }
.note-edit { padding: 8px; border-radius: 16px; background: var(--n-bg); }
.note-edit .composer-title { display: block; }
.note-edit .composer-foot { display: flex; }
.note-edit .form-actions { padding: 8px 4px 4px; }

.notes-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin: 8px 0 12px; }
.notes-label + .notes-grid { margin-bottom: 28px; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-items: stretch; }
.note-card {
  display: flex; flex-direction: column; min-height: 180px; border-radius: 16px; overflow: hidden;
  background: var(--n-bg); color: #0A0A0B; border: 1px solid rgba(10, 10, 11, .06); transition: box-shadow .15s, transform .15s;
}
.note-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.note-card[data-highlight] { box-shadow: 0 0 0 3px var(--accent); }
.note-open { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 8px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.note-owner { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.note-title { font-size: 15px; line-height: 21px; font-weight: 600; }
.note-text { font-size: 14px; line-height: 21px; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.muted-note { opacity: .5; }
.note-foot { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 8px 0 16px; font-size: 12px; }
.note-foot > span { opacity: .6; }
.note-actions { display: flex; gap: 2px; }
.note-card .icon-btn { color: inherit; opacity: .7; }
.note-card .icon-btn:hover { opacity: 1; background: rgba(10, 10, 11, .08); }
[data-theme='dark'] .note-card .icon-btn:hover { background: rgba(255, 255, 255, .08); }
.note-card .icon-btn.on { opacity: 1; color: var(--sky-ink); }

/* ---------- Comunicações (destinatário) ---------- */

.comms-list { display: flex; flex-direction: column; gap: 12px; }
.comm-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%;
  padding: 16px 20px; border-radius: var(--r-lg); border: 1px solid var(--hairline); background: var(--surface-2); color: var(--ink);
  text-align: left; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.comm-row:hover { border-color: var(--border); box-shadow: var(--shadow-md); }
.comm-swatch { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(10,10,11,.08); }
.comm-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.comm-main strong { font-size: 15px; line-height: 20px; }
.comm-main span { font-size: 13px; line-height: 18px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.comm-meta small { font-size: 12px; color: var(--ink-muted); }

/* ---------- Painel de Administração ---------- */

.admin-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 24px; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; color: var(--ink-muted); font-size: 14px; font-weight: 500; }
.admin-tabs a:hover { text-decoration: none; background: var(--surface); color: var(--ink); }
.admin-tabs a.on { background: var(--primary-bg); color: var(--primary-ink); }
.admin-tabs .tb-sep { background: var(--hairline); }
.admin-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-card {
  position: relative; display: flex; align-items: center; gap: 20px; padding: 28px; border-radius: 20px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.admin-card::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.admin-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border); }
.admin-card-ic { display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 18px; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 12px 28px -12px var(--c2); }
.admin-card-ic .ic { stroke-width: 2; }
.admin-card-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.admin-card-text strong { font-size: 20px; line-height: 26px; }
.admin-card-text span { font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.admin-card > .ic { color: var(--ink-muted); }

/* Custos */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; min-height: 128px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); }
.kpi-label { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.kpi-value { font-size: 30px; line-height: 38px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; line-height: 17px; color: var(--ink-muted); }
.kpi-hero { position: relative; overflow: hidden; background: var(--onyx); color: #fff; border-color: transparent; }
.kpi-hero::after { content: ''; position: absolute; right: -52px; top: 0; bottom: 0; width: 100px; background: var(--sky); transform: skewX(-39deg); opacity: .95; }
.kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: #A9AEB6; position: relative; z-index: 1; max-width: 64%; }
.kpi-hero .kpi-value { position: relative; z-index: 1; }

.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; height: 240px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 24px; font-size: 11px; color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; }
.chart-y span { transform: translateY(-50%); }
.chart-y span:last-child { transform: translateY(50%); }
.chart-plot { position: relative; display: flex; flex-direction: column; }
.chart-grid { position: absolute; inset: 0 0 24px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { display: block; height: 1px; background: var(--hairline); }
.chart-bars { position: relative; flex: 1; display: flex; align-items: flex-end; gap: 2px; }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--accent); transition: filter .12s; }
.bar-col.hover .bar { filter: brightness(.82); }
.chart-x { display: flex; justify-content: space-between; height: 24px; align-items: flex-end; font-size: 11px; color: var(--ink-muted); }
.chart-tip { position: absolute; top: -8px; padding: 6px 10px; border-radius: 8px; background: var(--onyx); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-md); }
[data-theme='dark'] .chart-tip { background: #fff; color: var(--onyx); }
.chart-empty { padding: 48px 0; text-align: center; font-size: 14px; }

.cost-table th.num, .cost-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-table tfoot td { border-top: 1px solid var(--hairline); border-bottom: 0; height: 52px; }
.svc-row { cursor: pointer; }
.svc-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.svc-name .ic { color: var(--ink-muted); }
.sku-row td { height: 44px; font-size: 13px; background: var(--surface); padding-left: 44px; }
.sku-row td.num { padding-left: 20px; }
.share { height: 6px; border-radius: 3px; background: var(--hairline); overflow: hidden; margin-bottom: 4px; }
.share span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.method-note { display: flex; gap: 14px; margin: 0 24px 24px; padding: 16px 18px; border-radius: var(--r-md); background: var(--sky-tint); color: var(--ink); }
.method-note .ic { color: var(--sky-ink); margin-top: 2px; }
.method-note div { display: flex; flex-direction: column; gap: 4px; }
.method-note strong { font-size: 14px; }
.method-note span { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 16px; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; display: flex; flex-direction: column; gap: 4px; min-height: 32px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-bg); color: var(--primary-ink); font-size: 14px; font-weight: 600; }
.steps strong { font-size: 15px; line-height: 20px; }
.steps span { font-size: 14px; line-height: 21px; color: var(--ink-muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--hairline); color: var(--ink); }

/* Lista de comunicados (admin) */
.ann-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 190px 110px 196px; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--hairline); }
.ann-row:last-child { border-bottom: 0; }
.ann-row:hover { background: var(--surface); }
.ann-thumb { display: grid; place-items: center; width: 64px; height: 44px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(10,10,11,.08); }
.ann-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ann-row-main strong { font-size: 15px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-row-main span { font-size: 13px; line-height: 18px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-row-metric { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.ann-row-metric strong { font-size: 14px; line-height: 20px; white-space: nowrap; }
.ann-row-metric small { font-size: 12px; line-height: 16px; color: var(--ink-muted); white-space: nowrap; }
.ann-row .badge { justify-self: start; }
.ann-row .actions { display: flex; justify-content: flex-end; gap: 4px; }
.ann-row .actions span.icon-btn { pointer-events: none; }

/* Editor de comunicados */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.editor-form { display: flex; flex-direction: column; gap: 20px; }
.ed-section { padding: 24px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 18px; }
.ed-section h2 { display: flex; align-items: center; gap: 12px; font-size: 17px; line-height: 24px; }
.ed-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-ink); font-size: 13px; font-weight: 700; }
.rte { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; }
.rte:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.rte-bar { display: flex; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.rte-bar .tb-sep { background: var(--hairline); }
.rte-area { min-height: 140px; max-height: 360px; overflow-y: auto; padding: 12px 14px; outline: none; font-size: 15px; line-height: 23px; }
.rte-area:focus-visible { box-shadow: none; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--ink-muted); }
.rte-area.tall { min-height: 220px; max-height: 520px; }
.rte-area h3 { font-size: 17px; margin: 6px 0; }
.rte-area ul { padding-left: 22px; margin: 6px 0; }
.img-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.img-thumb { display: grid; place-items: center; width: 64px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px dashed var(--border); color: var(--ink-muted); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.layout-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.layout-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 14px 8px 12px; border-radius: 14px; border: 1.5px solid var(--hairline); background: var(--surface-2); color: var(--ink); cursor: pointer; text-align: center; transition: border-color .15s, background-color .15s; }
.layout-opt svg { color: var(--ink-muted); }
.layout-opt strong { font-size: 13px; line-height: 17px; }
.layout-opt small { font-size: 11px; line-height: 15px; color: var(--ink-muted); }
.layout-opt:hover { border-color: var(--border-strong); }
.layout-opt.on { border-color: var(--accent); background: var(--sky-tint); }
.layout-opt.on svg { color: var(--sky-ink); }
.theme-row { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-opt { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; border: 1.5px solid var(--hairline); background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; }
.theme-opt > span { width: 24px; height: 24px; border-radius: 50%; border: 1px solid; }
.theme-opt.on { border-color: var(--accent); background: var(--sky-tint); }
.custom-swatch { position: relative; overflow: hidden; background: conic-gradient(#FB7185, #FBBF24, #34D399, #38BDF8, #818CF8, #E879F9, #FB7185); border-color: transparent !important; }
.custom-swatch input { position: absolute; inset: -6px; width: 40px; height: 40px; opacity: 0; cursor: pointer; }
.choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--hairline); background: var(--surface-2); color: var(--ink); cursor: pointer; text-align: left; }
.choice .ic { color: var(--ink-muted); margin-bottom: 4px; }
.choice strong { font-size: 14px; }
.choice small { font-size: 12px; color: var(--ink-muted); }
.choice.on { border-color: var(--accent); background: var(--sky-tint); }
.choice.on .ic { color: var(--sky-ink); }
.aud-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--hairline); font-size: 13px; font-weight: 500; transition: all .15s; }
.chip-check input:checked + span { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.chip-check input:focus-visible + span { box-shadow: var(--focus); }
.aud-users { border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.aud-users-bar { display: flex; align-items: center; gap: 16px; padding: 10px; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.aud-users-bar .search-mini { flex: 1; height: 38px; min-width: 0; }
.aud-user-list { max-height: 260px; overflow-y: auto; padding: 6px; }
.aud-user { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.aud-user:hover { background: var(--surface); }
.aud-user input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.aud-user span:last-child { display: flex; flex-direction: column; }
.aud-user strong { font-size: 14px; line-height: 18px; font-weight: 500; }
.aud-user small { font-size: 12px; color: var(--ink-muted); }
.toggles { border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.toggles .settings-row { padding: 14px 16px; cursor: pointer; }
.field > .seg { align-self: flex-start; }
.field > .seg + .input { margin-top: 8px; }
.editor-preview { position: sticky; top: calc(var(--topbar-h) + 24px); padding: 20px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; }
.stage-wrap { position: relative; width: 100%; overflow: hidden; border-radius: 12px; display: flex; justify-content: center; background: repeating-linear-gradient(141deg, transparent 0 13px, var(--hairline) 13px 14px); }
.ann-stage { position: absolute; top: 0; transform-origin: top center; background: #FFFFFF; overflow: hidden; border-radius: 14px; box-shadow: 0 0 0 1px rgba(10,10,11,.08); color: #0A0A0B; }
.ann-stage.mobile { border-radius: 28px; }
.stage-top { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px; background: #0A0A0B; }
.stage-dots { flex: 1; display: flex; justify-content: center; gap: 8px; }
.stage-dots i { width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.12); }
.stage-user { width: 30px; height: 30px; border-radius: 50%; background: #4DB2EC; }
.stage-body { padding: 48px 72px; display: flex; flex-direction: column; gap: 16px; }
.mobile .stage-body { padding: 28px 20px; }
.stage-body > i { display: block; height: 14px; border-radius: 7px; background: #EEF0F3; }
.stage-body .w40 { width: 40%; height: 26px; } .stage-body .w70 { width: 70%; } .stage-body .w90 { width: 90%; } .stage-body .w60 { width: 60%; }
.stage-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 12px 0; }
.mobile .stage-cards { grid-template-columns: 1fr; }
.stage-cards i { height: 150px; border-radius: 16px; background: #F4F6F8; }
.stage-layer { position: absolute; inset: 56px 0 0 0; }

/* ---------- Comunicados: componentes exibidos ao usuário ---------- */

.ann-host-overlay { position: relative; z-index: 110; }
.ann-host-banner { position: fixed; z-index: 54; top: calc(var(--topbar-h) + 10px); left: 50%; transform: translateX(-50%); width: min(980px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; }
.ann-host-corner { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

.ann-overlay { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(10,10,11,.5); backdrop-filter: blur(5px); opacity: 0; transition: opacity .2s; }
.ann-stage .ann-overlay, .ann-stage .ann-full { position: absolute; }
.ann-overlay.in { opacity: 1; }
.ann-overlay.out { opacity: 0; }
.ann-modal { position: relative; display: flex; flex-direction: column; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 24px; background: var(--ann-bg); color: var(--ann-ink); box-shadow: 0 40px 100px rgba(0,0,0,.35); transform: translateY(10px) scale(.98); transition: transform .22s ease; }
.ann-stage .ann-modal { max-height: calc(100% - 32px); }
.ann-overlay.in .ann-modal { transform: none; }
.ann-modal.size-sm { width: min(420px, 100%); }
.ann-modal.size-lg { width: min(760px, 100%); }
.ann-modal.img-side { flex-direction: row; }
.ann-modal.img-side .ann-img { width: 42%; height: auto; min-height: 280px; flex: none; }
.ann-img { height: 200px; flex: none; background: center / cover no-repeat; }
.ann-inner { padding: 30px 32px 28px; display: flex; flex-direction: column; gap: 12px; }
.ann-inner.center, .ann-card-inner.center, .ann-full.center .ann-full-inner { text-align: center; align-items: center; }
.ann-inner.center .ann-actions, .ann-card-inner.center .ann-actions, .ann-full.center .ann-actions { justify-content: center; }
.ann-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ann-muted); }
.ann-inner.center .ann-eyebrow, .ann-card-inner.center .ann-eyebrow, .ann-full.center .ann-eyebrow { justify-content: center; }
.ann-eyebrow .sep { opacity: .5; }
.ann-title { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; color: var(--ann-ink); margin: 0; }
.ann-title.serif { font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 60px; letter-spacing: 0; }
.ann-body { font-size: 15px; line-height: 23px; color: var(--ann-muted); }
.ann-body p { margin: 0 0 8px; } .ann-body p:last-child { margin: 0; }
.ann-body h3, .ann-body h4 { color: var(--ann-ink); font-size: 17px; margin: 8px 0 4px; }
.ann-body ul, .ann-body ol { margin: 4px 0 8px; padding-left: 22px; }
.ann-body a { color: var(--ann-ink); text-decoration: underline; }
.ann-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ann-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.ann-btn.primary { background: var(--ann-accent); color: var(--ann-accent-ink); }
.ann-btn.ghost { background: transparent; color: var(--ann-ink); border-color: var(--ann-line); }
.ann-btn:hover { filter: brightness(1.08); }
.ann-btn.link { background: none; border-color: transparent; color: var(--ann-muted); padding: 0 10px; }
.ann-btn.link:hover { color: var(--ann-ink); filter: none; }
.ann-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(127,127,127,.18); color: var(--ann-ink); cursor: pointer; }
.ann-x:hover { background: rgba(127,127,127,.3); }

.ann-full { position: fixed; inset: 0; display: grid; place-items: center; padding: 32px; background: var(--ann-bg); color: var(--ann-ink); opacity: 0; transition: opacity .25s; overflow: auto; }
.ann-full.pattern { background-image: repeating-linear-gradient(141deg, transparent 0 109px, rgba(77,178,236,.55) 109px 111px), repeating-linear-gradient(141deg, #131417 0 7px, transparent 7px 16px); }
.ann-full.in { opacity: 1; } .ann-full.out { opacity: 0; }
.ann-full-inner { position: relative; width: min(760px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 48px; border-radius: 28px; background: var(--ann-bg); }
.ann-full-img { height: 260px; border-radius: 18px; background: center / cover no-repeat; margin-bottom: 8px; }
.ann-full .ann-body { font-size: 17px; line-height: 27px; }
.ann-full .ann-x { top: 20px; right: 20px; }

.ann-banner, .ann-toast {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 16px; border-radius: 16px;
  background: var(--ann-bg); color: var(--ann-ink); box-shadow: 0 16px 40px rgba(10,10,11,.18), 0 0 0 1px var(--ann-line);
  opacity: 0; transform: translateY(-8px); transition: opacity .22s, transform .22s;
}
.ann-banner.in, .ann-toast.in { opacity: 1; transform: none; }
.ann-banner.out, .ann-toast.out { opacity: 0; transform: translateY(-8px); }
.ann-banner .ann-x, .ann-toast .ann-x { position: static; flex: none; width: 30px; height: 30px; }
.ann-banner-ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--ann-accent); color: var(--ann-accent-ink); }
.ann-banner-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ann-banner-text strong { font-size: 14px; line-height: 19px; }
.ann-banner-text span { font-size: 13px; line-height: 18px; color: var(--ann-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-banner .ann-actions, .ann-toast .ann-actions { margin: 0; flex-wrap: nowrap; }
.ann-banner .ann-btn, .ann-toast .ann-btn { height: 36px; padding: 0 14px; font-size: 13px; }
.ann-stage .ann-banner { position: absolute; top: 12px; left: 50%; width: calc(100% - 48px); max-width: 980px; transform: translateX(-50%); }
.ann-stage .ann-banner.in { transform: translateX(-50%); }

.ann-toast { width: min(400px, calc(100vw - 40px)); overflow: hidden; }
.ann-toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--ann-accent); transform-origin: left; animation: annbar linear forwards; }
@keyframes annbar { to { transform: scaleX(0); } }
.ann-stage .ann-toast { position: absolute; top: 14px; right: 16px; }
.ann-stage .ann-toast-bar { animation: none; }

.ann-card { position: relative; width: min(360px, calc(100vw - 40px)); border-radius: 20px; overflow: hidden; background: var(--ann-bg); color: var(--ann-ink); box-shadow: 0 24px 60px rgba(10,10,11,.25), 0 0 0 1px var(--ann-line); opacity: 0; transform: translateY(12px); transition: opacity .22s, transform .22s; }
.ann-card.in { opacity: 1; transform: none; } .ann-card.out { opacity: 0; transform: translateY(12px); }
.ann-card-img { height: 150px; background: center / cover no-repeat; }
.ann-card-inner { padding: 20px 22px 20px; display: flex; flex-direction: column; gap: 8px; }
.ann-card .ann-title { font-size: 18px; line-height: 24px; padding-right: 24px; }
.ann-card .ann-body { font-size: 14px; line-height: 21px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ann-card .ann-btn { height: 38px; padding: 0 14px; font-size: 13px; }
.ann-stage .ann-card { position: absolute; right: 20px; bottom: 20px; }

.ann-reader { border-radius: 18px; overflow: hidden; background: var(--ann-bg); color: var(--ann-ink); box-shadow: 0 0 0 1px var(--ann-line); }

/* ---------- Editor: Estilo, Saiba mais ---------- */

.eyebrow-label { font-size: 11px !important; line-height: 14px !important; font-weight: 600 !important; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted) !important; margin-bottom: 4px; }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 112px; padding: 16px 18px;
  border-radius: 14px; border: 1.5px solid var(--hairline); background: var(--surface); color: var(--ink);
  text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.pick:hover { border-color: var(--border-strong); }
.pick.on { border-color: var(--ink); background: var(--surface-2); box-shadow: 0 0 0 1px var(--ink); }
.pick strong { font-size: 15px; line-height: 20px; font-weight: 600; margin-top: 2px; }
.pick small { font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.pick-ic { display: grid; place-items: center; height: 24px; }
.pick-shape { display: grid; place-items: center; width: 64px; height: 44px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink-muted); }
.pick-shape svg { width: 44px; height: 30px; }
.pick.on .pick-shape { color: var(--sky-ink); border-color: var(--sky); background: var(--sky-tint); }
.toggle-row { padding: 14px 16px; border: 1px solid var(--hairline) !important; border-radius: var(--r-md); cursor: pointer; }
.drop-sm { flex-direction: row; height: 56px; gap: 10px; padding: 0 16px; justify-content: flex-start; }
.drop-sm strong { color: var(--ink); }
.attach-list { display: flex; flex-direction: column; gap: 8px; }
.attach-list:empty { display: none; }
.attach { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface-2); color: var(--ink); }
.attach-thumb { width: 44px; height: 44px; flex: none; border-radius: 8px; background: var(--surface) center / cover no-repeat; }
.attach-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 8px; background: var(--sky-tint); color: var(--sky-ink); }
.attach-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.attach-name strong { font-size: 14px; line-height: 19px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-name small { font-size: 12px; color: var(--ink-muted); }
.attach-link:hover { text-decoration: none; border-color: var(--border); background: var(--surface); }
.attach-dl { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--sky-ink); }
.ann-btn .ic { flex: none; }

/* ---------- Comunicações: página do comunicado ---------- */

.back-link { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 8px; margin: 0 0 20px -8px; border-radius: 10px; color: var(--ink-muted); font-size: 14px; font-weight: 500; }
.back-link:hover { text-decoration: none; background: var(--surface); color: var(--ink); }
.comm-article { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.comm-hero { border-radius: 22px; overflow: hidden; background: var(--ann-bg); color: var(--ann-ink); box-shadow: 0 0 0 1px var(--ann-line), var(--shadow-sm); }
.comm-hero-img { height: 280px; background: center / cover no-repeat; }
.comm-hero-inner { padding: 36px 40px; display: flex; flex-direction: column; gap: 14px; }
.comm-hero h1 { font-size: 32px; line-height: 38px; color: var(--ann-ink); }
.comm-hero .ann-body { font-size: 17px; line-height: 27px; }
.rich { font-size: 16px; line-height: 27px; color: var(--ink); }
.rich p { margin: 0 0 14px; } .rich p:last-child { margin: 0; }
.rich h3, .rich h4 { font-size: 20px; line-height: 28px; margin: 24px 0 8px; }
.rich ul, .rich ol { margin: 0 0 14px; padding-left: 24px; }
.rich li { margin: 4px 0; }
.comm-details { padding: 32px 40px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--hairline); }
.comm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.comm-photo { display: block; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--surface) center / cover no-repeat; border: 1px solid var(--hairline); transition: transform .15s; }
.comm-photo:hover { transform: scale(1.02); }
.comm-files { display: flex; flex-direction: column; gap: 8px; }
.comm-files h2 { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.comm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--hairline); padding-top: 20px; }
.comm-meta small { display: inline-flex; align-items: center; gap: 4px; }
a.comm-row:hover { text-decoration: none; }

#viewas:not(:empty) ~ .ann-host-banner { top: calc(var(--topbar-h) + 58px); }

/* ---------- Responsivo ---------- */

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .layout-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ann-row { grid-template-columns: 64px minmax(0, 1fr) 120px 196px; }
  .ann-row-metric { display: none; }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr 420px; }
  .login-hero-card { padding: 56px 56px 48px; }
  .login-tagline { font-size: 36px; line-height: 42px; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { min-height: 340px; }
  .login-hero-card { padding: 40px 32px; transform: scale(.85); }
  .login-panel { padding: 40px 24px 96px; }
  .topbar { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 8px; }
  .tb-center { justify-self: center; }
  .tb-left [data-act=back], .tb-left [data-act=forward], .tb-left .tb-sep { display: none; }
  .tb-left .logo-link { margin-left: 2px; }
  .tb-left .logo-link .brand-sep, .tb-left .logo-link .brand-app, .user-btn .u-text { display: none; }
  .search-field .kbd { display: none; }
  .page, .home { padding-left: 16px; padding-right: 16px; }
  .home-hero h1 { font-size: 30px; line-height: 36px; }
  .kv { grid-template-columns: 1fr; }
  .kv > div { border-right: 0; }
  .grid-2, .form-grid, .admin-cards, .choice-row { grid-template-columns: 1fr; }
  .ann-row { grid-template-columns: 52px minmax(0, 1fr); }
  .ann-row .badge, .ann-row .actions { grid-column: 2; justify-self: start; }
  .comm-row { grid-template-columns: 44px minmax(0, 1fr); }
  .comm-meta { grid-column: 2; align-items: flex-start; flex-direction: row; }
  .search-mini { min-width: 0; flex: 1; }
  .ann-modal.img-side { flex-direction: column; }
  .ann-modal.img-side .ann-img { width: auto; min-height: 0; height: 180px; }
  .ann-title.serif { font-size: 38px; line-height: 42px; }
  .ann-full-inner { padding: 28px; }
  .pick-grid { grid-template-columns: 1fr; }
  .comm-hero-inner, .comm-details { padding: 24px; }
  .comm-hero h1 { font-size: 26px; line-height: 32px; }
  .form-grid .span-2 { grid-column: auto; }
}
@media (max-width: 560px) {
  .mosaic { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .tile.featured, .tile.wide { grid-column: auto; grid-row: span 2; }
  .tb-center .tb-dock-toggle, .tb-center .tb-sep, .tb-center [data-act=note] { display: none; }
  .user-btn > .ic { display: none; }
  .user-btn { padding: 0 4px; }
}

/* Botão de ação no editor de comunicados */
.toggle-row .toggle-state { margin-left: auto; margin-right: -12px; font-size: 13px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; }
.toggle-row .toggle-state.on { color: var(--success); }
.cta-access { margin: -4px 0 0; }
.cta-access:empty { display: none; }
.cta-access.warn { color: var(--warning); }

/* =====================================================================
   CONTROLE
   ===================================================================== */

/* Tons de status e SLA */
.tone-sky   { --t-bg: var(--sky-tint);     --t-fg: var(--sky-ink); --t-dot: #4DB2EC; }
.tone-amber { --t-bg: var(--warning-tint); --t-fg: var(--warning); --t-dot: #F5A524; }
.tone-green { --t-bg: var(--success-tint); --t-fg: var(--success); --t-dot: #22A06B; }
.tone-red   { --t-bg: var(--danger-tint);  --t-fg: var(--danger);  --t-dot: #E5484D; }
.tone-gray  { --t-bg: var(--surface);      --t-fg: var(--ink-muted); --t-dot: #A3ABB8; }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--t-dot, #A3ABB8); }
.st-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--t-bg); color: var(--t-fg); font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--t-dot); }
.prod-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sla-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sla-pill.sla-late  { background: var(--danger-tint); color: var(--danger); }
.sla-pill.sla-today { background: var(--warning-tint); color: var(--warning); }
.sla-pill.sla-soon  { background: var(--sky-tint); color: var(--sky-ink); }
.sla-pill.sla-ok    { background: var(--surface); color: var(--ink-muted); }
.sla-dot { width: 7px; height: 7px; border-radius: 50%; }
.sla-dot.sla-late { background: #E5484D; } .sla-dot.sla-today { background: #F5A524; } .sla-dot.sla-soon { background: #4DB2EC; }

/* Página */
.ct-page { max-width: 1440px; }
.ct-head { margin-bottom: 20px; }
.ct-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ct-kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); text-align: left; color: var(--ink); font: inherit; }
button.ct-kpi { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.ct-kpi:hover { border-color: var(--border-strong); }
.ct-kpi span { font-size: 12px; line-height: 16px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-kpi strong { font-size: 20px; line-height: 26px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-kpi.money strong { font-size: 17px; }
.ct-kpi.alert.on { border-color: rgba(229, 72, 77, .45); background: var(--danger-tint); }
.ct-kpi.alert.on strong { color: var(--danger); }

.ct-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ct-search { flex: 1 1 280px; min-width: 220px; max-width: 420px; }
.ct-spacer { flex: 1; }
.ct-btn { height: 44px; padding: 0 14px; gap: 8px; font-weight: 500; position: relative; }
.ct-btn.on { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.ct-btn.icon-only { width: 44px; padding: 0; }
.ct-count { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.ct-view button { height: 36px; }
.ct-view button.on { background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow-sm); }
.ct-excel { display: inline-flex; gap: 8px; }
.ct-more { display: none; width: 44px; padding: 0; }

.ct-bulk, .ct-archived-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 52px; padding: 8px 12px 8px 16px; margin-bottom: 12px; border-radius: var(--r-md); }
.ct-bulk { background: var(--primary-bg); color: var(--primary-ink); }
.ct-bulk .btn-ghost { color: inherit; border-color: rgba(127, 135, 150, .4); }
.ct-bulk .link-btn { color: inherit; opacity: .8; margin-left: auto; }
.ct-archived-bar { background: var(--warning-tint); color: var(--warning); font-size: 14px; }
.ct-archived-bar .link-btn { margin-left: auto; color: inherit; font-weight: 600; }

/* Lista agrupada por cliente */
.ct-table-wrap { overflow: auto; max-height: calc(100vh - 300px); min-height: 240px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.ct-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ct-table th { position: sticky; top: 0; z-index: 2; height: 44px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--hairline); text-align: left; font-size: 11.5px; line-height: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; cursor: pointer; user-select: none; }
.ct-table th > span { vertical-align: middle; }
.ct-table th .ic { display: inline-block; vertical-align: middle; margin-left: 4px; }
.ct-table th.sorted { color: var(--ink); }
.ct-table th.num, .ct-table td.num { text-align: right; }
.ct-table td { height: 52px; padding: 0 14px; border-bottom: 1px solid var(--hairline); white-space: nowrap; vertical-align: middle; background: var(--surface-2); }
.ct-table tr.ct-row:not(.last) td:not([rowspan]) { border-bottom: 1px dashed var(--hairline); }
.ct-table tbody tr { cursor: pointer; }
.ct-table tbody tr:hover td { background-color: var(--surface); }
.ct-table td.client-cell { vertical-align: middle; }
.ct-table td.client-cell.name strong { display: block; font-weight: 600; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.ct-table td.client-cell.name small { display: block; font-size: 12px; color: var(--ink-muted); }
.ct-table .ct-check { width: 44px; min-width: 44px; padding: 0 0 0 16px; cursor: default; }
.ct-table td.ct-check { position: relative; }
.ct-table td.ct-check::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.ct-row.sla-late td.ct-check::before { background: #E5484D; }
.ct-row.sla-today td.ct-check::before { background: #F5A524; }
.ct-row.sla-soon td.ct-check::before { background: #4DB2EC; }
.ct-table input[type=checkbox], .ct-card input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--onyx); cursor: pointer; }
[data-theme='dark'] .ct-table input[type=checkbox], [data-theme='dark'] .ct-card input[type=checkbox] { accent-color: var(--sky); }
.ct-table .ct-actions-h, .ct-table .ct-actions { width: 80px; min-width: 80px; padding: 0 6px 0 2px; text-align: left; white-space: nowrap; }
.ct-table td.ct-actions { cursor: default; }
.ct-table .ct-actions .icon-btn { opacity: .6; color: var(--ink); }
.ct-table tr:hover .ct-actions .icon-btn { opacity: 1; }
.ct-table tfoot td { position: sticky; bottom: 0; z-index: 1; height: 48px; background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 0; font-size: 13px; cursor: default; }

/* Cartões (celular) */
.ct-cards { display: flex; flex-direction: column; gap: 10px; }
.ct-card { position: relative; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); box-shadow: var(--shadow-sm); cursor: pointer; overflow: hidden; }
.ct-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.ct-card.sla-late::before { background: #E5484D; } .ct-card.sla-today::before { background: #F5A524; } .ct-card.sla-soon::before { background: #4DB2EC; }
.ct-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ct-card header strong { display: block; font-size: 15px; line-height: 20px; }
.ct-card header small { font-size: 12px; color: var(--ink-muted); }
.ct-card-line { display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; align-items: center; gap: 4px 8px; padding: 10px 0 0; border-top: 1px solid var(--hairline); margin-top: 10px; }
.ct-card-line:first-of-type { margin-top: 0; }
.ct-card-val { justify-self: end; font-weight: 600; font-size: 14px; }
.ct-card-line small { grid-column: 1 / -1; font-size: 12px; color: var(--ink-muted); }

/* Kanban */
.ct-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: stretch; }
.kb-col { display: flex; flex-direction: column; min-height: 320px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); }
.kb-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 8px; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
.kb-head strong { font-size: 14px; }
.kb-count { min-width: 24px; height: 22px; padding: 0 8px; display: grid; place-items: center; border-radius: 11px; background: var(--t-bg); color: var(--t-fg); font-size: 12px; font-weight: 700; }
.kb-head small { grid-column: 2 / -1; font-size: 12px; color: var(--ink-muted); }
.kb-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; flex: 1; min-height: 120px; max-height: calc(100vh - 340px); overflow-y: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); transition: background-color .15s; }
.kb-list.over { background: var(--sky-tint); }
.kb-card { position: relative; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); cursor: pointer; overflow: hidden; }
.kb-card[draggable="true"] { cursor: grab; }
.kb-card.dragging { opacity: .45; }
.kb-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.kb-card.sla-late::before { background: #E5484D; } .kb-card.sla-today::before { background: #F5A524; } .kb-card.sla-soon::before { background: #4DB2EC; }
.kb-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.kb-card > strong { font-size: 14px; line-height: 19px; }
.kb-card > small { font-size: 12px; color: var(--ink-muted); }
.kb-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.kb-meta span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-meta b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.kb-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--ink-muted); }
.kb-av { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-ink); font-size: 9px; font-weight: 700; }
.kb-empty { display: grid; place-items: center; min-height: 80px; border: 1px dashed var(--border); border-radius: var(--r-md); font-size: 12px; color: var(--ink-muted); }

/* Painel do registro */
html.cr-open, html.cr-open body { overflow: hidden; }
.cr-backdrop { position: fixed; inset: 0; z-index: 95; display: flex; justify-content: flex-end; background: rgba(10, 10, 11, .38); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.cr-backdrop.in { opacity: 1; }
.cr { display: flex; flex-direction: column; width: min(960px, 100vw); height: 100%; background: var(--bg); box-shadow: var(--shadow-lg); transform: translateX(24px); transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.cr-backdrop.in .cr { transform: none; }
.cr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--hairline); background: var(--surface-2); }
.cr-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cr-badge { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--onyx); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.cr-title { min-width: 0; }
.cr-title h2 { font-size: 20px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-title span { display: block; font-size: 13px; color: var(--ink-muted); }
.cr-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.cr-products { display: flex; align-items: center; gap: 8px; padding: 12px 24px; overflow-x: auto; border-bottom: 1px solid var(--hairline); background: var(--surface-2); scrollbar-width: none; }
.cr-prod { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.cr-prod.on { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.cr-prod.arch { opacity: .6; text-decoration: line-through; }
.cr-prod.add { border-style: dashed; color: var(--ink-muted); font-weight: 500; gap: 6px; }
.cr-prod-x { display: grid; place-items: center; width: 20px; height: 20px; margin-right: -6px; border-radius: 50%; color: inherit; opacity: .6; cursor: pointer; }
.cr-prod-x:hover, .cr-prod-x:focus-visible { opacity: 1; background: rgba(127, 127, 127, .22); outline: none; }
.cr-dirty { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cr-tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--hairline); background: var(--surface-2); overflow-x: auto; scrollbar-width: none; }
.cr-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none; height: 46px; padding: 0 12px; border: 0; background: none; color: var(--ink-muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.cr-tab::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: transparent; }
.cr-tab.on { color: var(--ink); }
.cr-tab.on::after { background: var(--ink); }
.cr-tab.internal.on::after { background: #F5A524; }
.cr-tab b { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; background: var(--surface); font-size: 11px; color: var(--ink); }
.cr-body { flex: 1; overflow-y: auto; padding: 24px; }
.cr-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px 14px 24px; border-top: 1px solid var(--hairline); background: var(--surface-2); }
.cr-stamp { font-size: 12px; line-height: 16px; color: var(--ink-muted); min-width: 0; }
.cr-foot-actions { display: flex; gap: 10px; flex: none; }

/* Formulário do registro: grade de 2 colunas, mesma altura em todos os campos */
.cf-group + .cf-group { margin-top: 28px; }
.cf-group-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 15px; line-height: 20px; font-weight: 600; }
.cf-sub { font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cf-field.span-2 { grid-column: 1 / -1; }
.cf-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--ink); }
.cf-note.muted { color: var(--ink-muted); }
.cf-note .ic { flex: none; margin-top: 2px; color: var(--sky-ink); }
.cf-doc, .cf-date, .cf-combo, .cf-money, .cf-pct, .cf-status { position: relative; }
.cf-doc .input, .cf-date .input, .cf-combo .input { padding-right: 44px; }
.cf-adorn, .cf-adorn-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; color: var(--ink-muted); }
.cf-adorn-btn { border: 0; border-radius: 9px; background: transparent; cursor: pointer; }
.cf-adorn-btn:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.cf-doc .cf-adorn .ic { color: var(--success); }
.cf-doc.invalid .input, .cf-date.invalid .input { border-color: var(--danger); }
.cf-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: btnSpin .7s linear infinite; }
.cf-money .input { padding-left: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.cf-money.computed .input { padding-right: 40px; background: var(--surface); color: var(--ink); font-weight: 600; }
.cf-pre { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--ink-muted); pointer-events: none; }
.cf-pct .input { padding-right: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.cf-suf { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--ink-muted); pointer-events: none; }
.cf-status .dot { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.cf-status .select { padding-left: 32px; }
.cf-internal { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warning-tint); color: var(--warning); font-size: 13px; line-height: 18px; }
.cf-internal strong { font-weight: 600; }
.cf-group.follow { padding: 18px; border-radius: var(--r-lg); border: 1px solid rgba(245, 165, 36, .35); background: linear-gradient(180deg, rgba(245, 165, 36, .06), transparent 70%); }
.cf-group.follow + .cf-group.follow { margin-top: 16px; }

.fin-split { margin-top: 18px; }
.fin-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface); }
.fin-bar .z { background: var(--onyx); } .fin-bar .f { background: var(--sky); }
[data-theme='dark'] .fin-bar .z { background: #fff; }
.fin-legend { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--ink-muted); }
.fin-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.fin-legend i.z { background: var(--onyx); } .fin-legend i.f { background: var(--sky); }
[data-theme='dark'] .fin-legend i.z { background: #fff; }

/* Anexos */
.cf-drop { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px dashed var(--border); border-radius: var(--r-lg); background: var(--surface-2); cursor: pointer; color: var(--ink-muted); transition: border-color .15s, background-color .15s; }
.cf-drop:hover { border-color: var(--accent); background: var(--sky-tint); }
.cf-drop strong { display: block; color: var(--ink); font-size: 14px; }
.cf-drop small { font-size: 12px; }
.cf-files { display: flex; flex-direction: column; margin-top: 14px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); overflow: hidden; }
.cf-file { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; }
.cf-file + .cf-file { border-top: 1px solid var(--hairline); }
.cf-file-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); color: var(--ink-muted); overflow: hidden; }
.cf-thumb { width: 100%; height: 100%; background: center / cover; }
.cf-file-name { min-width: 0; color: var(--ink); }
.cf-file-name strong { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-file-name small { font-size: 12px; color: var(--ink-muted); }
.cf-share { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); cursor: pointer; white-space: nowrap; }
.cf-files .lg-empty { margin: 0; border: 0; }

/* Editor e registros permanentes */
.rx { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; }
.rx:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.rx-bar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 8px; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.rx-bar .tb-sep { width: 1px; height: 18px; margin: 0 6px; background: var(--hairline); }
.rx-color { width: 22px; height: 22px; margin: 0 2px; border-radius: 50%; border: 2px solid var(--surface-2); background: var(--c); box-shadow: 0 0 0 1px var(--hairline); cursor: pointer; }
[data-theme='dark'] .rx-color[data-color='#0A0A0B'] { background: #F5F7FA; }
.rx-area { min-height: 120px; max-height: 320px; overflow-y: auto; padding: 12px 14px; font-size: 15px; line-height: 23px; outline: none; }
.rx-area:empty::before { content: attr(data-placeholder); color: var(--ink-muted); opacity: .8; }
.rx-area ul { margin: 4px 0; padding-left: 22px; }
.rx-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--hairline); }
.rx-foot .form-note { font-size: 12px; line-height: 16px; }
.lg-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.lg-empty { padding: 16px; border: 1px dashed var(--border); border-radius: var(--r-md); text-align: center; font-size: 13px; color: var(--ink-muted); }
.lg-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
.lg-av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-ink); font-size: 11px; font-weight: 700; }
.lg-meta { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 13px; }
.lg-meta span { color: var(--ink-muted); font-size: 12px; }
.lg-del { margin-left: auto; width: 28px; height: 28px; }
.lg-text { margin-top: 4px; font-size: 14px; line-height: 22px; word-break: break-word; }
.lg-text.rich ul { margin: 4px 0; }

/* Popovers: calendário e listas */
.cf-pop { position: fixed; z-index: 140; max-width: calc(100vw - 16px); padding: 6px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--elevated); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-4px); transition: opacity .12s, transform .12s; }
.cf-pop.in { opacity: 1; transform: none; }
.cf-pop { overflow-y: auto; overscroll-behavior: contain; }
.cf-pop[data-side="up"]:not(.in) { transform: translateY(4px); }
.cal { width: 276px; padding: 4px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 6px; }
.cal-title { display: flex; gap: 4px; }
.cal-title select { height: 32px; padding: 0 6px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-week span { height: 28px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink-muted); }
.cal-grid > span { height: 36px; }
.cal-day { height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.cal-day:hover { background: var(--surface); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 600; }
.cal-day.sel { background: var(--primary-bg); color: var(--primary-ink); font-weight: 600; box-shadow: none; }
.cal-foot { display: flex; justify-content: space-between; padding: 8px 6px 2px; margin-top: 4px; border-top: 1px solid var(--hairline); }
.cb-pop { padding: 4px; }
.cb-list { max-height: 300px; overflow-y: auto; }
.cb-opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 14px; text-align: left; cursor: pointer; }
.cb-opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-opt small { font-size: 12px; color: var(--ink-muted); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-opt:hover { background: var(--surface); }
.cb-opt.on { font-weight: 600; }
.cb-opt.on .ic { color: var(--sky-ink); }
.cb-opt.clear { color: var(--ink-muted); font-size: 13px; }
.cb-opt.add, .cb-opt.manage { color: var(--sky-ink); font-weight: 500; border-top: 1px solid var(--hairline); border-radius: 0 0 8px 8px; margin-top: 2px; }
.cb-empty { padding: 12px 10px; font-size: 13px; color: var(--ink-muted); }
.cols-pop { width: 300px; }
.cols-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--hairline); }
.cols-head strong { font-size: 14px; }
.cols-list { max-height: 420px; overflow-y: auto; padding: 4px 0; }
.cols-sec { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.cols-item { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.cols-item:hover { background: var(--surface); }
.cols-item input { width: 16px; height: 16px; accent-color: var(--onyx); }
.menu-list { display: flex; flex-direction: column; padding: 2px; }

/* Lista editável (seguradoras, produtos, motivos) */
.ml { display: flex; flex-direction: column; gap: 12px; }
.ml-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ml-search { min-width: 0; }
.ml-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--hairline); border-radius: var(--r-md); }
.ml-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 8px 0 14px; font-size: 14px; }
.ml-row + .ml-row { border-top: 1px solid var(--hairline); }

/* Painel de filtros (30% da tela) */
.fp-backdrop { position: fixed; inset: 0; z-index: 96; display: flex; justify-content: flex-end; background: rgba(10, 10, 11, .3); opacity: 0; transition: opacity .2s; }
.fp-backdrop.in { opacity: 1; }
.fp { display: flex; flex-direction: column; width: clamp(360px, 30vw, 520px); height: 100%; background: var(--bg); box-shadow: var(--shadow-lg); transform: translateX(24px); transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.fp-backdrop.in .fp { transform: none; }
.fp-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 14px 20px; border-bottom: 1px solid var(--hairline); }
.fp-head h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.fp-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.fp-block { display: flex; flex-direction: column; gap: 8px; }
.fp-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.fp-block .search-mini { min-width: 0; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fp-chip span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 16px; font-size: 13px; cursor: pointer; transition: background-color .15s, border-color .15s; }
.fp-chip span i { width: 7px; height: 7px; border-radius: 50%; background: var(--t-dot, #A3ABB8); }
.fp-chip.sla-late span i { background: #E5484D; } .fp-chip.sla-today span i { background: #F5A524; } .fp-chip.sla-soon span i { background: #4DB2EC; } .fp-chip.sla-ok span i { background: #22A06B; }
.fp-chip input:checked + span { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.fp-chip input:focus-visible + span { box-shadow: var(--focus); }
.fp-sec { border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
.fp-sec summary { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 14px; font-size: 14px; font-weight: 500; cursor: pointer; list-style: none; }
.fp-sec summary::-webkit-details-marker { display: none; }
.fp-sec summary::after { content: ''; width: 8px; height: 8px; border-right: 1.75px solid var(--ink-muted); border-bottom: 1.75px solid var(--ink-muted); transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
.fp-sec[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.fp-sec summary b { margin-left: auto; margin-right: 12px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; }
.fp-opts { padding: 0 8px 8px; }
.fp-opts.scroll { max-height: 240px; overflow-y: auto; }
.fp-opt { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 6px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.fp-opt:hover { background: var(--surface); }
.fp-opt input { width: 16px; height: 16px; accent-color: var(--onyx); }
.fp-dates { display: flex; flex-direction: column; gap: 12px; padding: 0 14px 14px; }
.fp-range { display: flex; flex-direction: column; gap: 6px; }
.fp-range > span { font-size: 13px; font-weight: 500; }
.fp-range-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.fp-range-row em { font-style: normal; font-size: 12px; color: var(--ink-muted); }
.fp-range .input, .fp-range .select { height: 42px; font-size: 14px; }
.fp-foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--hairline); }

/* Importação */
.imp { display: flex; flex-direction: column; gap: 14px; }
.imp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.imp-kpis > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); }
.imp-kpis strong { font-size: 22px; line-height: 28px; }
.imp-kpis span { font-size: 12px; color: var(--ink-muted); }
.imp-kpis .bad strong { color: var(--danger); }
.imp-list { max-height: 220px; overflow-y: auto; padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; line-height: 19px; }
.imp-list > strong { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.imp-list div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.imp-list.bad { background: var(--danger-tint); color: var(--danger); }
.imp-list.warn { background: var(--warning-tint); color: var(--warning); }

/* Controle: telas médias e celular */
@media (max-width: 1280px) {
  .ct-excel .ct-btn span { display: none; }
  .ct-excel .ct-btn { width: 44px; padding: 0; }
}
@media (max-width: 1100px) {
  .ct-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ct-kpis { display: flex; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 4px; scrollbar-width: none; }
  .ct-kpi { flex: 0 0 auto; min-width: 128px; }
  .ct-toolbar { gap: 6px; }
  .ct-search { flex: 1 1 100%; max-width: none; }
  .ct-btn span, .ct-view span { display: none; }
  .ct-btn { width: 44px; padding: 0; }
  .ct-btn .ct-count { position: absolute; top: -6px; right: -6px; }
  .ct-spacer { display: none; }
  .ct-excel, .ct-toolbar [data-act="lists"] { display: none; }
  .ct-more { display: inline-flex; }
  .ct-kanban { grid-auto-columns: 84%; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; }
  .kb-col { scroll-snap-align: start; }
  .kb-list { max-height: none; }
  .cr { width: 100vw; }
  .cr-head { padding: 12px 12px 10px 16px; }
  .cr-badge { width: 38px; height: 38px; font-size: 12px; }
  .cr-title h2 { font-size: 17px; line-height: 22px; }
  .cr-actions .btn span { display: none; }
  .cr-actions .btn { width: 40px; padding: 0; }
  .cr-products, .cr-tabs { padding-left: 12px; padding-right: 12px; }
  .cr-tab span { display: none; }
  .cr-tab.on span { display: inline; }
  .cr-body { padding: 18px 16px 24px; }
  .cf-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cf-group.follow { padding: 14px; }
  .cf-file { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .cf-file .cf-share span:last-child { display: none; }
  .cr-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .cr-stamp { display: none; }
  .cr-foot-actions { width: 100%; }
  .cr-foot-actions .btn { flex: 1; height: 48px; }
  .fp { width: 100vw; }
  .fp-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .imp-kpis { grid-template-columns: 1fr; }
}

/* Listas suspensas com a mesma seta e o mesmo recuo dos demais campos */
.cr .select, .fp .select, .ct-page .select {
  -webkit-appearance: none; appearance: none; padding-left: 14px; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%235B6068' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 17px 17px;
}
[data-theme='dark'] .cr .select, [data-theme='dark'] .fp .select, [data-theme='dark'] .ct-page .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%23A3ABB8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.cr .cf-status .select { padding-left: 32px; }

/* Convite de usuário e primeiro acesso */
.inv { display: flex; flex-direction: column; gap: 14px; }
.inv-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; line-height: 20px; }
.inv-row .ic { flex: none; margin-top: 2px; }
.inv-row.ok { background: var(--success-tint); color: var(--success); }
.inv-row.ok span { color: var(--ink); }
.inv-row.warn { background: var(--warning-tint); color: var(--warning); }
.inv-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.inv-link .input { font-size: 13px; color: var(--ink-muted); }
.inv-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.inv .form-note .ic { display: inline-block; vertical-align: -2px; }
.access-loading { display: flex; align-items: center; gap: 12px; color: var(--ink-muted); }
.pw-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: -2px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-muted); }
.pw-rules li { display: flex; align-items: center; gap: 6px; }
.pw-rules li .ic { opacity: .35; }
.pw-rules li.ok { color: var(--success); }
.pw-rules li.ok .ic { opacity: 1; }
@media (max-width: 560px) { .inv-actions, .pw-rules { grid-template-columns: 1fr; } }

/* Editor de comunicados: detalhes que aparecem em Comunicações (abaixo do botão de ação) */
.ed-details { gap: 16px; margin-top: 4px; padding: 16px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface); }
.ed-details-head { display: flex; align-items: flex-start; gap: 10px; }
.ed-details-head .ic { flex: none; margin-top: 2px; color: var(--sky-ink); }
.ed-details-head strong { display: block; font-size: 14px; line-height: 20px; }
.ed-details-head span { display: block; font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* =====================================================================
   CARTEIRA (antiga Base de Clientes)
   ===================================================================== */
.bc-page { max-width: 1440px; }
.bc-dash { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.bc-dash > .bc-card-dash { grid-column: span var(--s3, 2); }
.bc-dash > .skeleton { grid-column: span 2; }
.bc-dash-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border: 1px dashed var(--border); border-radius: var(--r-lg); color: var(--ink-muted); font-size: 14px; }
.bc-dash-pop { width: 340px; }
.bc-dp-hint { margin: 0 12px 6px; font-size: 12.5px; color: var(--ink-muted); }
.bc-dp-list { display: flex; flex-direction: column; padding: 0 4px 6px; }
.bc-dp-item { display: grid; grid-template-columns: minmax(0, 1fr) 32px 32px; align-items: center; gap: 2px; border-radius: var(--r-sm); }
.bc-dp-item:hover { background: var(--surface); }
.bc-dp-item .cols-item { min-width: 0; min-height: 46px; }
.bc-dp-item .cols-item:hover { background: transparent; }
.bc-dp-item .cols-item span { display: flex; flex-direction: column; min-width: 0; line-height: 18px; }
.bc-dp-item .cols-item small { font-size: 11.5px; color: var(--ink-muted); }
.bc-dp-move { width: 32px; height: 32px; color: var(--ink-muted); }
.bc-dp-move.up .ic { transform: rotate(180deg); }
.bc-dp-move:disabled { opacity: .3; cursor: default; }
.bc-card-dash { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 188px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.bc-card-dash header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-card-dash header span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.bc-card-dash header small { font-size: 12px; color: var(--ink-muted); }
.bc-big { font-size: 44px; line-height: 48px; font-weight: 600; letter-spacing: -.02em; }
.bc-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hairline); }
.bc-minis div { display: flex; flex-direction: column; min-width: 0; }
.bc-minis b { font-size: 17px; line-height: 22px; font-weight: 600; }
.bc-minis span { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-bars { display: flex; flex-direction: column; gap: 4px; }
.bc-bar { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr) 28px; align-items: center; gap: 10px; min-height: 22px; padding: 2px 4px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bc-bar:hover, .bc-bar.on { background: var(--surface); }
.bc-bar-label { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-bar-track { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.bc-bar.on .bc-bar-track, .bc-bar:hover .bc-bar-track { background: var(--hairline); }
.bc-bar-track i { display: block; height: 100%; border-radius: 4px; background: var(--sky); }
.bc-bar b { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bc-more { padding: 2px 4px; font-size: 12px; color: var(--ink-muted); }
.bc-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface); }
.bc-stack i { display: block; height: 100%; }
.bc-stack i + i { box-shadow: -2px 0 0 var(--surface-2); }
.bc-legend { display: flex; flex-direction: column; gap: 2px; }
.bc-leg { display: grid; grid-template-columns: 10px minmax(0, 1fr) 32px 40px; align-items: center; gap: 10px; min-height: 30px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bc-leg:hover, .bc-leg.on { background: var(--surface); }
.bc-leg i { width: 10px; height: 10px; border-radius: 3px; }
.bc-leg b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bc-leg small { font-size: 12px; color: var(--ink-muted); text-align: right; }

.bc-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bc-search { flex: 1 1 300px; min-width: 220px; max-width: 460px; }
.bc-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .15s; }
.bc-chip:hover { border-color: var(--border-strong); }
.bc-chip > .ic:first-child { color: var(--ink-muted); }
.bc-chip.on { border-color: var(--ink); }
.bc-chip b { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; }
.bc-clear { margin-left: 4px; }
.bc-count { margin-left: auto; font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
.bc-pop { width: 280px; max-height: 340px; overflow-y: auto; padding: 4px; }
.bc-pop .fp-opt { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; }
.bc-pop .fp-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-pop .fp-opt small { font-size: 12px; color: var(--ink-muted); }
.bc-pop-clear { display: block; margin: 6px 8px 4px; }
.bc-table td { cursor: default; }
.bc-table tbody tr { cursor: default; }
.bc-table .bc-act-h, .bc-table .bc-act { width: 56px; min-width: 56px; padding: 0 4px 0 12px; }
.bc-fin { color: var(--sky-ink); }
.bc-fin:hover { background: var(--sky-tint); text-decoration: none; }
.bc-card { cursor: default; }
.bc-card header .bc-fin { flex: none; }

/* Financeiro */
.bc-split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface); }
.bc-split i { display: block; height: 100%; }
.bc-split i + i { box-shadow: -2px 0 0 var(--surface-2); }
.bc-split .z, .bc-dot.z { background: var(--ink); }
.bc-split .f, .bc-dot.f { background: var(--sky); }
.bc-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; vertical-align: 1px; }
.bc-st { background: var(--t-dot) !important; }
.bc-bars.money .bc-bar { grid-template-columns: minmax(0, min(34%, 220px)) minmax(0, 1fr) 76px; }
.bc-bar { grid-template-columns: minmax(0, min(38%, 220px)) minmax(0, 1fr) 28px; }
.bc-legend.money .bc-leg { grid-template-columns: 10px minmax(0, 1fr) 84px 40px; }
.bc-table .bc-num-h { text-align: right; }
.bc-table .bc-num-h > span { margin-left: auto; }
.bc-table td.bc-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-table td.bc-num b { font-weight: 500; }
.bc-table td.bc-num small { display: block; margin-top: 1px; font-size: 11.5px; line-height: 14px; color: var(--ink-muted); }
.bc-table th.bc-num-h { padding: 0 12px; }
.bc-table th.bc-num-h > span { display: inline-block; text-align: right; }
.bc-table td.bc-num { padding-left: 12px; padding-right: 12px; }
.bc-table td.bc-num:last-child, .bc-table th.bc-num-h:last-child { padding-right: 18px; }
.bc-table td.bc-client { min-width: 220px; }
.bc-table td.bc-client strong { display: block; max-width: 280px; white-space: normal; line-height: 20px; }
.bc-table td.bc-client small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-table td.bc-franq { max-width: 190px; white-space: normal; line-height: 18px; }
.bc-split-cap { display: flex; justify-content: space-between; gap: 8px; margin-top: -4px; font-size: 12px; color: var(--ink-muted); }
.bc-split-cap span { display: inline-flex; align-items: center; white-space: nowrap; }
.bc-split-cap b { margin-left: 4px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.bc-table tfoot td { position: sticky; bottom: 0; z-index: 1; height: 52px; padding-top: 0; padding-bottom: 0; border-top: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.bc-table tfoot td:first-child { text-align: left; }
.bc-table tfoot td:first-child small { display: inline; margin-left: 10px; font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.bc-table tfoot td.bc-num b { font-weight: 700; }
.bc-card-fin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 2px 0 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface); }
.bc-card-fin div { min-width: 0; }
.bc-card-fin dt { font-size: 11px; color: var(--ink-muted); }
.bc-card-fin dd { margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-card-fin dd b { font-weight: 600; }
.bc-card-fin dd small { margin-left: 6px; font-size: 11px; color: var(--ink-muted); }

@media (max-width: 1100px) {
  .bc-dash > .bc-card-dash { grid-column: span var(--s2, 3); }
}
@media (max-width: 760px) {
  .bc-dash { grid-template-columns: minmax(0, 1fr); }
  .bc-dash > .bc-card-dash, .bc-dash > .skeleton { grid-column: 1 / -1; }
  .bc-card-dash { min-height: 0; }
  .bc-big { font-size: 38px; line-height: 42px; }
  .bc-search { flex: 1 1 100%; max-width: none; }
  .bc-filters { gap: 6px; }
  .bc-chip { height: 40px; padding: 0 10px; font-size: 13px; }
  .bc-chip > .ic:first-child { display: none; }
  .bc-count { flex: 1 1 100%; margin-left: 0; order: 9; }
}

/* =====================================================================
   ACESSO: código de confirmação e formas de criar usuário
   ===================================================================== */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp .input { height: 56px; padding: 0; text-align: center; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.otp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-muted); }
.otp-foot .link-btn:disabled { color: var(--ink-muted); cursor: default; text-decoration: none; }
.am-choices { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.am-choices .choice { min-height: 112px; }
.am-choices .choice small { line-height: 16px; }
.am-choices .choice em { margin-top: auto; padding: 2px 8px; border-radius: 999px; background: var(--warning-tint); color: var(--warning); font-size: 11px; font-style: normal; font-weight: 600; }
.am-pw { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.am-pw .input-wrap { min-width: 0; }
.inv-cred { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface); font-size: 14px; }
.inv-cred dt { color: var(--ink-muted); font-size: 13px; }
.inv-cred dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .am-choices { grid-template-columns: 1fr; }
  .am-choices .choice { min-height: 0; }
  .otp { gap: 6px; }
  .otp .input { height: 50px; font-size: 22px; }
}

/* =====================================================================
   OPERAÇÃO → PROTOCOLOS (cotações)
   ===================================================================== */
.op-page { max-width: 1600px; }
.op-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ct-kpi.op-k { position: relative; cursor: pointer; }
.ct-kpi.op-k::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--t-dot); }
.ct-kpi.op-k.on { border-color: var(--t-dot); background: var(--t-bg); }
.ct-kpi.alert { cursor: pointer; }
.ct-kpi.alert.sel { box-shadow: inset 0 0 0 1.5px var(--danger); }
.op-filters { margin-bottom: 12px; }
.op-table th, .op-table td { white-space: nowrap; }
.op-table .client-cell.name strong { white-space: normal; min-width: 160px; max-width: 240px; display: block; }
.op-table td, .op-table th { padding-left: 12px; padding-right: 12px; }
.op-table tbody tr { cursor: pointer; }
.op-table tr.done td { color: var(--ink-muted); }
.op-table.prot td.op-col-target { background: rgba(245, 184, 0, .07); }
.op-table.prot th.op-col-target { color: #8A6100; }
[data-theme='dark'] .op-table.prot th.op-col-target { color: #FFC24B; }
.op-num { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-muted); letter-spacing: .02em; }
.op-files { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.op-files .ic { color: var(--ink-muted); }
.op-files em { padding: 1px 6px; border-radius: 6px; background: #FFF4CC; color: #7A5600; font-size: 10.5px; font-style: normal; font-weight: 700; letter-spacing: .03em; }
[data-theme='dark'] .op-files em { background: rgba(245, 184, 0, .18); color: #FFC24B; }
.op-files.noqar { color: var(--danger); }
.op-prio-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--t-bg); color: var(--t-fg); font-size: 12px; font-weight: 600; white-space: nowrap; }
.op-prio-chip i { width: 8px; height: 8px; border-radius: 2px; background: var(--t-dot); transform: rotate(45deg); }
.tg-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface); color: var(--ink-muted); }
.tg-pill.big { height: 28px; padding: 0 11px; font-size: 13px; border-radius: 14px; }
.tg-pill.tg-late { background: var(--danger-tint); color: var(--danger); }
.tg-pill.tg-today { background: #FFF4CC; color: #7A5600; box-shadow: inset 0 0 0 1.5px #F5B800; }
.tg-pill.tg-soon { background: var(--warning-tint); color: var(--warning); }
.tg-pill.tg-ok { background: var(--sky-tint); color: var(--sky-ink); }
.tg-pill.tg-done { background: var(--surface); color: var(--ink-muted); text-decoration: line-through; }
[data-theme='dark'] .tg-pill.tg-today { background: rgba(245, 184, 0, .16); color: #FFC24B; }
.op-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; margin-top: 6px; }
.op-card-line { cursor: pointer; }

/* Registro */
.op-rec .cr-actions .st-chip { height: 28px; padding: 0 12px; font-size: 12.5px; }
.cr-tab.err { color: var(--danger); }
.cr-tab.err::after { background: var(--danger); }
.op-need { width: 7px; height: 7px; border-radius: 50%; background: #F5B800; box-shadow: 0 0 0 3px rgba(245, 184, 0, .25); }
.op-req { color: var(--danger); font-weight: 700; }
.cf-hint { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.op-errors { display: flex; gap: 12px; margin-bottom: 20px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid rgba(180, 35, 24, .25); background: var(--danger-tint); color: var(--danger); font-size: 13.5px; line-height: 20px; }
.op-errors .ic { flex: none; margin-top: 2px; }
.op-errors strong { color: var(--ink); }
.op-errors ul { margin: 4px 0 0; padding-left: 18px; }
.op-errors .link-btn { color: var(--danger); text-align: left; font-weight: 500; }
.cf-field .invalid .input, .cf-field .invalid .cf-combo .input { border-color: var(--danger); }
.op-prio { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.op-prio-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.op-prio-btn i { width: 9px; height: 9px; border-radius: 2px; background: var(--t-dot); transform: rotate(45deg); }
.op-prio-btn.on { border-color: var(--t-dot); background: var(--t-bg); color: var(--t-fg); font-weight: 600; box-shadow: inset 0 0 0 1px var(--t-dot); }
.op-prio-btn:disabled { cursor: default; opacity: .75; }
.op-prio-btn:disabled.on { opacity: 1; }
.op-target-field .input { font-weight: 600; }

/* QAR: campo destacado em amarelo */
.op-qar { border-radius: var(--r-lg); padding: 4px; background: #FFF8E1; box-shadow: 0 0 0 2px #F5B800, 0 0 0 6px rgba(245, 184, 0, .18); }
[data-theme='dark'] .op-qar { background: rgba(245, 184, 0, .08); }
.op-qar.invalid { box-shadow: 0 0 0 2px var(--danger), 0 0 0 6px rgba(229, 72, 77, .18); }
.op-qar.ok { background: var(--surface-2); }
.op-qar.shake { animation: opShake .5s; }
@keyframes opShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.op-qar-drop { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 13px; border: 1.5px dashed #D9A200; cursor: pointer; color: #7A5600; }
.op-qar-drop:hover { background: rgba(245, 184, 0, .12); }
.op-qar-drop.disabled { cursor: default; }
.op-qar-drop strong { display: block; color: var(--ink); font-size: 15px; }
.op-qar-drop small { font-size: 12.5px; color: var(--ink-muted); }
[data-theme='dark'] .op-qar-drop { color: #FFC24B; }
.op-qar-file { grid-template-columns: 40px minmax(0, 1fr) auto auto; border-radius: 13px; background: var(--surface-2); }
.op-qar-ok { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--success-tint); color: var(--success); font-size: 12px; font-weight: 600; white-space: nowrap; }
.op-qar-file .btn input { display: none; }

/* Barras do registro */
.op-staffbar { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--hairline); background: var(--surface-2); }
.op-staffbar small { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.op-target { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 14px; border-radius: var(--r-md); background: #FFF8E1; box-shadow: inset 0 0 0 2px #F5B800; }
.op-target .ic { flex: none; color: #8A6100; }
.op-target small { margin: 0; color: #8A6100; }
.op-target strong { display: block; font-size: 17px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-target em { margin-left: 8px; padding: 3px 9px; border-radius: 999px; background: #F5B800; color: #0A0A0B; font-size: 11.5px; font-style: normal; font-weight: 700; white-space: nowrap; }
.op-target.tg-late { background: var(--danger-tint); box-shadow: inset 0 0 0 2px var(--danger); }
.op-target.tg-late .ic, .op-target.tg-late small { color: var(--danger); }
.op-target.tg-late em { background: var(--danger); color: #fff; }
.op-target.tg-none { background: var(--surface); box-shadow: none; }
.op-target.tg-none .ic, .op-target.tg-none small { color: var(--ink-muted); }
.op-target.tg-done { background: var(--surface); box-shadow: none; }
[data-theme='dark'] .op-target { background: rgba(245, 184, 0, .1); }
.op-status-ctl .seg button { height: 34px; padding: 0 12px; }
.op-status-ctl .seg button .dot { width: 7px; height: 7px; }
.op-meta { min-width: 0; text-align: right; }
.op-meta strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-meta span { font-size: 12px; color: var(--ink-muted); }
.op-fbar { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--hairline); background: var(--t-bg); color: var(--t-fg); font-size: 13.5px; line-height: 19px; }
.op-fbar .ic { flex: none; }
.op-fbar span { flex: 1; color: var(--ink); }
.op-fbar strong { color: var(--t-fg); }

/* Mensagem de sucesso */
.op-success { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 4px 0; }
.op-success-ic { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 50%; background: var(--success-tint); color: var(--success); animation: opPop .4s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes opPop { from { transform: scale(.6); opacity: 0; } }
.op-success h3 { font-size: 20px; line-height: 26px; }
.op-success p { margin: 0; font-size: 14px; line-height: 21px; }
.op-success .form-actions { align-self: stretch; justify-content: center; margin-top: 10px; }

/* E-mails da Operação (Painel de Administração) */
.ae-card { max-width: 720px; padding: 22px; }
.ae-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.ae-head strong { display: block; font-size: 16px; }
.ae-head span { font-size: 13px; color: var(--ink-muted); }
.ae-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #FB923C, #EA580C); color: #fff; }
.ae-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ae-list { display: flex; flex-direction: column; margin-top: 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.ae-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px 6px 14px; }
.ae-row + .ae-row { border-top: 1px solid var(--hairline); }
.ae-av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface); color: var(--ink-muted); }
.ae-email { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ae-empty { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; color: var(--warning); background: var(--warning-tint); font-size: 13px; line-height: 19px; }
.ae-empty .ic { flex: none; margin-top: 1px; }
.ae-empty span { color: var(--ink); }
.ae-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.ae-spacer { flex: 1; }
.ae-dirty { font-size: 12.5px; color: var(--warning); }
.ae-note { max-width: 720px; margin-top: 12px; display: flex; gap: 8px; align-items: flex-start; }

@media (max-width: 1100px) {
  .op-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .op-staffbar { grid-template-columns: max-content minmax(0, 1fr); }
  .op-status-ctl { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 760px) {
  .op-kpis { display: flex; }
  .op-prio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-staffbar { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; gap: 12px; }
  .op-meta { text-align: left; }
  .op-status-ctl .seg { display: flex; }
  .op-status-ctl .seg button { flex: 1; justify-content: center; padding: 0 6px; font-size: 12px; }
  .op-fbar { padding: 12px 16px; flex-wrap: wrap; }
  .op-qar-file { grid-template-columns: 40px minmax(0, 1fr); }
  .op-qar-file .op-qar-ok, .op-qar-file .btn { grid-column: 2; justify-self: start; }
  .ae-card { padding: 16px; }
}

/* Protocolos v2: status + criar negócio, conversas, devolver */
.op-status-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.op-status-big { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 17px; }
.op-deal-btn { height: 36px; }
.op-deal-who { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.op-deal-sum { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); }
.op-deal-sum span { font-size: 13px; color: var(--ink-muted); }
.op-return-btn { color: var(--danger); border-color: rgba(180, 35, 24, .35); }
.op-return-btn:hover { background: var(--danger-tint); }
.op-return-confirm { background: var(--danger); color: #fff; }
.op-new-msg { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(77, 178, 236, .25); }
.op-msg-flag { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 6px; border-radius: 50%; background: var(--sky-tint); color: var(--sky-ink); vertical-align: middle; }
.op-chat { display: flex; flex-direction: column; min-height: 100%; }
.op-chat-list { display: flex; flex-direction: column; gap: 14px; max-height: min(52vh, 520px); min-height: 220px; overflow-y: auto; padding: 16px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface); }
.op-chat-list .lg-empty { margin: auto; border: 0; background: transparent; text-align: center; max-width: 380px; }
.op-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.op-msg.mine { align-self: flex-end; align-items: flex-end; }
.op-msg-meta { display: flex; gap: 8px; align-items: baseline; margin: 0 4px 4px; font-size: 12px; color: var(--ink-muted); }
.op-msg-meta strong { color: var(--ink); font-weight: 600; }
.op-msg-bubble { padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); border: 1px solid var(--hairline); font-size: 14px; line-height: 21px; color: var(--ink); overflow-wrap: anywhere; }
.op-msg.mine .op-msg-bubble { border-radius: 14px 14px 4px 14px; background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.op-msg.pend .op-msg-bubble { background: var(--danger-tint); color: var(--ink); border-color: rgba(180, 35, 24, .3); }
.op-msg-tag { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.op-chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 12px; }
.op-chat-compose textarea { min-height: 48px; max-height: 160px; resize: vertical; padding-top: 12px; line-height: 20px; }
.op-chat-compose .btn { height: 48px; }
.op-chat .cf-hint { margin-top: 6px; }
@media (max-width: 760px) {
  .op-msg { max-width: 92%; }
  .op-chat-list { max-height: 50vh; }
  .op-status-row .seg { flex: 1; }
}

/* =====================================================================
   GERAR QAR COM IA
   ===================================================================== */
.btn-ai { position: relative; overflow: hidden; border: 0; color: #fff; background: linear-gradient(120deg, #7C3AED 0%, #6366F1 40%, #4DB2EC 100%); box-shadow: 0 6px 18px rgba(99, 102, 241, .32), inset 0 1px 0 rgba(255, 255, 255, .25); font-weight: 600; }
.btn-ai::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); animation: aiShine 3.6s ease-in-out infinite; }
.btn-ai:hover { filter: brightness(1.06); text-decoration: none; color: #fff; }
.btn-ai:disabled { opacity: .55; cursor: default; }
.btn-ai:disabled::after { animation: none; }
.btn-ai .ic { filter: drop-shadow(0 0 4px rgba(255, 255, 255, .6)); }
@keyframes aiShine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .btn-ai::after { animation: none; } }
.op-qar-ai { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px 10px 14px; border-radius: var(--r-md); background: linear-gradient(120deg, rgba(124, 58, 237, .08), rgba(77, 178, 236, .08)); font-size: 13px; color: var(--ink-muted); }

.qar-page { max-width: 1180px; }
.qar-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--ink-muted); }
.qar-eyebrow { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(120deg, #7C3AED, #4DB2EC); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qar-eyebrow .ic { color: #7C3AED; }
.qar-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.qar-card { position: relative; padding: 22px; overflow: hidden; }
.qar-step { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.qar-step + .qar-drop { margin-top: 0; }
.qar-step span { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-ink); font-size: 13px; font-weight: 700; }
.qar-step strong { display: block; font-size: 15px; }
.qar-step small { font-size: 12.5px; color: var(--ink-muted); }
.qar-files + .qar-step { margin-top: 22px; }
.qar-drop { display: flex; align-items: center; gap: 16px; padding: 24px 22px; border: 1.5px dashed rgba(99, 102, 241, .45); border-radius: var(--r-lg); background: linear-gradient(120deg, rgba(124, 58, 237, .05), rgba(77, 178, 236, .06)); cursor: pointer; transition: border-color .15s, background-color .15s; }
.qar-drop:hover, .qar-drop.over { border-color: #6366F1; background: linear-gradient(120deg, rgba(124, 58, 237, .1), rgba(77, 178, 236, .12)); }
.qar-drop-ic { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, #7C3AED, #4DB2EC); color: #fff; }
.qar-drop strong { display: block; font-size: 15px; color: var(--ink); }
.qar-drop small { font-size: 12.5px; color: var(--ink-muted); }
.qar-files { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.qar-files:empty { display: none; }
.qar-file { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
.qar-file-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surface); color: #6366F1; }
.qar-file-name strong { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qar-file-name small { font-size: 12px; color: var(--ink-muted); }
.qar-notes { min-height: 96px; resize: vertical; padding-top: 12px; line-height: 20px; }
.qar-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.qar-privacy { display: flex; align-items: flex-start; gap: 8px; margin: 0; max-width: 460px; font-size: 12.5px; line-height: 18px; color: var(--ink-muted); }
.qar-privacy .ic { flex: none; margin-top: 2px; }
.qar-foot .btn-ai { height: 48px; padding: 0 26px; font-size: 15px; }
.qar-card .form-error { margin-top: 14px; }
.qar-busy { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: color-mix(in srgb, var(--surface-2) 92%, transparent); backdrop-filter: blur(2px); }
.qar-busy strong { font-size: 16px; }
.qar-busy small { font-size: 13px; color: var(--ink-muted); }
.qar-orb { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 6px; color: #fff; }
.qar-orb span { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #7C3AED, #4DB2EC, #6366F1, #7C3AED); animation: aiSpin 2.2s linear infinite; filter: blur(.4px); }
.qar-orb span::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: linear-gradient(135deg, #6D28D9, #2E8BC9); }
.qar-orb .ic { position: relative; animation: aiPulse 1.6s ease-in-out infinite; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiPulse { 50% { transform: scale(1.15); opacity: .8; } }
.qar-bar { width: min(320px, 80%); height: 4px; margin-top: 6px; border-radius: 2px; background: var(--hairline); overflow: hidden; }
.qar-bar i { display: block; width: 40%; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #7C3AED, #4DB2EC); animation: aiBar 1.8s ease-in-out infinite; }
@keyframes aiBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.qar-side { display: flex; flex-direction: column; gap: 12px; }
.qar-how { padding: 18px 20px; }
.qar-how > strong { display: block; margin-bottom: 10px; font-size: 14px; }
.qar-how ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.qar-how b { color: var(--ink); font-weight: 600; }
.qar-model { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(120deg, rgba(124, 58, 237, .07), rgba(77, 178, 236, .08)); }
.qar-model .ic { color: #7C3AED; }
.qar-model-test { flex-direction: column; align-items: stretch; gap: 8px; margin: 0; border: 1px solid var(--hairline); }
.qar-model-test legend { display: flex; align-items: center; gap: 8px; padding: 0; float: left; width: 100%; margin-bottom: 4px; }
.qar-model-test label { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; background: var(--surface); border: 1px solid var(--hairline); }
.qar-model-test label:has(input:checked) { border-color: #7C3AED; }
.qar-model-test input { margin-top: 3px; accent-color: #7C3AED; }
.qar-model-test b { display: block; font-size: 13.5px; }
.qar-model-test small { font-size: 12px; color: var(--ink-muted); }
.qar-res-cost { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; line-height: 19px; }
.qar-model strong { display: block; font-size: 13.5px; }
.qar-model small { font-size: 12px; color: var(--ink-muted); }
.qar-result { margin-top: 16px; padding: 22px; }
.qar-res-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qar-res-head > div { flex: 1; min-width: 200px; }
.qar-res-head strong { display: block; font-size: 17px; }
.qar-res-head span:not(.st-chip):not(.qar-res-ic) { font-size: 13.5px; color: var(--ink-muted); }
.qar-res-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--success-tint); color: var(--success); }
.qar-res-sum { margin: 14px 0 0; font-size: 14px; line-height: 21px; color: var(--ink); }
.qar-res-pend { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--warning-tint); }
.qar-res-pend strong { display: flex; align-items: center; gap: 8px; color: var(--warning); font-size: 13.5px; }
.qar-res-pend ul { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 20px; color: var(--ink); }
.qar-res-pend small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.qar-res-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 960px) { .qar-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .qar-card, .qar-result { padding: 16px; }
  .qar-drop { padding: 18px 16px; }
  .qar-foot .btn-ai { width: 100%; justify-content: center; }
  .qar-res-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Documentos (Meus Documentos · Documentos da Franquia) ---------- */
.docs-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-muted); text-decoration: none; margin-bottom: 10px; }
.docs-back:hover { color: var(--ink); }
.docs-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.docs-hub-card { position: relative; display: flex; align-items: flex-start; gap: 18px; padding: 26px 24px; border-radius: var(--r-xl); background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; overflow: hidden; }
.docs-hub-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--sky-tint), transparent 70%); pointer-events: none; }
.docs-hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border); }
.docs-hub-card:focus-visible { outline: none; box-shadow: var(--focus); }
.docs-hub-ic { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; color: #fff; box-shadow: 0 8px 20px rgba(10, 10, 11, .14); }
.docs-hub-ic.mine { background: linear-gradient(140deg, #38BDF8, #0369A1); }
.docs-hub-ic.net { background: linear-gradient(140deg, #3F3F46, #0A0A0B); }
[data-theme='dark'] .docs-hub-ic.net { background: linear-gradient(140deg, #52525B, #18181B); }
.docs-hub-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.docs-hub-txt strong { font-size: 20px; line-height: 26px; font-weight: 650; letter-spacing: -.01em; }
.docs-hub-txt > span { color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.docs-hub-txt small { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.docs-hub-txt small em { font-style: normal; font-weight: 650; color: var(--sky-ink); background: var(--sky-tint); padding: 2px 8px; border-radius: 999px; margin-right: 4px; }
.docs-hub-go { flex: none; align-self: center; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); color: var(--ink); transition: transform .18s ease, background-color .18s ease; }
.docs-hub-card:hover .docs-hub-go { transform: translateX(3px); background: var(--primary-bg); color: var(--primary-ink); }

.docs-pick { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 22px; }
.docs-pick .field { min-width: 260px; max-width: 460px; }
.docs-pick-note { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 12.5px; color: var(--ink-muted); }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; align-items: start; }
.docs-box { display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.docs-box.fixed { border-top: 3px solid var(--accent); }
.docs-box.drag { border-color: var(--accent); box-shadow: var(--focus); background: var(--sky-tint); }
.docs-box.busy { opacity: .85; }
.docs-box-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 18px; }
.docs-box-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--sky-tint); color: var(--sky-ink); }
.docs-box-title { flex: 1; min-width: 0; }
.docs-box-title h3 { margin: 0; font-size: 15px; line-height: 20px; font-weight: 650; overflow-wrap: anywhere; }
.docs-box-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; font-size: 12px; color: var(--ink-muted); }
.docs-fixed { flex: none; font-style: normal; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-ink); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.docs-box-tools { display: flex; gap: 2px; flex: none; }
.docs-box-tools .icon-btn { width: 32px; height: 32px; color: var(--ink-muted); }
.docs-box-tools .icon-btn:hover { color: var(--ink); }
.docs-files { list-style: none; margin: 0; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.docs-file { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; transition: background-color .12s; }
.docs-file:hover { background: var(--surface); }
.docs-ext { flex: none; display: grid; place-items: center; min-width: 40px; height: 26px; padding: 0 6px; border-radius: 7px; font-size: 10px; font-weight: 750; letter-spacing: .04em; background: var(--surface); color: var(--ink-muted); border: 1px solid var(--hairline); }
.docs-ext.pdf { background: #FDECEC; color: #B42318; border-color: transparent; }
.docs-ext.doc { background: #E8F0FE; color: #1A56DB; border-color: transparent; }
.docs-ext.xls { background: #E7F4ED; color: #1E7F4F; border-color: transparent; }
.docs-ext.img { background: #F3E8FF; color: #7C3AED; border-color: transparent; }
.docs-ext.ppt { background: #FFF0E5; color: #C2410C; border-color: transparent; }
[data-theme='dark'] .docs-ext.pdf { background: rgba(255, 107, 107, .16); color: #FF8A8A; }
[data-theme='dark'] .docs-ext.doc { background: rgba(96, 165, 250, .16); color: #93C5FD; }
[data-theme='dark'] .docs-ext.xls { background: rgba(61, 220, 151, .14); color: #3DDC97; }
[data-theme='dark'] .docs-ext.img { background: rgba(192, 132, 252, .16); color: #D8B4FE; }
[data-theme='dark'] .docs-ext.ppt { background: rgba(251, 146, 60, .16); color: #FDBA74; }
.docs-file-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.docs-file-name { all: unset; cursor: pointer; color: var(--ink); font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs-file-name:hover { text-decoration: underline; }
.docs-file-name:focus-visible { box-shadow: var(--focus); border-radius: 4px; }
.docs-file.sel { background: var(--sky-tint); }
.docs-file.sel .docs-file-name { color: var(--sky-ink); }
.docs-view { flex: none; gap: 6px; height: 32px; padding: 0 10px; }
.docs-file-txt small { font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs-dl { flex: none; gap: 6px; height: 32px; padding: 0 10px; }
.docs-rm { flex: none; width: 32px; height: 32px; color: var(--ink-muted); }
.docs-rm:hover { color: var(--danger); background: var(--danger-tint); }
.docs-empty { display: flex; align-items: center; gap: 8px; padding: 14px 8px; font-size: 13px; color: var(--ink-muted); }
.docs-attach { display: flex; align-items: center; gap: 8px; margin: 0 16px 16px; padding: 0 14px; height: 44px; border: 1.5px dashed var(--border); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.docs-attach span { white-space: nowrap; }
.docs-attach small { margin-left: auto; min-width: 0; font-weight: 400; font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs-attach:hover:not(:disabled) { border-color: var(--accent); background: var(--sky-tint); color: var(--sky-ink); }
.docs-attach:disabled { cursor: progress; opacity: .7; }
.docs-modal-for { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--ink-muted); }
.docs-modal-for strong { color: var(--ink); }
.docs-drop.over { border-color: var(--accent); background: var(--sky-tint); color: var(--sky-ink); }
.docs-chosen { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.docs-chosen:empty { display: none; }
.docs-chosen li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 10px; background: var(--surface); font-size: 13px; }
.docs-chosen li .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-chosen li small { color: var(--ink-muted); font-size: 11.5px; white-space: nowrap; }
.docs-chosen .icon-btn { width: 28px; height: 28px; }

@media (max-width: 760px) {
  .docs-hub { grid-template-columns: 1fr; gap: 14px; }
  .docs-hub-card { padding: 20px 18px; gap: 14px; }
  .docs-hub-ic { width: 50px; height: 50px; border-radius: 15px; }
  .docs-hub-txt strong { font-size: 18px; line-height: 24px; }
  .docs-grid { grid-template-columns: 1fr; }
  .docs-pick .field { min-width: 0; max-width: none; width: 100%; }
  .docs-dl span, .docs-view span { display: none; }
  .docs-dl, .docs-view { width: 36px; padding: 0; justify-content: center; }
  .docs-pv-body { height: 380px; }
  .docs-attach small { display: none; }
}
.m-legacy .docs-back { display: none; }

/* Pré-visualização dentro da caixa */
.docs-pv { margin: 0 16px 16px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface); overflow: hidden; }
.docs-pv-empty { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink-muted); }
.docs-pv-empty .ic { flex: none; color: var(--sky-ink); }
.docs-pv-empty span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.docs-pv-empty strong { font-size: 13px; color: var(--ink); font-weight: 600; }
.docs-pv-empty small { font-size: 12px; }
.docs-pv.on { border-color: var(--border); box-shadow: var(--shadow-sm); }
.docs-pv-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--hairline); }
.docs-pv-bar strong { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs-pv-bar .docs-ext { min-width: 36px; height: 22px; font-size: 9.5px; }
.docs-pv-bar .icon-btn { width: 32px; height: 32px; color: var(--ink-muted); flex: none; }
.docs-pv-bar .icon-btn:hover { color: var(--ink); }
.docs-pv-body { height: 460px; overflow: auto; overscroll-behavior: contain; }

/* Conteúdo da pré-visualização (caixa e tela cheia) */
.pv-host { min-height: 100%; }
.pv-inline { padding: 14px; }
.pv-loading { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; min-height: 200px; color: var(--ink-muted); font-size: 13px; }
.pv-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--hairline); border-top-color: var(--accent); animation: pv-spin .8s linear infinite; }
@keyframes pv-spin { to { transform: rotate(360deg); } }
.pv-msg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 220px; padding: 24px; text-align: center; color: var(--ink-muted); font-size: 13px; }
.pv-msg .ic { color: var(--sky-ink); }
.pv-msg strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.pv-msg .btn { margin-top: 6px; gap: 6px; }
.pv-pdf { display: flex; flex-direction: column; gap: 12px; margin: 0 auto; max-width: 100%; transition: width .15s ease; }
.pv-full .pv-pdf { width: min(900px, 100%); max-width: none; }
.pv-page { position: relative; width: 100%; background: #fff; box-shadow: 0 1px 3px rgba(10, 10, 11, .14), 0 6px 18px rgba(10, 10, 11, .08); border-radius: 3px; overflow: hidden; }
.pv-page canvas { display: block; width: 100%; height: 100%; }
.pv-pnum { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 999px; background: rgba(10, 10, 11, .62); color: #fff; font-size: 10.5px; font-weight: 600; pointer-events: none; }
.pv-img { display: flex; justify-content: center; align-items: flex-start; }
.pv-img img { max-width: 100%; height: auto; border-radius: 4px; box-shadow: var(--shadow-sm); background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.pv-paper { background: #fff; color: #1a1a1a; border-radius: 4px; box-shadow: 0 1px 3px rgba(10, 10, 11, .14), 0 6px 18px rgba(10, 10, 11, .08); padding: 32px 36px; margin: 0 auto; max-width: 820px; }
.pv-doc { font-family: Georgia, 'Times New Roman', serif; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.pv-doc h1, .pv-doc h2, .pv-doc h3, .pv-doc h4 { font-family: var(--font); color: #0A0A0B; margin: 1.2em 0 .5em; line-height: 1.3; }
.pv-doc h1 { font-size: 22px; } .pv-doc h2 { font-size: 18px; } .pv-doc h3 { font-size: 16px; }
.pv-doc p { margin: 0 0 .8em; }
.pv-doc table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 13px; }
.pv-doc td, .pv-doc th { border: 1px solid #ccc; padding: 6px 8px; vertical-align: top; }
.pv-doc img { max-width: 100%; height: auto; }
.pv-doc a { color: #1A6EA3; }
.pv-text { margin: 0; padding: 16px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 8px; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.pv-tabs { display: flex; gap: 4px; margin-bottom: 10px; overflow-x: auto; }
.pv-tabs button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); background: var(--surface-2); border: 1px solid var(--hairline); white-space: nowrap; }
.pv-tabs button.on { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.pv-sheet-wrap { overflow: auto; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface-2); }
.pv-sheet { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.pv-sheet th, .pv-sheet td { border: 1px solid var(--hairline); padding: 4px 8px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.pv-sheet thead th, .pv-sheet tbody th { background: var(--surface); color: var(--ink-muted); font-weight: 600; position: sticky; top: 0; }
.pv-sheet tbody th { left: 0; position: sticky; text-align: right; }
.pv-note { margin: 8px 2px 0; font-size: 12px; color: var(--ink-muted); }

/* Tela cheia */
.pv-lock { overflow: hidden; }
.pv-overlay { position: fixed; inset: 0; z-index: 5000; display: flex; flex-direction: column; background: #0E0F12; animation: pv-in .16s ease; }
@keyframes pv-in { from { opacity: 0; } }
.pv-ov-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 20px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); padding-top: max(10px, env(safe-area-inset-top)); }
.pv-ov-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pv-ov-title strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-ov-title small { font-size: 12px; color: #A3ABB8; }
.pv-ov-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.pv-ov-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; color: #E5E7EB; font-size: 13px; font-weight: 600; }
.pv-ov-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); color: #fff; }
.pv-ov-btn:disabled { opacity: .3; cursor: default; }
.pv-ov-btn:focus-visible { box-shadow: var(--focus); }
.pv-ov-btn[hidden], .pv-ov-zoom[hidden] { display: none; }
.pv-ov-dl { background: rgba(255, 255, 255, .1); padding: 0 12px; margin-left: 4px; }
.pv-ov-zoom { min-width: 46px; text-align: center; font-size: 12px; color: #A3ABB8; font-variant-numeric: tabular-nums; }
.pv-ov-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .14); margin: 0 6px; }
.pv-ov-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.pv-ov-doc { min-height: 100%; }
.pv-full .pv-msg { color: #A3ABB8; }
.pv-full .pv-msg strong { color: #fff; }
.pv-full .pv-loading { color: #A3ABB8; min-height: 60vh; }
.pv-full .pv-img img { max-height: none; }
@media (max-width: 760px) {
  .pv-ov-bar { padding-left: 14px; gap: 8px; }
  .pv-ov-dl span, .pv-ov-zoom, .pv-ov-sep { display: none; }
  .pv-ov-body { padding: 12px; }
  .pv-paper { padding: 20px 18px; }
}

/* ---------- Mensagens (estilo e-mail) ---------- */
.mx-page .page-head { margin-bottom: 20px; }
.mx { display: grid; grid-template-columns: minmax(300px, 360px) 1fr; height: calc(100vh - var(--topbar-h) - 190px); min-height: 560px; border: 1px solid var(--hairline); border-radius: var(--r-xl); background: var(--surface-2); box-shadow: var(--shadow-sm); overflow: hidden; }
.mx-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--hairline); background: var(--surface); }
.mx-tabs { display: flex; gap: 4px; padding: 12px 12px 8px; }
.mx-tabs button { all: unset; cursor: pointer; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.mx-tabs button:hover { background: var(--surface-2); color: var(--ink); }
.mx-tabs button.on { background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow-sm); }
.mx-tabs button:focus-visible { box-shadow: var(--focus); }
.mx-tabs em { font-style: normal; font-size: 10.5px; font-weight: 700; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--sky-tint); color: var(--sky-ink); text-align: center; }
.mx-tabs em:empty { display: none; }
.mx-search { display: flex; align-items: center; gap: 8px; margin: 0 12px 10px; padding: 0 12px; height: 38px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink-muted); }
.mx-search:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.mx-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--ink); }
.mx-list { flex: 1; overflow-y: auto; padding: 0 8px 12px; overscroll-behavior: contain; }
.mx-skel { height: 76px; margin: 6px 4px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2), var(--hairline), var(--surface-2)); background-size: 200% 100%; animation: mx-sk 1.2s linear infinite; opacity: .6; }
.mx-skel.tall { height: 160px; }
@keyframes mx-sk { to { background-position: -200% 0; } }
.mx-item { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 12px 12px 14px; border-radius: 12px; margin-bottom: 2px; transition: background-color .12s; }
.mx-item:hover { background: var(--surface-2); }
.mx-item.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm); }
.mx-item:focus-visible { box-shadow: var(--focus); }
.mx-item .avatar { flex: none; }
.mx-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mx-item-top { display: flex; align-items: baseline; gap: 8px; }
.mx-item-top strong { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-item-top time { flex: none; font-size: 11.5px; color: var(--ink-muted); }
.mx-item-sub { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-item-snip { font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-item.unread .mx-item-top strong, .mx-item.unread .mx-item-sub { font-weight: 750; }
.mx-item.unread .mx-item-top time { color: var(--sky-ink); font-weight: 650; }
.mx-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--ink-muted); }
.mx-role { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hairline); font-size: 11px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.mx-item .mx-role { background: transparent; }
.mx-clip { display: inline-flex; color: var(--ink-muted); }
.mx-exp { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-muted); }
.mx-exp.warn { color: var(--warning); font-weight: 600; }
.mx-dot { position: absolute; right: 12px; bottom: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--sky-tint); }
.mx-av-draft { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--warning-tint); color: var(--warning); }
.mx-tag-draft { padding: 1px 7px; border-radius: 999px; background: var(--warning-tint); color: var(--warning); font-weight: 700; font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase; }
.mx-empty-list { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; text-align: center; font-size: 13px; color: var(--ink-muted); }
.mx-empty-list .ic { color: var(--sky-ink); }

.mx-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface-2); }
.mx-blank { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 340px; padding: 24px; text-align: center; color: var(--ink-muted); font-size: 13.5px; }
.mx-blank .ic { color: var(--sky-ink); margin-bottom: 4px; }
.mx-blank strong { color: var(--ink); font-size: 16px; }
.mx-blank .btn { margin-top: 8px; gap: 6px; }
.mx-thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mx-th-head { display: flex; align-items: center; gap: 10px; padding: 18px 24px 12px; border-bottom: 1px solid var(--hairline); }
.mx-back { display: none; flex: none; }
.mx-th-title { min-width: 0; }
.mx-th-title h2 { margin: 0; font-size: 19px; line-height: 25px; font-weight: 650; letter-spacing: -.01em; overflow-wrap: anywhere; }
.mx-th-title p { margin: 4px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.mx-ttl { display: flex; align-items: flex-start; gap: 8px; margin: 12px 24px 0; padding: 9px 12px; border-radius: 10px; background: var(--sky-tint); color: var(--sky-ink); font-size: 12.5px; line-height: 18px; }
.mx-ttl .ic { flex: none; margin-top: 1px; }
.mx-ttl.warn { background: var(--warning-tint); color: var(--warning); }
.mx-msgs { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.mx-msg { border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow-sm); }
.mx-msg.mine { background: var(--surface); }
.mx-msg header { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.mx-msg-who { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.mx-msg-who strong { font-size: 13.5px; }
.mx-msg-who small { width: 100%; font-size: 12px; color: var(--ink-muted); }
.mx-msg header time { flex: none; font-size: 12px; color: var(--ink-muted); align-self: flex-start; padding-top: 2px; }
.mx-body { padding: 10px 16px 14px 60px; font-size: 14px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.mx-body p, .mx-body div { margin: 0; }
.mx-body ul, .mx-body ol { margin: 6px 0; padding-left: 22px; }
.mx-body a { color: var(--sky-ink); }
.mx-body blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--hairline); color: var(--ink-muted); }
.mx-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px 60px; }
.mx-file { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 8px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); }
.mx-file .docs-ext { min-width: 36px; height: 24px; font-size: 9.5px; }
.mx-file-txt { display: flex; flex-direction: column; min-width: 0; max-width: 220px; }
.mx-file-txt strong { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-file-txt small { font-size: 11px; color: var(--ink-muted); }
.mx-file .icon-btn { width: 30px; height: 30px; color: var(--ink-muted); }
.mx-file .icon-btn:hover { color: var(--ink); }
.mx-reply { padding: 12px 24px 18px; border-top: 1px solid var(--hairline); background: var(--surface-2); }
.mx-reply:empty { display: none; }
.mx-reply-btn { all: unset; box-sizing: border-box; cursor: text; display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); color: var(--ink-muted); font-size: 14px; transition: border-color .15s; }
.mx-reply-btn:hover, .mx-reply-btn:focus-visible { border-color: var(--accent); color: var(--ink); box-shadow: var(--focus); }
.mx-reply .mx-compose { max-height: 62vh; overflow-y: auto; }

.mx-new { overflow-y: auto; padding: 22px 24px; }
.mx-compose { display: flex; flex-direction: column; gap: 12px; }
.mx-c-head { display: flex; align-items: center; gap: 10px; }
.mx-c-head strong { font-size: 16px; font-weight: 650; }
.mx-new .mx-c-head strong { font-size: 19px; }
.mx-c-saved { flex: 1; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--success); }
.mx-c-head .icon-btn { margin-left: auto; color: var(--ink-muted); }
.mx-field { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; }
.mx-field > span { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.mx-rte { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.mx-rte:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.mx-rte-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 5px 6px; border-bottom: 1px solid var(--hairline); background: var(--surface); border-radius: var(--r-md) var(--r-md) 0 0; }
.mx-rte-bar button { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 8px; color: var(--ink); font-size: 13px; }
.mx-rte-bar button:hover { background: var(--surface-2); }
.mx-rte-bar button.on { background: var(--sky-tint); color: var(--sky-ink); }
.mx-rte-bar button:focus-visible { box-shadow: var(--focus); }
.mx-sep { width: 1px; height: 20px; background: var(--hairline); margin: 0 4px; }
.mx-pop { position: relative; display: inline-flex; }
.mx-a { font-weight: 800; font-family: Georgia, serif; font-size: 15px; line-height: 1; }
.mx-swatch { width: 14px; height: 4px; border-radius: 2px; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); }
.mx-pop > button { position: relative; padding-bottom: 4px; }
.mx-hl { padding: 0 3px; border-radius: 3px; background: #FFF3B0; color: #0A0A0B; font-weight: 700; font-size: 12px; }
.mx-ol { font-weight: 700; font-size: 12.5px; }
.mx-clear { font-weight: 700; font-family: Georgia, serif; font-size: 14px; }
.mx-clear small { font-size: 10px; color: var(--danger); }
.mx-palette { position: absolute; top: 36px; left: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 24px); gap: 6px; padding: 8px; border-radius: 12px; background: var(--elevated); border: 1px solid var(--hairline); box-shadow: var(--shadow-md); }
.mx-palette[hidden] { display: none; }
.mx-palette button { min-width: 24px !important; width: 24px; height: 24px !important; padding: 0 !important; border-radius: 6px !important; border: 1px solid rgba(10, 10, 11, .12) !important; }
.mx-palette .mx-none { background: var(--surface) !important; color: var(--ink-muted) !important; }
.mx-rte-area { min-height: 180px; max-height: 420px; overflow-y: auto; padding: 14px 16px; outline: none; font-size: 14.5px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.mx-reply .mx-rte-area { min-height: 120px; max-height: 260px; }
.mx-rte-area:empty::before { content: attr(data-placeholder); color: var(--ink-muted); pointer-events: none; }
.mx-rte-area ul, .mx-rte-area ol { padding-left: 22px; margin: 6px 0; }
.mx-rte-area a { color: var(--sky-ink); }
.mx-attach { display: flex; flex-direction: column; gap: 8px; }
.mx-attach-btn { align-self: flex-start; gap: 6px; cursor: pointer; }
.mx-chosen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mx-chosen:empty { display: none; }
.mx-chosen li { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 4px 4px 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--hairline); font-size: 12.5px; }
.mx-chosen li .grow { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-chosen li small { color: var(--ink-muted); font-size: 11px; white-space: nowrap; }
.mx-chosen .docs-ext { min-width: 34px; height: 22px; font-size: 9.5px; }
.mx-chosen .icon-btn { width: 26px; height: 26px; }
.mx-warn { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 12px; border-radius: 10px; background: var(--warning-tint); color: var(--warning); font-size: 12.5px; line-height: 18px; }
.mx-warn .ic { flex: none; margin-top: 2px; }
.mx-c-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mx-c-actions > div { display: flex; gap: 8px; margin-left: auto; }
.mx-c-actions .btn { gap: 6px; }
.mx-discard { color: var(--danger); }

@media (max-width: 900px) {
  .mx { grid-template-columns: 1fr; height: calc(100dvh - var(--topbar-h) - 170px); min-height: 480px; }
  .mx-main { display: none; }
  .mx.has-main .mx-side { display: none; }
  .mx.has-main .mx-main { display: flex; }
  .mx-back { display: inline-flex; }
  .mx-th-head { padding: 12px 14px 10px; }
  .mx-ttl { margin: 10px 14px 0; }
  .mx-msgs { padding: 12px 14px; }
  .mx-body, .mx-files { padding-left: 16px; }
  .mx-reply { padding: 10px 14px 14px; }
  .mx-new { padding: 16px 14px; }
  .mx-field { grid-template-columns: 1fr; gap: 4px; }
}
.m-legacy .mx { height: calc(100dvh - 200px); min-height: 420px; border-radius: var(--r-lg); }
.m-legacy .mx-page .page-head p { display: none; }
.admin-card-static { cursor: default; }
.admin-card-static:hover { transform: none; }
.admin-arch { display: block; margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--hairline); font-size: 13px !important; line-height: 20px !important; color: var(--ink) !important; }
.admin-arch small { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-muted); }
.admin-arch-err { display: block; margin-top: 4px; font-style: normal; color: var(--danger); }
.admin-arch-actions { display: flex; margin-top: 8px; }
.admin-arch-actions .btn { gap: 6px; }
.docs-hub-card:hover, .docs-hub-card:hover * { text-decoration: none; }

/* ---------- Login (foto da cidade, slogan e cartão em vidro) ---------- */
.lg { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 430px); grid-template-rows: auto 1fr auto; column-gap: clamp(32px, 6vw, 96px); padding: 30px clamp(24px, 4.5vw, 64px) 26px; color: #fff; background: #06080B; }
.lg-bg { position: absolute; inset: -3%; z-index: -3; overflow: hidden; }
.lg-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; opacity: 0; filter: saturate(1.08) contrast(1.04); transform-origin: 62% 30%; animation: lg-bgin 1.6s ease-out .05s forwards, lg-drift 32s ease-in-out 1.6s infinite alternate; }
@keyframes lg-bgin { from { opacity: 0; transform: scale(1.12); } to { opacity: .6; transform: scale(1.04); } }
@keyframes lg-drift { from { transform: scale(1.04); } to { transform: scale(1.13) translate3d(-1.4%, 1.2%, 0); } }
.lg-shade { position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(900px 520px at 88% 8%, rgba(77, 178, 236, .22), transparent 62%),
  linear-gradient(98deg, rgba(4, 6, 9, .92) 0%, rgba(4, 6, 9, .70) 34%, rgba(4, 6, 9, .22) 66%, rgba(4, 6, 9, .50) 100%),
  linear-gradient(0deg, rgba(4, 6, 9, .85) 0%, rgba(4, 6, 9, 0) 34%); }
.lg-beams { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.lg-beams span { position: absolute; top: -30%; left: 0; width: 1px; height: 160%; background: linear-gradient(180deg, transparent, rgba(77, 178, 236, .75) 45%, rgba(255, 255, 255, .9) 50%, rgba(77, 178, 236, .75) 55%, transparent); transform: translateX(-20vw) rotate(39deg); opacity: .55; animation: lg-beam 11s linear infinite; }
.lg-beams span:nth-child(2) { animation-delay: 3.6s; animation-duration: 13s; opacity: .35; }
.lg-beams span:nth-child(3) { animation-delay: 7.4s; animation-duration: 15s; opacity: .25; }
@keyframes lg-beam { from { transform: translateX(-25vw) rotate(39deg); } to { transform: translateX(125vw) rotate(39deg); } }
.lg-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; animation: lg-up .9s cubic-bezier(.2, .8, .2, 1) .1s both; }
.lg-logo { height: 21px; width: auto; opacity: .72; }
.lg-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .28); }
.lg-product { font-size: 11.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .66); }
.lg-hero { grid-column: 1; grid-row: 2; align-self: center; max-width: 680px; padding: 40px 0; }
.lg-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #9FD8FA; animation: lg-up .9s cubic-bezier(.2, .8, .2, 1) .25s both; }
.lg-eyebrow i { width: 34px; height: 1px; background: linear-gradient(90deg, #4DB2EC, rgba(77, 178, 236, 0)); }
.lg-slogan { margin: 22px 0 22px; font-family: var(--serif); font-weight: 400; font-size: clamp(50px, 6.4vw, 96px); line-height: 1; letter-spacing: -.012em; color: #fff; text-shadow: 0 4px 40px rgba(0, 0, 0, .35); animation: lg-up 1.1s cubic-bezier(.2, .8, .2, 1) .35s both; }
.lg-slogan em { font-style: italic; padding-right: .06em; background: linear-gradient(92deg, #BDE6FF 0%, #4DB2EC 45%, #FFFFFF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-sub { max-width: 520px; font-size: 17px; line-height: 27px; color: rgba(255, 255, 255, .76); animation: lg-up 1.1s cubic-bezier(.2, .8, .2, 1) .5s both; }
@keyframes lg-up { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.lg-card { grid-column: 2; grid-row: 2; align-self: center; position: relative; padding: 42px 36px 34px; border-radius: 26px; color: var(--ink); background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 34px 90px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .7); animation: lg-card 1s cubic-bezier(.2, .8, .2, 1) .3s both; }
[data-theme='dark'] .lg-card { background: rgba(13, 15, 20, .76); border-color: rgba(255, 255, 255, .09); box-shadow: 0 34px 90px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06); }
@keyframes lg-card { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }
.lg-card .login-form { max-width: none; }
.lg-card .login-form h1 { font-size: 27px; line-height: 33px; }
.lg-card .eyebrow { color: var(--sky-ink); }
.lg-theme { position: absolute; top: 14px; right: 14px; color: var(--ink-muted); }
.lg-theme:hover { color: var(--ink); }
.lg-submit { gap: 8px; }
.lg-submit .ic { transition: transform .2s ease; }
.lg-submit:hover .ic { transform: translateX(3px); }
.lg-foot { grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: rgba(255, 255, 255, .5); animation: lg-up .9s ease .6s both; }
@media (max-width: 980px) {
  .lg { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; padding: 22px 20px 20px; }
  .lg-hero { grid-column: 1; grid-row: 2; padding: 36px 0 26px; }
  .lg-slogan { font-size: clamp(40px, 11vw, 60px); margin: 16px 0 14px; }
  .lg-sub { font-size: 15px; line-height: 23px; }
  .lg-card { grid-column: 1; grid-row: 3; width: 100%; max-width: 460px; justify-self: center; padding: 34px 24px 26px; }
  .lg-foot { grid-row: 4; margin-top: 22px; justify-content: center; text-align: center; }
  .lg-bg img { object-position: 50% 20%; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-bg img { animation: none; opacity: .6; transform: scale(1.04); }
  .lg-beams { display: none; }
  .lg-top, .lg-eyebrow, .lg-slogan, .lg-sub, .lg-card, .lg-foot { animation: none; }
}

/* ---------- Entrada após o login: a tela se parte na diagonal ---------- */
.zs-split { position: fixed; inset: 0; z-index: 9000; pointer-events: none; overflow: hidden; }
.zs-split-piece { position: absolute; inset: 0; overflow: hidden; background: #06080B; will-change: transform, filter; }
.zs-split-piece > * { position: absolute !important; inset: 0; min-height: 100% !important; }
.zs-split-line { position: absolute; height: 2px; margin-top: -1px; transform-origin: 50% 50%; transform: scaleX(0); background: linear-gradient(90deg, transparent 0%, #4DB2EC 12%, #FFFFFF 50%, #4DB2EC 88%, transparent 100%); box-shadow: 0 0 16px 3px rgba(77, 178, 236, .8), 0 0 70px 14px rgba(77, 178, 236, .35); }
.zs-split-flash { position: absolute; inset: 0; opacity: 0; background: radial-gradient(70% 28% at 50% 50%, rgba(77, 178, 236, .28), transparent 70%); }
.zs-entering .topbar, .zs-entering #main, .zs-entering #dock-host, .zs-entering .m-stage, .zs-entering .m-tabbar { opacity: 0; }
.zs-enter .topbar { animation: zs-top .9s cubic-bezier(.2, .8, .2, 1) .12s both; }
.zs-enter #main, .zs-enter .m-stage { animation: zs-main 1.25s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 35%; }
.zs-enter #dock-host { animation: zs-dock .9s cubic-bezier(.2, .8, .2, 1) .45s both; }
.zs-enter .m-tabbar { animation: zs-tab .9s cubic-bezier(.2, .8, .2, 1) .35s both; }
.zs-enter .home-hero > *, .zs-enter .m-hero > * { animation: zs-rise .95s cubic-bezier(.2, .8, .2, 1) both; }
.zs-enter .home-hero > :nth-child(1), .zs-enter .m-hero > :nth-child(1) { animation-delay: .25s; }
.zs-enter .home-hero > :nth-child(2), .zs-enter .m-hero > :nth-child(2) { animation-delay: .35s; }
.zs-enter .home-hero > :nth-child(3), .zs-enter .m-hero > :nth-child(3) { animation-delay: .45s; }
.zs-enter .home-hero > :nth-child(4), .zs-enter .m-hero > :nth-child(4) { animation-delay: .55s; }
.zs-enter .home-hero > :nth-child(n+5), .zs-enter .m-hero > :nth-child(n+5) { animation-delay: .65s; }
@keyframes zs-top { from { opacity: 0; transform: translateY(-110%); } to { opacity: 1; transform: none; } }
@keyframes zs-main { 0% { opacity: 0; transform: scale(.93) translateY(26px); filter: blur(16px); } 55% { filter: blur(0); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes zs-dock { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes zs-tab { from { opacity: 0; transform: translateY(120%); } to { opacity: 1; transform: none; } }
@keyframes zs-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
/* Dentro da transição, a tela de login fica parada exatamente como estava (sem reiniciar as animações dela). */
.zs-split-piece *, .zs-split-piece *::before, .zs-split-piece *::after { animation: none !important; transition: none !important; }
.zs-split-piece .lg-bg img { opacity: .6; transform: scale(1.04); }
.zs-split-piece .m-login-photo img { opacity: 1; }
.zs-split-piece .lg-beams { display: none; }

/* ---------- Dashboards ---------- */
.db-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.db-period span { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; }
.db-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(34, 160, 107, .5); animation: db-pulse 2.4s ease-out infinite; }
@keyframes db-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 160, 107, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 160, 107, 0); } }
.db-note { display: flex; align-items: flex-start; gap: 8px; margin: -2px 0 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--warning-tint); color: var(--ink); font-size: 13px; line-height: 19px; }
.db-note .ic { flex: none; margin-top: 2px; color: var(--warning); }
.db-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row; align-items: stretch; gap: 14px; }
.db-panel { grid-column: span 12; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 16px 18px 18px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.db-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.db-head > div:first-child { min-width: 0; flex: 1 1 200px; }
.db-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -.005em; }
.db-head h2 .ic { color: var(--ink-muted); flex: none; }
.db-head p { margin: 2px 0 0; font-size: 12.5px; line-height: 18px; color: var(--ink-muted); }
.db-head-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.db-head-note { font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.db-seg { display: inline-flex; padding: 2px; border: 1px solid var(--hairline); border-radius: 9px; background: var(--surface); }
.db-seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-muted); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.db-seg button:hover { color: var(--ink); }
.db-seg button.on { background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow-sm); }
.db-select { height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--hairline); border-radius: 9px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A9099' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; color: var(--ink); font: inherit; font-size: 12.5px; appearance: none; cursor: pointer; }
.db-empty { flex: 1 1 auto; display: grid; place-items: center; min-height: 120px; padding: 16px; border: 1px dashed var(--hairline); border-radius: var(--r-md); color: var(--ink-muted); font-size: 13px; text-align: center; }
.db-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: var(--surface); color: var(--ink-muted); font-size: 11px; font-weight: 500; line-height: 18px; vertical-align: 1px; }

/* Indicadores */
.db-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--hairline); }
.db-kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 118px; padding: 14px 16px; background: var(--surface-2); }
.db-kpi-l { font-size: 12.5px; font-weight: 500; color: var(--ink-muted); }
.db-kpi-v { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-kpi-s { margin-top: auto; font-size: 12px; line-height: 17px; color: var(--ink-muted); }
.db-kpi-split { margin: 2px 0 2px; }
.db-delta { display: inline-block; font-weight: 600; }
.db-delta.up { color: var(--success); }
.db-delta.down { color: var(--danger); }
.db-delta.flat { color: var(--ink-muted); font-weight: 500; }

/* Barras horizontais */
.db-bars { display: flex; flex-direction: column; gap: 2px; }
.db-bar { display: grid; grid-template-columns: minmax(0, min(40%, 240px)) minmax(0, 1fr) 84px; align-items: center; gap: 12px; min-height: 34px; padding: 3px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.db-bar.static, .db-bar:disabled { cursor: default; }
.db-bar:not(.static):not(:disabled):hover, .db-bar.on { background: var(--surface); }
.db-bar.on { box-shadow: inset 2px 0 0 var(--accent); }
.db-bar-l { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-bar-t { height: 10px; border-radius: 0 5px 5px 0; background: var(--surface); overflow: hidden; }
.db-bar:hover .db-bar-t, .db-bar.on .db-bar-t { background: var(--hairline); }
.db-bar-t i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--sky); }
.db-bar-v { display: flex; flex-direction: column; align-items: flex-end; line-height: 15px; font-variant-numeric: tabular-nums; }
.db-bar-v b { font-size: 13px; font-weight: 600; }
.db-bar-v small { font-size: 11px; color: var(--ink-muted); }
.db-bar-leg { grid-template-columns: minmax(0, 1fr) 70px 84px; }
.db-dot { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.db-stack { height: 12px; }
.db-mini3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hairline); }
.db-mini3.top { margin-top: 0; padding-top: 0; border-top: 0; }
.db-mini3 div { display: flex; flex-direction: column; min-width: 0; }
.db-mini3 b { font-size: 20px; line-height: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-mini3 span { font-size: 12px; color: var(--ink-muted); }
.db-mini3 small { font-size: 11.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.db-sub-h { margin-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-muted); }

/* Ranking */
.db-rank { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.db-rank-row { display: grid; grid-template-columns: 24px minmax(0, min(38%, 230px)) minmax(0, 1fr) 84px; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 3px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.db-rank-row:hover, .db-rank-row.on { background: var(--surface); }
.db-rank-row.on { box-shadow: inset 2px 0 0 var(--accent); }
.db-rank-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface); color: var(--ink-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-rank li:nth-child(-n+3) .db-rank-n { background: var(--ink); color: var(--bg); }
.db-rank-name { min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-rank-name b { font-weight: 500; }
.db-rank-track { height: 10px; border-radius: 0 5px 5px 0; background: var(--surface); overflow: hidden; }
.db-rank-row:hover .db-rank-track, .db-rank-row.on .db-rank-track { background: var(--hairline); }
.db-rank-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--sky); }
.db-rank-v { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Evolução mensal */
.db-cols { position: relative; height: 230px; padding-left: 52px; }
.db-cols-grid { position: absolute; inset: 0 0 24px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.db-cols-grid div { position: relative; height: 0; border-top: 1px solid var(--hairline); margin-left: 52px; }
.db-cols-grid div:last-child { border-top-color: var(--border); }
.db-cols-grid span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11px; line-height: 16px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-cols-plot { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; height: 100%; }
.db-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: calc(100% - 24px); border-radius: 6px; outline: none; cursor: default; }
.db-col:hover, .db-col:focus-visible { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.db-col:focus-visible { box-shadow: var(--focus); }
.db-col-bar { display: flex; flex-direction: column; width: min(70%, 34px); margin: 0 auto; gap: 2px; min-height: 0; }
.db-col-bar i { display: block; min-height: 2px; }
.db-col-bar i:first-child { border-radius: 4px 4px 0 0; }
.db-col-x { position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
.db-legend { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.db-leg { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.db-leg:hover { background: var(--surface); }
.db-leg.on { border-color: var(--ink); }
.db-leg.static { cursor: default; padding: 0 6px; }
.db-leg.static:hover { background: transparent; }
.db-leg i { width: 10px; height: 10px; border-radius: 3px; }
.db-leg b { margin-left: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Renovações */
.db-list { display: flex; flex-direction: column; }
.db-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--hairline); }
.db-list-row > div { display: flex; flex-direction: column; min-width: 0; }
.db-list-row b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-list-row small { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-list-r { align-items: flex-end; flex: none; text-align: right; }
.db-list-r b { font-variant-numeric: tabular-nums; }
.db-list-row.soon .db-list-r small { color: var(--warning); font-weight: 600; }

/* Tabela por franqueado */
.db-table-wrap { overflow: auto; max-height: 560px; border: 1px solid var(--hairline); border-radius: var(--r-md); }
.db-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.db-table th { position: sticky; top: 0; z-index: 1; padding: 0; border-bottom: 1px solid var(--border); background: var(--surface); text-align: left; }
.db-table th button { display: inline-flex; align-items: center; gap: 4px; width: 100%; min-height: 44px; padding: 6px 12px; border: 0; background: transparent; color: var(--ink-muted); font: inherit; font-size: 12px; font-weight: 600; line-height: 15px; text-align: left; cursor: pointer; }
.db-table th.num button { justify-content: flex-end; text-align: right; }
.db-table th.sorted button { color: var(--ink); }
.db-table td { padding: 9px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.db-table tbody tr { cursor: pointer; }
.db-table tbody tr:hover { background: var(--surface); }
.db-table tbody tr.on { background: var(--sky-tint); }
.db-table tbody tr:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.db-t-name { min-width: 200px; }
.db-t-name b { display: block; font-weight: 500; }
.db-t-name small { font-size: 11.5px; color: var(--ink-muted); }
.db-t-name small.db-tag { margin-left: 0; margin-top: 2px; }
.db-t-num { text-align: right; font-variant-numeric: tabular-nums; }
.db-table tfoot td { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 0; font-weight: 700; }

/* Dica flutuante */
.db-tip { position: fixed; z-index: 90; max-width: 300px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--elevated); box-shadow: var(--shadow-md); color: var(--ink); font-size: 12.5px; line-height: 18px; pointer-events: none; }
.db-tip strong { display: block; font-weight: 600; }
.db-tip > span { display: block; color: var(--ink-muted); font-size: 12px; }
.db-tip dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 6px 0 0; }
.db-tip dt { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); }
.db-tip dt i { width: 8px; height: 8px; border-radius: 2px; }
.db-tip dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-tip .db-tip-total { padding-top: 4px; border-top: 1px solid var(--hairline); color: var(--ink); }
.db-tip em { display: block; margin-top: 6px; color: var(--ink-muted); font-style: normal; font-size: 11.5px; }

/* Período e busca nos filtros */
.db-period-pop { width: 320px; padding: 6px; }
.db-period-list { display: flex; flex-direction: column; }
.db-period-list button { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.db-period-list button:hover { background: var(--surface); }
.db-period-list button.on { font-weight: 600; }
.db-period-custom { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding: 10px 10px 4px; border-top: 1px solid var(--hairline); }
.db-period-custom strong { font-size: 13px; }
.db-period-custom > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.db-period-custom label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-muted); }
.db-period-custom .input { height: 38px; padding: 0 8px; font-size: 13px; }
.db-period-custom .btn { align-self: flex-end; }
.db-period-hint { margin: 8px 10px 4px; font-size: 11.5px; line-height: 16px; color: var(--ink-muted); }
.db-pop-search { display: flex; align-items: center; gap: 6px; margin: 2px 2px 6px; padding: 0 10px; height: 36px; border: 1px solid var(--hairline); border-radius: 8px; color: var(--ink-muted); }
.db-pop-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; }
.db-help p { margin: 0 0 10px; font-size: 14px; line-height: 21px; }
.db-help p:last-child { margin-bottom: 0; }

@media (max-width: 1180px) {
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .db-grid { gap: 12px; }
  .db-panel { padding: 14px; }
  .db-live { margin-left: 0; width: 100%; }
  .db-kpi { min-height: 104px; padding: 12px; }
  .db-kpi-v { font-size: 24px; line-height: 30px; }
  .db-bar { grid-template-columns: minmax(0, 42%) minmax(0, 1fr) 72px; gap: 8px; }

  .db-cols { padding-left: 44px; height: 210px; }
  .db-cols-grid div { margin-left: 44px; }
  .db-cols-plot { gap: 3px; }
  .db-col-x { font-size: 10px; }
  .db-cols.dense .db-col:nth-child(even) .db-col-x { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .db-live i { animation: none; } }
.bc-split .n { background: repeating-linear-gradient(135deg, var(--border-strong) 0 2px, transparent 2px 5px); }

/* Dashboards: quadros da mesma linha têm a mesma altura e o conteúdo ocupa o quadro inteiro (sem vãos) */
.db-panel > .db-bars, .db-panel > .db-list, .db-rank-col > .db-rank { flex: 1 1 auto; justify-content: space-around; }
.db-panel > .db-bars > .db-bar { flex: 1 1 auto; max-height: 76px; }
.db-rank-col > .db-rank > li { flex: 1 1 auto; max-height: 64px; }
/* a barra engrossa junto com a linha (como nos painéis de BI), sem passar de 20px */
.db-panel > .db-bars > .db-bar:not(.db-biz) .db-bar-t, .db-rank-track { height: clamp(10px, 34%, 20px); }
.db-panel > .db-bars > .db-bar { min-height: 34px; }
.db-rank > li { display: flex; min-height: 38px; }
.db-rank > li > .db-rank-row { flex: 1; }
.db-panel > .db-list > .db-list-row { flex: 1 1 auto; max-height: 84px; }
.db-panel > .db-cols { flex: 1 1 auto; height: auto; min-height: 230px; }
.db-panel > .db-mini3:not(.top) { margin-top: 0; }
/* Ranking: resumo + mais e menos produtivos lado a lado */
.db-select-l { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-muted); }
.db-rank-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--hairline); }
.db-rank-sum > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 14px; background: var(--surface-2); }
.db-rank-sum span { font-size: 12px; color: var(--ink-muted); }
.db-rank-sum b { font-size: 20px; line-height: 26px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-rank-sum small { font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-rank-cols { flex: 1 1 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; align-items: stretch; }
.db-rank-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.db-rank-col + .db-rank-col { padding-left: 28px; margin-left: -1px; border-left: 1px solid var(--hairline); }
.db-rank-h { display: flex; align-items: baseline; gap: 8px; padding: 0 6px 6px; border-bottom: 1px solid var(--hairline); }
.db-rank-h b { font-size: 13.5px; font-weight: 600; }
.db-rank-h small { margin-left: auto; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.db-rank-ico { font-size: 10px; color: var(--ink-muted); }
.db-rank-row { grid-template-columns: 34px minmax(0, min(40%, 240px)) minmax(0, 1fr) 92px; }
.db-rank-n { width: 34px; font-size: 11.5px; }
.db-rank li:nth-child(-n+3) .db-rank-n { background: var(--surface); color: var(--ink-muted); }
.db-rank-col.top li:nth-child(-n+3) .db-rank-n { background: var(--ink); color: var(--bg); }
.db-rank-v { display: flex; flex-direction: column; align-items: flex-end; line-height: 15px; }
.db-rank-v b { font-size: 13px; font-weight: 600; }
.db-rank-v small { font-size: 11px; font-weight: 400; color: var(--ink-muted); }
@media (max-width: 900px) {
  .db-rank-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-rank-cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .db-rank-col + .db-rank-col { padding-left: 0; margin-left: 0; border-left: 0; }
}
@media (max-width: 760px) { .db-rank-row { grid-template-columns: 30px minmax(0, 40%) minmax(0, 1fr) 76px; gap: 8px; } .db-rank-n { width: 30px; } }
/* Tipo de negócio: uma faixa por tipo, com participação e resultado */
.db-biz { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 6px; padding: 8px; }
.db-biz-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.db-biz-top .db-bar-l { flex: 1; font-weight: 500; }
.db-biz-top b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-biz-top small { width: 36px; font-size: 12px; color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; }
.db-biz .db-bar-t { height: 8px; }
.db-biz-meta { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-panel > .db-bars > .db-bar.db-biz { max-height: 124px; }

/* ---------- Gestão (financeiro do franqueado) ---------- */
.gs-unit-l { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); }
.gs-unit-l .input { min-width: 260px; height: 40px; }
.gs-ro { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; padding: 10px 12px; border-radius: var(--r-md); background: var(--sky-tint); color: var(--sky-ink); font-size: 13px; }
.gs-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.gs-tab { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.gs-tab:hover { border-color: var(--border-strong); }
.gs-tab small { font-size: 12px; line-height: 16px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gs-tab span { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.gs-tab span .ic { color: var(--ink-muted); }
.gs-tab.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.gs-tab.on span .ic { color: var(--ink); }
.gs-tab-badge { position: absolute; top: 10px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.gs-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.gs-month { display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 6px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
.gs-month strong { min-width: 150px; text-align: center; font-size: 14px; font-weight: 600; }
.gs-month .link-btn { margin: 0 6px; font-size: 12.5px; }
.gs-acts { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.gs-act { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.gs-act > small { font-size: 11.5px; line-height: 15px; color: var(--ink-muted); white-space: nowrap; }
.gs-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.gs-alert { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 1px solid var(--hairline); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.gs-alert.red { border-left-color: var(--danger); }
.gs-alert.amber { border-left-color: #F5A524; }
.gs-alert span { flex: 1; }
.gs-alert em { font-style: normal; font-weight: 600; color: var(--sky-ink); }
.gs-alert:hover { background: var(--surface); }
.gs-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--hairline); }
.gs-kpi { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 14px 16px; background: var(--surface-2); }
.gs-kpi > span { font-size: 12.5px; color: var(--ink-muted); }
.gs-kpi > strong { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-kpi > small { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.gs-kpi.pos > strong { color: var(--success); }
.gs-kpi.neg > strong { color: var(--danger); }
.gs-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.gs-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.gs-cols > .gs-card { margin-bottom: 0; }
.gs-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gs-card > header > div:first-child { min-width: 0; }
.gs-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.gs-card h2 .ic { color: var(--ink-muted); }
.gs-card header p { flex-basis: 100%; margin: -8px 0 0; font-size: 12.5px; line-height: 18px; color: var(--ink-muted); }
.gs-count { min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 11px; background: var(--danger); color: #fff; font-size: 12px; }
.gs-empty { display: grid; place-items: center; flex: 1; min-height: 110px; padding: 16px; border: 1px dashed var(--hairline); border-radius: var(--r-md); color: var(--ink-muted); font-size: 13px; text-align: center; }
.gs-note { display: block; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); color: var(--ink-muted); font-size: 12.5px; line-height: 18px; }
.gs-note .ic { vertical-align: -2px; }
.gs-card .gs-note { margin: 0; }
.gs-muted { color: var(--ink-muted); }
.gs-red { color: var(--danger) !important; }
.gs-amber { color: var(--warning) !important; }
.gs-green { color: var(--success); }
/* Gráfico 6 meses */
.gs-bars6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; flex: 1; min-height: 200px; }
.gs-b6 { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.gs-b6-plot { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; min-height: 140px; border-bottom: 1px solid var(--border); }
.gs-b6-plot i { display: block; width: min(34%, 22px); min-height: 1px; border-radius: 4px 4px 0 0; }
.gs-b6-plot i.in, .gs-legend i.in { background: var(--sky); }
.gs-b6-plot i.out, .gs-legend i.out { background: var(--ink); }
.gs-b6 small { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gs-b6 span { font-size: 11.5px; color: var(--ink-muted); }
.gs-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; }
.gs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gs-legend i { width: 10px; height: 10px; border-radius: 3px; }
.gs-nat { display: flex; flex-direction: column; gap: 8px; }
.gs-nat-row { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto 44px; align-items: center; gap: 10px; font-size: 13px; }
.gs-nat-row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-nat-t { height: 10px; border-radius: 0 5px 5px 0; background: var(--surface); overflow: hidden; }
.gs-nat-t i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--ink); }
.gs-nat-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.gs-nat-row small { color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; }
/* Listas */
.gs-list { display: flex; flex-direction: column; }
.gs-li { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-top: 1px solid var(--hairline); background: transparent; color: var(--ink); font: inherit; text-align: left; }
button.gs-li { cursor: pointer; }
button.gs-li:hover { background: var(--surface); }
.gs-li:first-child { border-top: 0; }
.gs-li > div { display: flex; flex-direction: column; min-width: 0; }
.gs-li b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-li small { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-li-r { align-items: flex-end; flex: none; text-align: right; }
.gs-li-r b { font-variant-numeric: tabular-nums; }
.gs-li-r .link-btn { font-size: 12.5px; }
/* Envio de arquivos */
.gs-uploads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.gs-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 18px 18px; border: 1.5px dashed var(--border); border-radius: var(--r-lg); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; outline: none; }
.gs-drop:hover, .gs-drop:focus-visible, .gs-drop.over { border-color: var(--accent); background: var(--sky-tint); }
.gs-drop-hint { position: absolute; top: 10px; left: 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-muted); }
.gs-drop-ic { display: grid; place-items: center; width: 44px; height: 44px; margin-top: 6px; border-radius: 12px; background: var(--surface); color: var(--ink); }
.gs-drop.rec .gs-drop-ic { background: var(--sky-tint); color: var(--sky-ink); }
.gs-drop strong { font-size: 15px; }
.gs-drop > span:not(.gs-drop-ic) { max-width: 420px; font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.gs-drop em { font-style: normal; font-size: 11.5px; color: var(--ink-muted); }
.gs-queue ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.gs-q { display: flex; flex-direction: column; gap: 4px; padding: 10px 2px; border-top: 1px solid var(--hairline); }
.gs-q:first-child { border-top: 0; }
.gs-q-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gs-q-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.gs-q-name b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.gs-q-name small { color: var(--ink-muted); }
.gs-q-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.gs-q.ok .gs-q-st { color: var(--success); }
.gs-q.warn .gs-q-st { color: var(--warning); }
.gs-q.err .gs-q-st { color: var(--danger); }
.gs-q.busy .gs-q-st .ic { animation: gs-spin 1.2s linear infinite; }
@keyframes gs-spin { to { transform: rotate(360deg); } }
.gs-q-info { font-size: 12.5px; color: var(--ink-muted); padding-left: 23px; }
.gs-q-act { display: flex; gap: 8px; padding-left: 23px; }
/* Confirmação da IA */
.gs-review { border-color: color-mix(in srgb, #F5A524 55%, var(--hairline)); }
.gs-review-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.gs-rv { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface); }
.gs-rv-q { display: flex; gap: 8px; align-items: flex-start; }
.gs-rv-q .ic { flex: none; margin-top: 2px; color: var(--warning); }
.gs-rv-q p { margin: 0; font-size: 13.5px; line-height: 19px; font-weight: 500; }
.gs-rv-e { display: flex; flex-direction: column; gap: 2px; position: relative; padding-right: 36px; }
.gs-rv-e b { font-size: 13px; font-weight: 600; }
.gs-rv-e span { font-size: 12px; color: var(--ink-muted); }
.gs-rv-e .icon-btn { position: absolute; top: -4px; right: 0; }
.gs-rv-a { display: flex; flex-direction: column; gap: 8px; }
.gs-rv-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-opt { height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.gs-opt:hover { border-color: var(--ink); }
.gs-rv-sel { height: 36px; font-size: 13px; }
.gs-rv-date { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-muted); }
.gs-rv-date .input { height: 36px; }
/* Tabelas */
.gs-table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--r-md); }
.gs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gs-table th { padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.gs-table td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.gs-table tbody tr:last-child td { border-bottom: 0; }
.gs-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-table td.neg, .gs-val.neg { color: var(--danger); }
.gs-val.pos { color: var(--success); }
.gs-val { font-weight: 600; }
.gs-table tr.strong td { font-weight: 600; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.gs-table tr.final td { font-weight: 700; border-top: 1px solid var(--border); }
.gs-table tr.muted td { color: var(--ink-muted); }
.gs-table tr.clickable { cursor: pointer; }
.gs-table tr.clickable:hover td { background: var(--surface); }
.gs-table tr.on td { background: var(--sky-tint); }
.gs-moves tr.rv td { background: color-mix(in srgb, var(--warning-tint) 70%, transparent); }
.gs-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-date small { display: block; font-size: 11px; color: var(--ink-muted); }
.gs-desc { min-width: 220px; }
.gs-desc b { display: block; font-weight: 500; }
.gs-desc small { display: block; font-size: 12px; color: var(--ink-muted); }
.gs-tags { display: flex; gap: 4px; margin-top: 4px; }
.gs-origin { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px; border-radius: 6px; background: var(--surface); color: var(--ink-muted); font-size: 11px; font-weight: 600; }
.gs-origin.ia { background: var(--sky-tint); color: var(--sky-ink); }
.gs-origin.warn { background: var(--warning-tint); color: var(--warning); }
.gs-cat-sel { max-width: 210px; height: 32px; padding: 0 26px 0 8px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A9099' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center; color: var(--ink); font: inherit; font-size: 12.5px; appearance: none; cursor: pointer; }
.gs-cat-sel.warn, .gs-cat.warn { border-color: #F5A524; color: var(--warning); font-weight: 600; }
.gs-cat { font-size: 12.5px; }
.gs-st { white-space: nowrap; }
.gs-st .link-btn { display: block; margin-top: 4px; font-size: 12px; }
.gs-row-act { white-space: nowrap; text-align: right; }
.gs-seg button { height: 32px; padding: 0 12px; font-size: 12.5px; }
.gs-tools { display: flex; align-items: center; gap: 10px; }
.gs-tools .search-mini { min-width: 240px; }
.gs-pay-pop { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.gs-pay-pop label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-muted); }
.gs-cf6 td:first-child { white-space: nowrap; }
/* DRE */
.gs-dre-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.gs-est .gs-empty { flex: none; }
.gs-dre-grid.year { grid-template-columns: minmax(0, 1fr); }
.gs-dre-grid > .gs-card { margin-bottom: 0; }
.gs-dre td:first-child { white-space: nowrap; }
.gs-dre.year td, .gs-dre.year th { padding: 9px 10px; font-size: 12.5px; }
.gs-dre.year td:first-child { position: sticky; left: 0; background: var(--surface-2); z-index: 1; }
.gs-dre-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin-top: auto; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--hairline); }
.gs-est-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--hairline); }
.gs-est-sum .gs-kpi > strong, .gs-dre-foot .gs-kpi > strong { font-size: 17px; line-height: 22px; }
/* Documentos */
.gs-doc-intro { display: flex; flex-direction: column; gap: 2px; max-width: 640px; }
.gs-doc-intro strong { font-size: 15px; }
.gs-doc-intro span { font-size: 13px; color: var(--ink-muted); }
.gs-docfilters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.gs-doc-q { flex: 1 1 320px; max-width: 520px; }
.gs-doc-kind { width: auto; min-width: 240px; height: 44px; }
.gs-stchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.gs-stchip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 17px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.gs-stchip b { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); font-size: 11.5px; }
.gs-stchip.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.gs-docs { display: flex; flex-direction: column; gap: 10px; }
.gs-doc { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr) 340px; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--hairline); border-left: 3px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
.gs-doc.st-vencido { border-left-color: var(--danger); }
.gs-doc.st-vencendo { border-left-color: #F5A524; }
.gs-doc.st-vigente { border-left-color: #22A06B; }
.gs-doc.st-encerrado { opacity: .72; }
.gs-doc-top { display: flex; align-items: center; gap: 8px; }
.gs-doc-top small { font-size: 12px; color: var(--ink-muted); }
.gs-doc h3 { margin: 6px 0 2px; font-size: 15px; line-height: 20px; font-weight: 600; }
.gs-doc p { margin: 0; font-size: 12.5px; color: var(--ink-muted); }
.gs-doc-dates { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.gs-doc-dates small { color: var(--ink-muted); }
.gs-doc-files { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; font-size: 12.5px; }
.gs-file-btn { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 28px; padding: 0 10px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.gs-file-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.gs-file-btn:hover { border-color: var(--border-strong); }
.gs-doc-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
/* Formulários */
.gs-form { display: flex; flex-direction: column; gap: 14px; }
.gs-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gs-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gs-fhint { font-size: 11.5px; line-height: 16px; color: var(--ink-muted); }
.gs-lead { margin: 0; font-size: 13.5px; line-height: 20px; color: var(--ink-muted); }
.gs-type { align-self: flex-start; }
.gs-attach { display: flex; align-items: center; gap: 10px; }
.gs-file { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.gs-files { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.gs-files li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.gs-add-file { align-self: flex-start; }
.gs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gs-chip { position: relative; }
.gs-chip input { position: absolute; opacity: 0; pointer-events: none; }
.gs-chip span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--border); border-radius: 17px; font-size: 13px; font-weight: 500; cursor: pointer; }
.gs-chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.gs-chip input:focus-visible + span { box-shadow: var(--focus); }
.gs-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.gs-form-foot > div { display: flex; gap: 8px; }
.gs-danger { color: var(--danger); }
.gs-field[hidden] { display: none; }

@media (max-width: 1180px) {
  .gs-doc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gs-doc-act { grid-column: 1 / -1; justify-content: flex-start; }
  .gs-dre-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .gs-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-cols, .gs-uploads { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .gs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-kpi > strong { font-size: 18px; line-height: 24px; }
  .gs-acts { margin-left: 0; width: 100%; }
  .gs-act { flex: 1 1 140px; }
  .gs-act > small { white-space: normal; }
  .gs-doc { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gs-grid2, .gs-grid3 { grid-template-columns: minmax(0, 1fr); }
  .gs-unit-l { width: 100%; }
  .gs-unit-l .input { min-width: 0; flex: 1; }
  .gs-tab small { white-space: normal; }
  .gs-month { width: 100%; justify-content: space-between; }
  .gs-tools { width: 100%; }
  .gs-tools .search-mini { min-width: 0; flex: 1; }
  .gs-est-sum, .gs-dre-foot { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .gs-q.busy .gs-q-st .ic { animation: none; } }
/* Aba "Prazos" (lateral direita) */
.dl-tab { position: fixed; right: 0; top: 46%; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 9px; border: 1px solid var(--hairline); border-right: 0; border-radius: 12px 0 0 12px; background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow-md); font: inherit; cursor: pointer; transition: padding .15s; }
.dl-tab:hover, .dl-tab.on { padding-right: 13px; }
.dl-tab > .ic { color: var(--warning); }
.dl-tab span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.dl-tab b { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; background: var(--danger); color: #fff; font-size: 11.5px; }
.dl-scrim { position: fixed; inset: 0; z-index: 61; background: rgba(10, 10, 11, .18); }
.dl-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 62; display: flex; flex-direction: column; width: min(380px, 100vw); border-left: 1px solid var(--hairline); background: var(--elevated); box-shadow: var(--shadow-lg); animation: dl-in .22s ease-out; }
@keyframes dl-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.dl-drawer header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 18px 12px; border-bottom: 1px solid var(--hairline); }
.dl-drawer header div { display: flex; flex-direction: column; }
.dl-drawer header strong { font-size: 17px; }
.dl-drawer header small { font-size: 12.5px; color: var(--ink-muted); }
.dl-drawer ul { flex: 1; overflow-y: auto; margin: 0; padding: 8px 12px; list-style: none; }
.dl-drawer li { display: flex; flex-direction: column; gap: 3px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--hairline); border-left: 3px solid #F5A524; border-radius: var(--r-md); background: var(--surface-2); }
.dl-drawer li.late { border-left-color: var(--danger); }
.dl-when { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--warning); }
.dl-drawer li.late .dl-when { color: var(--danger); }
.dl-when small { font-weight: 500; color: var(--ink-muted); }
.dl-drawer li b { font-size: 14px; font-weight: 600; }
.dl-drawer li > small { font-size: 12px; color: var(--ink-muted); }
.dl-act { display: flex; gap: 6px; margin-top: 6px; }
.dl-drawer footer { padding: 12px 18px 18px; border-top: 1px solid var(--hairline); font-size: 12px; line-height: 17px; color: var(--ink-muted); }
.dl-host.mobile .dl-tab { top: auto; bottom: calc(110px + env(safe-area-inset-bottom)); padding: 12px 7px; }
@media (prefers-reduced-motion: reduce) { .dl-drawer { animation: none; } }
@media (max-width: 760px) {
  .gs-b6 small { font-size: 10px; }
  .gs-nat-row { grid-template-columns: minmax(0, 1fr) auto 40px; row-gap: 4px; }
  .gs-nat-row > span:first-child { grid-column: 1 / -1; }
  .dl-host.mobile .dl-tab { padding: 10px 6px; gap: 6px; }
  .dl-host.mobile .dl-tab span { display: none; }
}
.gs-opt.on { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.gs-rv-pay { display: flex; flex-direction: column; gap: 6px; }
.gs-rv-pay label { display: grid; grid-template-columns: 18px minmax(0, 1fr) 150px; align-items: center; gap: 8px; font-size: 13px; }
.gs-rv-pay .input { height: 34px; font-size: 13px; }
.gs-rv-ok { align-self: flex-start; }
.dl-drawer li.soon .dl-when { color: var(--danger); }
/* Gestão: aviso do lançamento salvo, destaque e ferramentas da lista */
.gs-saved { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--success) 40%, var(--hairline)); border-radius: var(--r-md); background: var(--success-tint); font-size: 13.5px; line-height: 19px; }
.gs-saved > .ic { flex: none; color: var(--success); }
.gs-saved span { flex: 1; min-width: 0; }
.gs-saved small { color: var(--ink-muted); font-size: 12.5px; }
.gs-saved.away { border-color: color-mix(in srgb, #F5A524 50%, var(--hairline)); background: var(--warning-tint); }
.gs-saved.away > .ic { color: var(--warning); }
.gs-table tr.flash td { animation: gs-flash 2.4s ease-out 2; }
@keyframes gs-flash { 0%, 40% { background: color-mix(in srgb, var(--accent) 22%, transparent); } 100% { background: transparent; } }
.gs-moves-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gs-moves-q { min-width: 240px; flex: 1 1 240px; }
.gs-count.muted { background: var(--surface); color: var(--ink-muted); }
.gs-pend { border-style: dashed; }
@media (prefers-reduced-motion: reduce) { .gs-table tr.flash td { animation: none; background: var(--sky-tint); } }

/* ---------- Apolo (assistente de seguros) ---------- */
.ap-host { position: fixed; right: 22px; bottom: 22px; z-index: 70; }
.ap-fab { position: relative; display: grid; place-items: center; width: 66px; height: 66px; padding: 0; border: 1px solid var(--hairline); border-radius: 50%; background: var(--surface-2); box-shadow: var(--shadow-md); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.ap-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: var(--shadow-lg); }
.ap-fab:focus-visible { outline: none; box-shadow: var(--focus), var(--shadow-md); }
.ap-fab.on { background: var(--sky-tint); border-color: var(--accent); }
.ap-char { display: block; overflow: visible; }
.ap-char.float { animation: ap-float 3.6s ease-in-out infinite; }
.ap-char .ap-umb { transform-origin: 39px 19px; animation: ap-sway 4.8s ease-in-out infinite; }
.ap-char .ap-eyes { transform-origin: 32px 32px; animation: ap-blink 5.5s infinite; }
.ap-char.think .ap-pupil { animation: ap-look 1.6s ease-in-out infinite; }
@keyframes ap-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2.5px) rotate(-1.5deg); } }
@keyframes ap-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-7deg); } }
@keyframes ap-blink { 0%, 93%, 100% { transform: scaleY(1); } 95%, 97% { transform: scaleY(.12); } }
@keyframes ap-look { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.4px); } }
.ap-hint { position: absolute; right: 74px; bottom: 12px; display: flex; align-items: center; gap: 6px; width: max-content; max-width: 240px; padding: 8px 6px 8px 12px; border: 1px solid var(--hairline); border-radius: 12px 12px 4px 12px; background: var(--elevated); box-shadow: var(--shadow-md); font-size: 12.5px; line-height: 17px; animation: ap-in .35s ease-out .8s both; }
.ap-hint .icon-btn { width: 24px; height: 24px; }
@keyframes ap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ap-panel { position: absolute; right: 0; bottom: 80px; display: flex; flex-direction: column; width: min(392px, calc(100vw - 32px)); height: min(620px, calc(100vh - 130px)); overflow: hidden; border: 1px solid var(--hairline); border-radius: 18px; background: var(--elevated); box-shadow: var(--shadow-lg); animation: ap-in .22s ease-out; }
.ap-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 10px 14px; border-bottom: 1px solid var(--hairline); }
.ap-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ap-head strong { font-size: 15.5px; }
.ap-head small { font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-disc { display: flex; gap: 6px; align-items: flex-start; padding: 7px 14px; background: var(--surface); color: var(--ink-muted); font-size: 11.5px; line-height: 16px; }
.ap-disc .ic { flex: none; margin-top: 1px; }
.ap-body { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.ap-msg { display: flex; gap: 8px; align-items: flex-start; }
.ap-msg.me { justify-content: flex-end; }
.ap-msg .ap-char.mini { flex: none; margin-top: 2px; }
.ap-b { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 19.5px; }
.ap-msg.me .ap-b { border-bottom-right-radius: 4px; background: var(--ink); color: var(--bg); white-space: pre-wrap; }
.ap-msg.bot .ap-b { border-top-left-radius: 4px; background: var(--surface); color: var(--ink); }
.ap-msg.err .ap-b { margin-left: 34px; background: var(--danger-tint); color: var(--danger); }
.ap-text p { margin: 0 0 8px; } .ap-text p:last-child { margin-bottom: 0; }
.ap-text ul { margin: 4px 0 8px; padding-left: 18px; } .ap-text li { margin-bottom: 3px; }
.ap-tag { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.ap-tag.ok { background: var(--success-tint); color: var(--success); }
.ap-tag.warn { background: var(--warning-tint); color: var(--warning); }
.ap-tag.muted { background: var(--surface-2); color: var(--ink-muted); }
.ap-note { display: flex; gap: 6px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--warning-tint); color: var(--ink); font-size: 12.5px; line-height: 17px; }
.ap-note .ic { flex: none; margin-top: 1px; color: var(--warning); }
.ap-src { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.ap-src > small { font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-muted); }
.ap-src details { border-radius: 8px; background: var(--surface-2); }
.ap-src summary { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 12.5px; font-weight: 500; cursor: pointer; list-style: none; }
.ap-src summary::-webkit-details-marker { display: none; }
.ap-src summary em { margin-left: auto; padding: 0 6px; border-radius: 6px; background: var(--danger-tint); color: var(--danger); font-size: 10.5px; font-style: normal; font-weight: 700; }
.ap-src-body { padding: 0 10px 8px; font-size: 12px; line-height: 17px; color: var(--ink-muted); }
.ap-src-body p { margin: 4px 0; color: var(--ink); }
.ap-src-body .ap-rev { color: var(--danger); font-weight: 600; }
.ap-link { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); color: var(--ink); font-size: 12.5px; font-weight: 500; text-decoration: none; min-width: 0; }
.ap-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-link .ic { flex: none; color: var(--ink-muted); }
.ap-link:hover { background: var(--hairline); }
.ap-gsearch { display: block; width: 100%; height: 58px; margin-top: 8px; border: 0; border-radius: 8px; background: transparent; }
.ap-sugs { display: flex; flex-direction: column; gap: 6px; padding-left: 34px; }
.ap-sug { padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 12.5px; line-height: 17px; text-align: left; cursor: pointer; }
.ap-sug:hover { border-color: var(--accent); background: var(--sky-tint); }
.ap-typing { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-muted); }
.ap-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-muted); animation: ap-dot 1.2s infinite; }
.ap-typing i:nth-of-type(2) { animation-delay: .15s; } .ap-typing i:nth-of-type(3) { animation-delay: .3s; }
@keyframes ap-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ap-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid var(--hairline); }
.ap-form textarea { flex: 1; min-height: 40px; max-height: 120px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13.5px; line-height: 19px; resize: none; outline: none; }
.ap-form textarea:focus { border-color: var(--accent); box-shadow: var(--focus); }
.ap-send { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--primary-bg); color: var(--primary-ink); cursor: pointer; }
.ap-send:disabled { opacity: .4; cursor: default; }
.ap-foot { padding: 0 14px 10px; font-size: 11.5px; color: var(--ink-muted); text-align: right; min-height: 16px; }
.ap-host.mobile { right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); }
.ap-host.mobile .ap-fab { width: 56px; height: 56px; }
.ap-host.mobile .ap-panel { position: fixed; left: 8px; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; height: min(78vh, calc(100vh - 140px)); }
.ap-host.mobile .ap-hint { right: 64px; }
.dl-host.mobile .dl-tab { bottom: calc(170px + env(safe-area-inset-bottom)); }
@media (max-width: 760px) { .ap-host:not(.mobile) { right: 12px; bottom: 12px; } .ap-host:not(.mobile) .ap-panel { position: fixed; left: 8px; right: 8px; bottom: 88px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .ap-char.float, .ap-char .ap-umb, .ap-char .ap-eyes, .ap-char.think .ap-pupil, .ap-typing i, .ap-hint, .ap-panel { animation: none; } }
/* Teto mensal de gasto com IA */
[data-ai-budget] { margin-bottom: 16px; }
.ab-card { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.ab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ab-head h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 17px; }
.ab-head p { margin: 0; font-size: 13.5px; line-height: 20px; color: var(--ink-muted); max-width: 720px; }
.ab-head .badge { white-space: nowrap; flex-shrink: 0; }
.ab-main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: end; }
.ab-meter { display: flex; flex-direction: column; gap: 8px; }
.ab-nums { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ab-nums b { font-size: 26px; line-height: 30px; font-variant-numeric: tabular-nums; }
.ab-nums span { font-size: 13px; color: var(--ink-muted); }
.ab-bar { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); overflow: hidden; }
.ab-bar i { display: block; height: 100%; border-radius: inherit; background: var(--success); transition: width .4s ease; }
.ab-bar.warning i { background: var(--warning); }
.ab-bar.danger i { background: var(--danger); }
.ab-meter small { font-size: 12px; line-height: 17px; color: var(--ink-muted); }
.ab-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ab-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-muted); }
.ab-form .input { width: 140px; }
.ab-hint { font-size: 12.5px; color: var(--ink-muted); align-self: center; }
.ab-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--hairline); padding-top: 14px; }
.ab-split h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.ab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ab-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.ab-list b { font-variant-numeric: tabular-nums; }
.ab-empty { margin: 0; font-size: 13px; color: var(--ink-muted); }
@media (max-width: 760px) { .ab-main, .ab-split { grid-template-columns: 1fr; } .ab-form { justify-content: flex-start; } .ab-head { flex-direction: column; } }
/* Uso de IA (Controle de permissões) */
.ai-card .card-head h2 { display: flex; align-items: center; gap: 8px; }
.ai-body { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.ai-lead { margin: 0; font-size: 13.5px; line-height: 20px; color: var(--ink-muted); max-width: 900px; }
.ai-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ai-feat { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
.ai-feat header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ai-feat header strong { font-size: 14px; line-height: 19px; }
.ai-period { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.ai-period .input { height: 32px; padding: 0 8px; font-size: 12.5px; width: auto; }
.ai-roles { display: flex; flex-direction: column; gap: 6px; }
.ai-roles label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.ai-feat small { font-size: 11.5px; line-height: 16px; color: var(--ink-muted); }
.ai-lim { display: inline-flex; align-items: center; gap: 4px; }
.ai-lim input { width: 92px; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; text-align: right; }
.ai-lim input:disabled { background: var(--sky-tint); color: var(--sky-ink); }
.ai-lim input::placeholder { color: var(--ink-muted); text-align: right; }
.ai-inf { width: 30px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--ink-muted); font-size: 16px; cursor: pointer; }
.ai-inf.on { border-color: var(--accent); background: var(--sky-tint); color: var(--sky-ink); font-weight: 700; }
.ai-users-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ai-users-head h3 { margin: 0; font-size: 15px; }
.ai-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-tools .input { height: 40px; width: auto; }
.ai-table-wrap { max-height: 520px; overflow: auto; }
.ai-table td { vertical-align: middle; }
.ai-user { display: flex; flex-direction: column; }
.ai-user small { font-size: 12px; color: var(--ink-muted); }
.ai-used { display: block; margin-top: 3px; font-size: 11.5px; color: var(--ink-muted); }
.ai-used.full { color: var(--danger); font-weight: 600; }
.ai-na { color: var(--ink-muted); text-align: center; }
.ai-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.ai-dirty { font-size: 12.5px; color: var(--warning); font-weight: 600; }
@media (max-width: 1100px) { .ai-feats { grid-template-columns: minmax(0, 1fr); } }
.ai-table .ai-lim input { width: 118px; font-size: 12.5px; }
/* espaço no fim das páginas para o Apolo não cobrir botões do canto */
.shell-main .page { padding-bottom: 96px; }

/* Apolo × outros elementos flutuantes: nada fica por cima de nada */
body:has(.ap-host:not(.mobile)) .ann-host-corner { bottom: 104px; } /* avisos sobem para cima do Apolo */
body:has(.dl-drawer) .ap-host { display: none; } /* gaveta de prazos aberta: o Apolo sai da frente */
body:has(.m-viewas-pill) .ap-host.mobile { bottom: calc(140px + env(safe-area-inset-bottom)); } /* app: acima da faixa "Vendo como" */
body:has(.m-viewas-pill) .dl-host.mobile .dl-tab { bottom: calc(210px + env(safe-area-inset-bottom)); }
body:has(.m-fab) .ap-host.mobile { bottom: calc(154px + env(safe-area-inset-bottom)); } /* app: acima do botão "Nova nota" */
body:has(.m-fab) .dl-host.mobile .dl-tab { bottom: calc(224px + env(safe-area-inset-bottom)); }

/* Atalho para o Uso de IA no topo do Controle de permissões */
.perm-ai-link { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: var(--r-lg, 14px); background: var(--surface-2); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.perm-ai-link:hover { border-color: #8B5CF6; box-shadow: var(--shadow-md); }
.perm-ai-link > .ic:first-child { color: #8B5CF6; flex: none; }
.perm-ai-link span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.perm-ai-link small { color: var(--ink-muted); font-size: 13px; }
.admin-tabs { flex-wrap: wrap; }

/* Cliente com CPF/CNPJ pendente (importação excepcional) */
.cf-note.warn .ic { color: var(--warning, #B45309); }
.cr-pending { color: var(--warning, #B45309); font-weight: 600; }
.imp-list.pend { border-color: color-mix(in srgb, #F5A524 45%, transparent); }

/* Exclusão definitiva de usuário */
.purge-warn, .purge-keep { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 20px; }
.purge-warn { background: var(--danger-tint); color: var(--ink); }
.purge-warn .ic { color: var(--danger); flex: none; margin-top: 1px; }
.purge-keep { background: var(--surface-2); border: 1px solid var(--hairline); }
.purge-keep .ic { color: var(--sky-ink); flex: none; margin-top: 2px; }
.purge-table td { padding: 8px 10px; font-size: 14px; }
.purge-table td.num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; width: 70px; }
.purge-list { margin-top: 8px; font-size: 13.5px; }
.purge-list summary { cursor: pointer; color: var(--sky-ink); font-weight: 500; }
.purge-list ul { margin: 8px 0 0; padding-left: 18px; max-height: 180px; overflow: auto; color: var(--ink-muted); }
.purge-list small { color: var(--ink-muted); }
.purge .cell-user { display: flex; align-items: center; gap: 12px; }
.purge .cell-user > div { display: flex; flex-direction: column; gap: 2px; }
.purge .cell-user small { color: var(--ink-muted); font-size: 13px; }

/* Dashboards — comissões */
.db-kpis.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-kpi.z { box-shadow: inset 3px 0 0 var(--ink); }
.db-kpi.f { box-shadow: inset 3px 0 0 var(--sky); }
.db-csplit { margin-top: 16px; }
.db-csplit-bar { height: 12px; border-radius: 6px; }
.db-csplit-leg { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-size: 13px; color: var(--ink-muted); }
.db-csplit-leg span { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.db-csplit-leg b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.db-csplit-leg small { font-variant-numeric: tabular-nums; }
.bc-dot.n, .db-cdot.n { background: repeating-linear-gradient(135deg, var(--border-strong) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--border-strong); }
.db-cnote { display: flex; gap: 6px; align-items: flex-start; text-align: left; }
.db-cnote .ic { flex: none; margin-top: 2px; }
.db-zf-row .db-rank-name { display: flex; flex-direction: column; line-height: 17px; }
.db-zf-meta { font-size: 11.5px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; }
.db-zf-row { min-height: 44px; }
.db-zf-track { display: flex; }
.db-zf-fill { display: flex; height: 100%; border-radius: 0 4px 4px 0; overflow: hidden; }
.db-zf-fill i.db-cseg, .db-col-bar i.db-cseg { display: block; height: 100%; border-radius: 0; }
.db-cseg.z { background: var(--ink); }
.db-cseg.f { background: var(--sky); }
.db-cseg.n { background: repeating-linear-gradient(135deg, var(--border-strong) 0 2px, var(--surface) 2px 5px); }
.db-col-bar i.db-cseg { width: 100%; height: auto; min-height: 2px; }
.db-col-bar i.db-cseg:first-child { border-radius: 4px 4px 0 0; }
.db-bar-t i.db-zfill { background: var(--ink); }
.db-tip-sub { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--hairline); font-weight: 600; font-size: 12px; }
.db-tip dt .bc-dot { margin-right: 5px; }
.db-zf-sum b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (max-width: 1180px) { .db-kpis.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .db-kpis.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.db-dp-list { max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.db-zf-cols.one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) { .db-kpis.c3 .db-kpi-v { font-size: 21px; line-height: 28px; } .db-kpis.c3 .db-kpi { min-height: 96px; } }

/* Aviso de nova versão do sistema (site e app) */
.zs-update { position: fixed; z-index: 2000; top: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; width: min(640px, calc(100vw - 32px)); padding: 14px 14px 14px 16px; border: 1px solid var(--hairline); border-left: 4px solid var(--sky); border-radius: 14px; background: var(--elevated, #fff); color: var(--ink); box-shadow: 0 18px 48px rgba(10, 10, 11, .22); animation: zs-update-in .28s ease-out; }
@keyframes zs-update-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.zs-update-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--sky) 16%, transparent); color: var(--sky-ink, #1A6EA3); }
.zs-update-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 19px; }
.zs-update-txt small { font-size: 12.5px; line-height: 17px; color: var(--ink-muted); }
.zs-update-txt small b { color: var(--ink); font-weight: 600; }
.zs-update-act { flex: none; display: flex; gap: 6px; }
.zs-update-act button { height: 36px; padding: 0 14px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.zs-update-later { border: 1px solid var(--hairline); background: transparent; color: var(--ink-muted); }
.zs-update-go { border: 0; background: var(--ink); color: var(--bg, #fff); }
.zs-update-go:disabled { opacity: .7; cursor: default; }
.zs-update.mobile { top: calc(10px + env(safe-area-inset-top)); flex-wrap: wrap; gap: 10px 12px; }
@media (max-width: 560px) { .zs-update { flex-wrap: wrap; } .zs-update-act { width: 100%; } .zs-update-act button { flex: 1; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .zs-update { animation: none; } }

/* ---------- Docs (documentos de parceiros) ---------- */
.pd-page { max-width: 1320px; }
.pd-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pd-kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 112px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); box-shadow: var(--shadow-sm); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; position: relative; overflow: hidden; }
.pd-kpi:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pd-kpi:focus-visible { box-shadow: var(--focus); outline: none; }
.pd-kpi.skeleton { cursor: default; }
.pd-kpi-label { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.pd-kpi-value { font-size: 30px; line-height: 38px; font-weight: 500; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pd-kpi-sub { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.pd-kpi.hero { background: var(--onyx); color: #fff; border-color: transparent; }
.pd-kpi.hero::after { content: ''; position: absolute; right: -46px; top: 0; bottom: 0; width: 80px; background: var(--sky); transform: skewX(-39deg); }
.pd-kpi.hero .pd-kpi-label, .pd-kpi.hero .pd-kpi-sub { color: #A9AEB6; position: relative; z-index: 1; max-width: 72%; }
.pd-kpi.hero .pd-kpi-value { position: relative; z-index: 1; }
.pd-kpi.ok { border-top: 3px solid var(--success); }
.pd-kpi.warn { border-top: 3px solid var(--warning); background: linear-gradient(var(--warning-tint), var(--surface-2) 70%); }
.pd-kpi.warn .pd-kpi-value { color: var(--warning); }
.pd-kpi.bad { border: 1px solid var(--danger); border-top-width: 3px; background: linear-gradient(var(--danger-tint), var(--surface-2) 75%); }
.pd-kpi.bad .pd-kpi-value { color: var(--danger); font-weight: 650; }
.pd-dash-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-bottom: 32px; }
.pd-attn, .pd-break { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.pd-attn.has-late { border-color: color-mix(in srgb, var(--danger) 45%, var(--hairline)); }
.pd-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pd-card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 20px; font-weight: 600; }
.pd-card-head h3 .ic { color: var(--ink-muted); }
.pd-card-head small { font-size: 12px; color: var(--ink-muted); }
.pd-break .pd-card-head:not(:first-child) { margin-top: 8px; }
.pd-attn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pd-attn-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface-2); cursor: pointer; }
.pd-attn-row:hover { border-color: var(--border-strong); }
.pd-attn-row:focus-visible { box-shadow: var(--focus); }
.pd-attn-row.vencido { background: var(--danger-tint); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.pd-attn-row.a_vencer .pd-attn-ic { color: var(--warning); background: var(--warning-tint); }
.pd-attn-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--danger); color: #fff; }
.pd-attn-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pd-attn-txt strong { font-size: 14px; line-height: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-attn-txt small, .pd-attn-when small { font-size: 12px; line-height: 16px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-attn-when { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.pd-attn-when b { font-size: 13px; line-height: 18px; font-weight: 600; }
.pd-attn-row.vencido .pd-attn-when b { color: var(--danger); }
.pd-attn-row.a_vencer .pd-attn-when b { color: var(--warning); }
.pd-attn-more { align-self: flex-start; }
.pd-ok { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--success-tint); color: var(--success); font-size: 13.5px; }
.pd-foot { margin-top: auto; font-size: 12px; line-height: 17px; color: var(--ink-muted); }
.pd-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pd-bars li { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 28px; align-items: center; gap: 10px; font-size: 13px; }
.pd-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pd-bar-track { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.pd-bar-track span { display: block; height: 100%; border-radius: 4px; background: var(--sky-ink); }
.pd-bars b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-none { font-size: 13px; color: var(--ink-muted); }

.pd-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pd-toolbar h2 { font-size: 20px; line-height: 26px; font-weight: 600; margin-right: auto; }
.pd-search { height: 40px; min-width: 300px; }
.pd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pd-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface-2); color: var(--ink-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.pd-chip b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface); color: var(--ink-muted); font-size: 11px; line-height: 20px; text-align: center; }
.pd-chip.on { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.pd-chip.on b { background: rgba(255,255,255,.18); color: inherit; }
.pd-chip.vencido b { background: var(--danger-tint); color: var(--danger); }
.pd-chip.a_vencer b { background: var(--warning-tint); color: var(--warning); }

.pd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pd-box { display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); box-shadow: var(--shadow-sm); overflow: hidden; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.pd-box.late { border-color: color-mix(in srgb, var(--danger) 45%, var(--hairline)); }
.pd-box.flash { animation: pd-flash 1.8s ease-out; }
.pd-doc.flash { animation: pd-flash-row 1.8s ease-out; }
@keyframes pd-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent), var(--shadow-md); } 100% { box-shadow: var(--shadow-sm); } }
@keyframes pd-flash-row { 0%, 35% { background: var(--sky-tint); } 100% { background: transparent; } }
.pd-box-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--hairline); }
.pd-box-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-bg); color: var(--primary-ink); font-size: 14px; font-weight: 650; letter-spacing: .02em; }
.pd-box-title { flex: 1; min-width: 0; }
.pd-box-title h3 { font-size: 16px; line-height: 21px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-box-meta { font-size: 12.5px; color: var(--ink-muted); }
.pd-box-meta em { font-style: normal; font-weight: 600; }
.pd-box-meta em.late { color: var(--danger); }
.pd-box-meta em.soon { color: var(--warning); }
.pd-box-tools { display: flex; gap: 2px; }
.pd-box-tools .icon-btn { color: var(--ink-muted); }
.pd-docs { list-style: none; margin: 0; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.pd-empty { display: flex; align-items: center; gap: 8px; padding: 14px 8px; font-size: 13px; color: var(--ink-muted); }
.pd-doc { border-radius: 12px; scroll-margin-top: calc(var(--topbar-h) + 24px); }
.pd-doc.open { background: var(--surface); }
.pd-doc.st-vencido { box-shadow: inset 3px 0 0 var(--danger); }
.pd-doc.st-a_vencer { box-shadow: inset 3px 0 0 var(--warning); }
.pd-doc.st-inativo .pd-doc-rel, .pd-doc.st-inativo .pd-doc-meta { opacity: .6; }
.pd-doc-main { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; grid-template-areas: 'rel badge chev' 'meta meta meta'; align-items: center; gap: 4px 12px; width: 100%; padding: 10px 10px 10px 14px; border-radius: 12px; cursor: pointer; }
.pd-doc-main:hover { background: var(--surface); }
.pd-doc-main:focus-visible { box-shadow: var(--focus); }
.pd-doc-rel { grid-area: rel; min-width: 0; font-size: 14px; line-height: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-doc-main .badge { grid-area: badge; justify-self: end; }
.pd-doc-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 2px 14px; min-width: 0; font-size: 12.5px; line-height: 17px; color: var(--ink-muted); }
.pd-doc-meta > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pd-doc-meta .pd-doc-vig { font-variant-numeric: tabular-nums; color: var(--ink); }
.pd-doc-chev { grid-area: chev; display: grid; place-items: center; color: var(--ink-muted); transition: transform .15s; }
.pd-doc.open .pd-doc-chev { transform: rotate(180deg); }
.badge-muted { background: var(--surface); color: var(--ink-muted); border-color: var(--hairline); }
.pd-doc .badge .ic { margin-right: -2px; }
.pd-doc-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.pd-doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.pd-doc-grid dt { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.pd-doc-grid dd { margin: 3px 0 0; font-size: 13.5px; line-height: 19px; display: flex; flex-direction: column; gap: 2px; }
.pd-when { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.pd-when.vencido { color: var(--danger); }
.pd-when.a_vencer { color: var(--warning); }
.pd-when.vigente { color: var(--success); }
.pd-rates-view { flex-direction: row !important; flex-wrap: wrap; gap: 6px !important; }
.pd-rate-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--sky-tint); color: var(--sky-ink); font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pd-rate-chip small { font-weight: 500; color: var(--ink-muted); }
.pd-muted { font-size: 13px; color: var(--ink-muted); }
.pd-doc-sec h4 { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.pd-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pd-files li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--hairline); }
.pd-files .btn { flex: none; gap: 6px; height: 32px; padding: 0 10px; }
.pd-file-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pd-file-name { all: unset; cursor: pointer; font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-file-name:hover { text-decoration: underline; }
.pd-file-name:focus-visible { box-shadow: var(--focus); border-radius: 4px; }
.pd-file-txt small { font-size: 11.5px; color: var(--ink-muted); }
.pd-notes { font-size: 13.5px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pd-doc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--hairline); }
.pd-doc-act { display: flex; gap: 4px; flex-wrap: wrap; }
.pd-doc-act .btn { gap: 6px; }
.pd-doc-act .danger:hover { color: var(--danger); background: var(--danger-tint); }
.pd-insert { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 16px 16px; height: 42px; border: 1.5px dashed var(--border); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.pd-insert:hover { border-color: var(--accent); background: var(--sky-tint); color: var(--sky-ink); }

/* Janela "Inserir Documento" */
.pd-form .form-grid { gap: 14px 16px; }
.pd-pick { display: flex; gap: 8px; }
.pd-pick .cf-combo { flex: 1; min-width: 0; }
.pd-plus { flex: none; width: 44px; padding: 0; justify-content: center; border: 1px solid var(--border); }
.pd-form .field.invalid .input { border-color: var(--danger); }
.pd-plus-pop { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.pd-plus-act { display: flex; justify-content: flex-end; gap: 6px; }
.pd-check { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-size: 14px; font-weight: 500; cursor: pointer; }
.pd-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--onyx); cursor: pointer; }
[data-theme='dark'] .pd-check input { accent-color: var(--sky); }
.pd-rates { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 12px; border-radius: 12px; background: var(--surface); }
.pd-rates[hidden] { display: none; }
.pd-rates > div { display: flex; flex-direction: column; gap: 8px; }
.pd-rate { display: grid; grid-template-columns: 130px minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.pd-pct { position: relative; }
.pd-pct .input { padding-right: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.pd-pct span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); font-weight: 600; pointer-events: none; }
.pd-rate .icon-btn { width: 32px; height: 32px; }
.pd-add-rate { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; }
.pd-add-rate[hidden] { display: none; }
.pd-vig-hint { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 18px; background: var(--surface); color: var(--ink-muted); }
.pd-vig-hint .ic { flex: none; margin-top: 1px; }
.pd-vig-hint.warn { background: var(--warning-tint); color: var(--warning); }
.pd-vig-hint.bad { background: var(--danger-tint); color: var(--danger); font-weight: 500; }
.docs-chosen li.new small { color: var(--sky-ink); }

/* Sininho: avisos críticos (documento vencido) e de atenção */
.notif-item.critical { background: var(--danger-tint); }
.notif-item.critical strong { color: var(--danger); }
.notif-item.critical .n-dot { background: var(--danger) !important; }
.notif-item.warning.unread .n-dot { background: var(--warning); }
.notif-item .n-tag { align-self: flex-start; margin-top: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px !important; line-height: 16px !important; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--danger); color: #fff !important; }
.notif-count.danger { background: #FF5A4F; color: #fff; }
.notif-count.warn { background: #FFC24B; color: var(--onyx); }

@media (max-width: 1280px) { .pd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .pd-grid, .pd-dash-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .pd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pd-kpi { min-height: 96px; padding: 14px; }
  .pd-kpi-value { font-size: 24px; line-height: 30px; }
  .pd-search { min-width: 0; flex: 1 1 100%; order: 2; }
  .pd-chips { order: 3; overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 2px; }
  .pd-chip { flex: none; }
  .pd-doc-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-files .btn span { display: none; }
  .pd-files .btn { width: 36px; padding: 0; justify-content: center; }
  .pd-rate { grid-template-columns: 110px minmax(0, 1fr) 32px; }
  .pd-bars li { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 24px; }
}

/* Docs — formas de exibição (Caixas, Lista, Kanban) e Inserir com IA */
.pd-views { flex: none; }
.pd-views button { height: 32px; padding: 0 12px; }
.pd-insert-row { display: flex; gap: 8px; margin: 4px 16px 16px; }
.pd-insert-row .pd-insert { flex: 1; margin: 0; }
.pd-insert.ai { color: var(--sky-ink); border-color: color-mix(in srgb, var(--sky) 55%, var(--border)); }
.pd-insert.ai:hover { background: var(--sky-tint); }
.pd-ai-btn { gap: 8px; border: 1px solid color-mix(in srgb, var(--sky) 55%, var(--border)); color: var(--sky-ink); }
.pd-ai-btn:hover { background: var(--sky-tint); }
.pd-table-wrap { padding: 0; overflow-x: auto; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 860px; }
.pd-table th { position: sticky; top: 0; background: var(--surface); text-align: left; padding: 0; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.pd-table th button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; width: 100%; padding: 11px 14px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); cursor: pointer; }
.pd-table th button:hover { color: var(--ink); }
.pd-table th button:focus-visible { box-shadow: inset var(--focus); }
.pd-table th[aria-sort='ascending'] .ic { transform: rotate(180deg); }
.pd-table th.num button { justify-content: flex-end; }
.pd-table td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.pd-table tbody tr { cursor: pointer; }
.pd-table tbody tr:hover { background: var(--surface); }
.pd-table tbody tr:focus-visible { outline: none; box-shadow: inset var(--focus); }
.pd-table tbody tr:last-child td { border-bottom: 0; }
.pd-table tr.st-vencido td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.pd-table tr.st-a_vencer td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
.pd-table tr.st-inativo td { color: var(--ink-muted); }
.pd-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-t-partner strong { font-weight: 600; }
.pd-t-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-table tr.flash { animation: pd-flash-row 1.8s ease-out; }
.pd-list-foot { margin-top: 10px; font-size: 12px; color: var(--ink-muted); }
.pd-kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pd-kcol { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); }
.pd-kcol header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--hairline); }
.pd-kcol header b { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); font-size: 11.5px; line-height: 20px; text-align: center; }
.pd-kcol.k-vencido header { color: var(--danger); }
.pd-kcol.k-vencido { border-color: color-mix(in srgb, var(--danger) 35%, var(--hairline)); }
.pd-kcol.k-a_vencer header { color: var(--warning); }
.pd-kcol.k-vigente header { color: var(--success); }
.pd-kcol.k-inativo header { color: var(--ink-muted); }
.pd-kcards { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 120px; border-radius: 0 0 var(--r-lg) var(--r-lg); transition: background-color .15s; }
.pd-kcards.over { background: var(--sky-tint); box-shadow: inset 0 0 0 2px var(--accent); }
.pd-kempty { padding: 14px 6px; font-size: 12.5px; color: var(--ink-muted); text-align: center; }
.pd-kcard { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); cursor: grab; min-width: 0; }
.pd-kcard:hover { border-color: var(--border-strong); }
.pd-kcard:focus-visible { outline: none; box-shadow: var(--focus); }
.pd-kcard.dragging { opacity: .45; }
.pd-kcard.flash { animation: pd-flash 1.8s ease-out; }
.pd-kcard.st-vencido { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-sm); }
.pd-kcard.st-a_vencer { box-shadow: inset 3px 0 0 var(--warning), var(--shadow-sm); }
.pd-kcard strong { font-size: 14px; line-height: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-kc-rel { font-size: 12.5px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-kc-vig { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-variant-numeric: tabular-nums; }
.pd-kc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.pd-kc-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-muted); }
.pd-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 13px; color: var(--ink-muted); }
.pd-detail .pd-doc-body { padding: 8px 0 0; }
.pd-ai-intro { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--sky-tint); color: var(--ink); font-size: 13.5px; line-height: 19px; }
.pd-ai-intro .ic { flex: none; color: var(--sky-ink); margin-top: 1px; }
.pd-ai-drop { height: 120px; }
.pd-ai-drop small { font-size: 12px; }
.pd-ai-quota { font-size: 12.5px; color: var(--ink-muted); }
.pd-ai-quota.bad { color: var(--danger); font-weight: 500; }
.pd-ai-progress { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 13.5px; font-weight: 500; }
.pd-ai-progress[hidden] { display: none; }
.pd-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--hairline); border-top-color: var(--accent); animation: pd-spin .8s linear infinite; flex: none; }
@keyframes pd-spin { to { transform: rotate(360deg); } }
.pd-ai-banner { padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--sky) 45%, var(--hairline)); background: var(--sky-tint); font-size: 13px; line-height: 18px; margin-bottom: 4px; }
.pd-ai-banner.conf-baixa { border-color: color-mix(in srgb, var(--warning) 55%, var(--hairline)); background: var(--warning-tint); }
.pd-ai-banner-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pd-ai-banner-head .ic { color: var(--sky-ink); }
.pd-ai-conf { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); font-size: 11.5px; font-weight: 600; color: var(--ink-muted); }
.pd-ai-banner.conf-alta .pd-ai-conf { color: var(--success); }
.pd-ai-banner.conf-baixa .pd-ai-conf { color: var(--warning); }
.pd-ai-banner p { color: var(--ink-muted); }
.pd-ai-banner ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pd-spin { animation-duration: 2.4s; } }
@media (max-width: 1100px) { .pd-kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .pd-kanban { grid-template-columns: repeat(4, 82%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .pd-kcol { scroll-snap-align: start; }
  .pd-views { order: 1; width: 100%; }
  .pd-views button { flex: 1; justify-content: center; }
  .pd-insert-row { flex-direction: column; }
  .page-actions .pd-ai-btn { flex: 1; }
}

/* Docs — Inserir com IA: vários contratos (um documento por arquivo) e conferência em sequência */
.pd-ai-note { font-size: 12px; color: var(--ink-muted); margin-top: -4px; }
.pd-ai-list li { align-items: flex-start; }
.pd-ai-list li .grow { display: flex; flex-direction: column; white-space: normal; }
.pd-ai-msg { font-size: 11.5px; line-height: 16px; color: var(--danger) !important; white-space: normal !important; }
.pd-ai-st { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-muted); }
.pd-ai-list li.st-read .pd-ai-st { color: var(--sky-ink); background: var(--sky-tint); }
.pd-ai-list li.st-read .pd-ai-st .ic { animation: pd-spin 1.6s linear infinite; }
.pd-ai-list li.st-ok .pd-ai-st { color: var(--success); background: var(--success-tint); }
.pd-ai-list li.st-bad .pd-ai-st, .pd-ai-list li.st-err .pd-ai-st { color: var(--danger); background: var(--danger-tint); }
.pd-queue { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--sky) 30%, transparent); }
.pd-queue-steps { display: inline-flex; gap: 4px; }
.pd-queue-steps i { width: 18px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--sky-ink) 22%, transparent); }
.pd-queue-steps i.done { background: var(--success); }
.pd-queue-steps i.on { background: var(--sky-ink); }
.pd-queue-file { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pd-notread { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--danger-tint); color: var(--danger); }
.pd-notread strong { display: inline-flex; align-items: center; gap: 6px; }
.pd-notread ul { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pd-ai-list li.st-read .pd-ai-st .ic { animation: none; } }

/* Controle de permissões (todas as chaves liberáveis pelo Administrador) */
.perm-cell { display: inline-flex; align-items: center; gap: 6px; }
.perm-sp, .perm-lock, .perm-warn { width: 16px; display: inline-grid; place-items: center; }
.perm-lock { color: var(--ink-muted); }
.perm-warn { color: var(--warning); cursor: help; }
.switch.locked input:disabled + .track { opacity: .85; }
.perm-name { display: flex; flex-direction: column; min-width: 0; }
.perm-name small { font-size: 12px; line-height: 16px; color: var(--ink-muted); font-weight: 400; }
.perm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: -6px 0 20px; font-size: 12.5px; line-height: 18px; color: var(--ink-muted); }
.perm-legend > span { display: inline-grid; place-items: center; }
.perm-legend > span:first-child { color: var(--warning); }
.perm-dirty { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: var(--warning-tint); color: var(--warning); font-size: 13.5px; font-weight: 500; }

/* ===================== Planos (Light, Premium e Select) ===================== */
:root { --pl-light: #8A9099; --pl-premium: #1A6EA3; --pl-select: #6D28D9; --pl-light-2: #C9CDD3; --pl-premium-2: #7FCFFF; --pl-select-2: #C084FC; }
[data-theme='dark'] { --pl-light: #A3ABB8; --pl-premium: #7FCFFF; --pl-select: #C4A1FF; }
/* selo na barra superior (fundo escuro) */
.plan-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin-right: 8px; padding: 0 4px 0 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.88); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.plan-chip:hover { text-decoration: none; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.28); }
.plan-chip .ic { color: var(--pl-premium-2); }
.plan-chip.pl-light .ic { color: #C9CDD3; }
.plan-chip.pl-select .ic { color: var(--pl-select-2); }
.plan-chip.pl-none .ic { color: #F5A524; }
.plan-chip em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(77,178,236,.18); color: #BFE6FF; }
.plan-chip > span:only-of-type:last-child { padding-right: 6px; }
@media (max-width: 860px) { .plan-chip > span { display: none; } .plan-chip { padding: 0 4px 0 8px; } }
.menu-tag { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--ink-muted); }
.plan-badge.pl-light { background: var(--surface); color: var(--ink); border: 1px solid var(--hairline); }
.plan-badge.pl-premium { background: var(--sky-tint); color: var(--sky-ink); }
.plan-badge.pl-select { background: rgba(124,58,237,.12); color: var(--pl-select); }
.plan-badge.none { background: var(--warning-tint); color: var(--warning); }

/* vitrine */
.pl-page { max-width: 1180px; }
.pl-hero { display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: center; margin: 4px 0 28px; }
.pl-hero h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 48px; letter-spacing: -.01em; margin: 8px 0 12px; max-width: 640px; }
.pl-hero p { color: var(--ink-muted); font-size: 16px; line-height: 24px; max-width: 620px; }
.pl-hero-note { display: inline-flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding: 10px 14px; border-radius: var(--r-md); background: var(--sky-tint); color: var(--sky-ink); font-size: 13.5px; line-height: 19px; }
.pl-hero-note .ic { flex: none; margin-top: 1px; }
.pl-art { width: 100%; height: auto; }
.pl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; margin-bottom: 28px; }
.pl-card { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px 22px 22px; border-radius: var(--r-xl); border: 1px solid var(--hairline); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.pl-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--r-xl) var(--r-xl) 0 0; background: linear-gradient(90deg, var(--g1, #C9CDD3), var(--g2, #8A9099)); }
.pl-card.featured { border-color: color-mix(in srgb, var(--g2, #6D28D9) 40%, var(--hairline)); box-shadow: var(--shadow-md); }
.pl-card.current { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-flag { position: absolute; top: 16px; right: 16px; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--sky-tint); color: var(--sky-ink); }
.pl-flag.dark { background: var(--ink); color: var(--bg); }
.pl-card header h2 { font-size: 22px; line-height: 28px; margin: 10px 0 4px; }
.pl-card header p { color: var(--ink-muted); font-size: 14px; line-height: 20px; min-height: 40px; }
.pl-gem { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--g1, #C9CDD3), var(--g2, #8A9099)); flex: none; }
.pl-gem.sm { width: 34px; height: 34px; border-radius: 10px; }
.apl-plan.pl-premium, .plan-chip.pl-premium { --g1: #7FCFFF; --g2: #1A6EA3; }
.apl-plan.pl-select { --g1: #C084FC; --g2: #6D28D9; }
.pl-price { display: flex; align-items: baseline; gap: 4px; }
.pl-price small { font-size: 15px; font-weight: 600; color: var(--ink-muted); }
.pl-price strong { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -.02em; }
.pl-price span { color: var(--ink-muted); font-size: 14px; }
.pl-cta { width: 100%; justify-content: center; }
.pl-cta-note { display: block; text-align: center; font-size: 13px; color: var(--ink-muted); padding: 10px 0; }
.pl-inc { border-top: 1px solid var(--hairline); padding-top: 14px; }
.pl-inc > b { display: block; font-size: 13px; margin-bottom: 10px; }
.pl-inc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pl-inc li { display: flex; gap: 10px; }
.pl-inc li > .ic { flex: none; margin-top: 2px; color: var(--success); }
.pl-inc li strong { display: block; font-size: 14px; line-height: 19px; }
.pl-inc li em { display: inline-block; margin: 3px 0 2px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--sky-ink); background: var(--sky-tint); padding: 2px 8px; border-radius: 999px; }
.pl-inc li span { display: block; color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.pl-compare { margin-bottom: 24px; }
.pl-compare > header { padding: 18px 20px 4px; }
.pl-compare > header h2 { font-size: 18px; }
.pl-compare > header p { color: var(--ink-muted); font-size: 13px; margin-top: 2px; }
.pl-table th small { display: block; font-weight: 500; color: var(--ink-muted); font-size: 12px; }
.pl-table thead th:not(:first-child), .pl-table td { text-align: center; }
.pl-table thead th.cur { color: var(--sky-ink); }
.pl-table td.yes { color: var(--success); font-weight: 600; font-size: 13px; }
.pl-table td.no { color: var(--border-strong); }
.pl-table tbody th { font-weight: 500; text-align: left; }
.pl-faq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 12px; }
.pl-faq h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 6px; }
.pl-faq p { color: var(--ink-muted); font-size: 13.5px; line-height: 20px; }
@media (max-width: 1100px) { .pl-grid { grid-template-columns: 1fr; max-width: 560px; } .pl-hero { grid-template-columns: 1fr; } .pl-art { max-width: 220px; } }
@media (max-width: 760px) { .pl-faq { grid-template-columns: 1fr; } .pl-hero h1 { font-size: 34px; line-height: 38px; } }

/* página de upgrade */
.pp-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pp-summary, .pp-pay { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.pp-summary > header { display: flex; gap: 12px; align-items: center; }
.pp-summary > header h2 { font-size: 18px; }
.pp-summary > header p { color: var(--ink-muted); font-size: 14px; }
.pp-price { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); }
.pp-price strong { font-size: 26px; }
.pp-price small { font-size: 14px; color: var(--ink-muted); font-weight: 500; }
.pp-line { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-muted); padding: 0 4px; }
.pp-summary h3 { font-size: 14px; margin-top: 4px; }
.pp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pp-list li > .ic { color: var(--success); flex: none; }
.pp-list li em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sky-tint); color: var(--sky-ink); }
.pp-pay { align-items: flex-start; }
.pp-pay-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface); color: var(--ink); }
.pp-pay h2 { font-size: 20px; }
.pp-pay p { color: var(--ink-muted); font-size: 14px; line-height: 21px; }
.pp-status { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); font-size: 13.5px; line-height: 19px; width: 100%; }
.pp-status .ic { flex: none; margin-top: 1px; }
.pp-status.ok { background: var(--success-tint); color: var(--success); }
.pp-status.err { background: var(--danger-tint); color: var(--danger); }
@media (max-width: 900px) { .pp-grid { grid-template-columns: 1fr; } }

/* Painel de Administração → Planos */
.apl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.apl-plan { padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow: visible; }
.apl-plan > header { display: flex; gap: 10px; align-items: center; }
.apl-plan > header > div { flex: 1; min-width: 0; }
.apl-name { font-weight: 600; font-size: 16px; }
.apl-plan > header small { color: var(--ink-muted); font-size: 12px; }
.apl-sec { border-top: 1px solid var(--hairline); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.apl-sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); margin-bottom: 2px; }
.apl-sec h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.apl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; min-height: 30px; }
.apl-row.off { opacity: .5; }
.apl-row.ai > span:first-child small { display: block; color: var(--ink-muted); font-size: 11.5px; }
.apl-row .ai-lim { width: 130px; flex: none; }
.apl-note { color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.apl-foot { margin-top: auto; text-align: right; font-weight: 600; color: var(--ink-muted); font-size: 13px; }
@media (max-width: 1100px) { .apl-grid { grid-template-columns: 1fr; } }
.ai-by-plan .ai-plan-tag { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: var(--r-sm); background: var(--sky-tint); color: var(--sky-ink); font-size: 12.5px; font-weight: 600; }
.perm-plan-link:is(div) { cursor: default; }

/* início sem plano · Gestão sem a aba de documentos · Apolo sem saldo */
.home-plan { display: flex; align-items: center; gap: 16px; margin: 28px 0 28px; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--hairline); background: linear-gradient(120deg, var(--sky-tint), var(--surface-2)); }
.home-plan > div { flex: 1; min-width: 0; }
.home-plan strong { display: block; font-size: 16px; }
.home-plan span { color: var(--ink-muted); font-size: 14px; }
@media (max-width: 760px) { .home-plan { flex-wrap: wrap; } }
.gs-upsell-b { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.ap-upsell { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 12px; font-size: 13px; font-weight: 600; color: var(--sky-ink); }

/* Meu painel (Dashboards do franqueado e do parceiro, plano Select) */
.dbo-period { display: inline-flex; align-items: center; gap: 8px; }
.dbo-period select { width: auto; }
.dbo-scope { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; color: var(--ink-muted); }
.dbo-scope .db-live { margin-left: auto; }
.dbo-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dbo-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow: visible; }
.dbo-card > header h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.dbo-card > header p { color: var(--ink-muted); font-size: 12.5px; margin-top: 2px; }
.dbo-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.dbo-kpi { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px; border-left: 1px solid var(--hairline); }
.dbo-kpi:first-child { border-left: 0; }
.dbo-kpi span { font-size: 12.5px; color: var(--ink-muted); }
.dbo-kpi b { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.01em; }
.dbo-kpi small { font-size: 12px; color: var(--ink-muted); }
.dbo-cols { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 18px; }
.dbo-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; position: relative; }
.dbo-col i { display: block; width: min(28px, 70%); border-radius: 4px 4px 0 0; background: var(--sky); }
.dbo-col:hover i { filter: brightness(.9); }
.dbo-col small { font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
.dbo-cv { font-size: 10.5px; color: var(--ink-muted); white-space: nowrap; min-height: 14px; }
.dbo-bars { display: flex; flex-direction: column; gap: 10px; }
.dbo-bar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.dbo-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbo-bt { height: 10px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.dbo-bt i { display: block; height: 100%; border-radius: 999px; background: var(--sky); }
.dbo-bar b { font-weight: 600; font-variant-numeric: tabular-nums; }
.dbo-ren { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dbo-ren > div { padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); display: flex; flex-direction: column; }
.dbo-ren b { font-size: 22px; }
.dbo-ren span, .dbo-ren small { font-size: 12px; color: var(--ink-muted); }
.dbo-list { display: flex; flex-direction: column; }
.dbo-li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--hairline); color: var(--ink); font-size: 13px; }
.dbo-li:hover { text-decoration: none; background: var(--surface); }
.dbo-li small { display: block; color: var(--ink-muted); font-size: 12px; }
.dbo-li .r { text-align: right; flex: none; }
.dbo-empty { color: var(--ink-muted); font-size: 13px; padding: 18px 0; text-align: center; }
.dbo-foot { color: var(--ink-muted); font-size: 12px; }
@media (max-width: 1180px) { .dbo-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dbo-card[style*="span 8"], .dbo-card[style*="span 4"] { grid-column: span 12 !important; } }
@media (max-width: 760px) { .dbo-card { grid-column: span 12 !important; } .dbo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dbo-kpi { border-left: 0; } .dbo-col small { font-size: 9.5px; } .dbo-cv { display: none; } }
.pl-table tbody th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); font-weight: 500; }
.pl-table td .ic { display: inline-block; vertical-align: middle; margin: 0 auto; }
.pl-table td, .pl-table tbody th { padding-top: 12px; padding-bottom: 12px; }
@media (max-width: 760px) { .pl-art { display: none; } .pl-hero { margin-bottom: 18px; } }

/* vitrine: sem ilustração, perguntas e pacotes de IA */
.pl-hero.no-art { grid-template-columns: 1fr; }
.pl-faq-sec > h2 { font-size: 18px; margin-bottom: 12px; }
.pk-sec { margin: 0 0 28px; }
.pk-head { margin-bottom: 14px; }
.pk-head h2 { font-size: 22px; margin: 6px 0 4px; }
.pk-head p { color: var(--ink-muted); font-size: 14px; max-width: 720px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pk-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--hairline); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.pk-card::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--g1), var(--g2)); }
.pk-card > header { display: flex; gap: 10px; align-items: flex-start; }
.pk-card.has-badge > header { padding-right: 96px; }
.pk-card h3 { font-size: 16px; }
.pk-card header p { color: var(--ink-muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.pk-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pk-card li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.pk-card li .ic { color: var(--success); flex: none; }
.pk-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--hairline); padding-top: 12px; }
.pk-price b { display: block; font-size: 20px; }
.pk-price small { color: var(--ink-muted); font-size: 12px; }
.pk-na { font-size: 12px; color: var(--ink-muted); }

/* ===================== Painel → Planos: editor com pré-visualização ===================== */
.apl-page { max-width: none; }
.apl-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 16px; }
.apl-tab { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--surface-2); color: var(--ink); text-align: left; cursor: pointer; }
.apl-tab span { display: flex; flex-direction: column; min-width: 0; }
.apl-tab b { font-size: 14px; }
.apl-tab small { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apl-tab.on { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.apl-tab.dirty::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.apl-layout { display: grid; grid-template-columns: minmax(420px, 560px) minmax(0, 1fr); gap: 18px; align-items: start; }
.apl-editor { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-bottom: 80px; }
.apl-editor .apl-grid { grid-template-columns: 1fr; }
.apl-preview { position: sticky; top: calc(var(--topbar-h) + 12px); display: flex; flex-direction: column; gap: 8px; padding: 10px; height: calc(100vh - var(--topbar-h) - 100px); min-height: 480px; overflow: hidden; }
.apl-pv-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.apl-pv-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-muted); }
.apl-pv-bar select { height: 32px; padding: 0 8px; font-size: 13px; width: auto; }
.apl-seg { display: inline-flex; border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden; }
.apl-seg button { display: grid; place-items: center; width: 32px; height: 30px; border: 0; background: transparent; color: var(--ink-muted); cursor: pointer; }
.apl-seg button.on { background: var(--ink); color: var(--bg); }
.apl-pv-note { font-size: 12.5px; color: var(--sky-ink); min-height: 0; }
.apl-pv-note:empty { display: none; }
.apl-frame-box { flex: 1; min-height: 0; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bg); }
.apl-frame { border: 0; display: block; transform-origin: top left; background: var(--bg); }
.apl-pv-hint { display: flex; gap: 6px; align-items: center; color: var(--ink-muted); font-size: 12px; }
.apl-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; padding: 12px 96px 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.apl-dirty { display: inline-flex; align-items: center; gap: 6px; color: var(--warning); font-size: 13px; font-weight: 600; margin-right: auto; }
.apl-intro { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--sky-tint); color: var(--ink); font-size: 13.5px; line-height: 20px; }
.apl-intro > .ic { flex: none; margin-top: 2px; color: var(--sky-ink); }
.apl-intro code { font-size: 12px; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--hairline); }
.apl-sec2 { border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-2); }
.apl-sec2 > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
.apl-sec2 > summary::-webkit-details-marker { display: none; }
.apl-sec2 > summary span { display: flex; flex-direction: column; }
.apl-sec2 > summary small { color: var(--ink-muted); font-size: 12.5px; }
.apl-sec2[open] > summary > .ic { transform: rotate(180deg); }
.apl-sec-body { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.apl-sec-foot { display: flex; justify-content: flex-end; }
.apl-f { margin: 0; }
.apl-hint { color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.apl-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.apl-3col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.apl-sub { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--surface); }
.apl-sub h4 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.apl-row > span:first-child small { display: block; color: var(--ink-muted); font-size: 11.5px; font-weight: 400; }
.apl-num { width: 120px; flex: none; }
.apl-icon-pick { position: relative; display: flex; flex-direction: column; gap: 4px; }
.apl-icon-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: 13px; }
.apl-icon-btn span { flex: 1; text-align: left; color: var(--ink-muted); }
.apl-icon-btn.on { border-color: var(--accent); box-shadow: var(--focus); }
.apl-icon-grid { position: absolute; z-index: 20; top: 64px; left: 0; width: min(340px, 90vw); max-height: 260px; overflow: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--elevated); box-shadow: var(--shadow-lg); }
.apl-icon-grid input { grid-column: 1 / -1; height: 34px; margin-bottom: 4px; }
.apl-icon-grid button { display: grid; place-items: center; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
.apl-icon-grid button:hover { background: var(--surface); }
.apl-icon-grid button.on { border-color: var(--accent); background: var(--sky-tint); }
.apl-colors { display: flex; flex-direction: column; gap: 4px; }
.apl-colors > div { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 40px; }
.apl-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface-2); outline: 1px solid var(--hairline); background: linear-gradient(145deg, var(--c1), var(--c2)); cursor: pointer; }
.apl-sw.on { outline: 2px solid var(--ink); }
.apl-item { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--surface-2); }
.apl-item.hidden { opacity: .65; }
.apl-item-h { display: flex; align-items: center; gap: 8px; }
.apl-item-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.apl-item-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface); }
.apl-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--ink-muted); }
.apl-tag.custom { background: var(--sky-tint); color: var(--sky-ink); }
.apl-move { display: inline-flex; }
.apl-move .icon-btn { width: 28px; height: 28px; }
.apl-sub-vals { display: flex; flex-direction: column; gap: 8px; }
.apl-val { display: grid; grid-template-columns: auto 90px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.apl-packs { display: flex; flex-direction: column; gap: 12px; }
.apl-pack { padding: 14px; display: flex; flex-direction: column; gap: 12px; overflow: visible; border-left: 4px solid var(--g2, var(--hairline)); }
.apl-pack.inactive { opacity: .75; }
.apl-pack > header { display: flex; align-items: center; gap: 8px; }
.apl-pack-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.apl-pack-t small { color: var(--ink-muted); font-size: 12px; }
.apl-pack-body { display: flex; flex-direction: column; gap: 12px; }
.apl-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--warning-tint); color: var(--warning); font-size: 13px; line-height: 18px; }
.apl-warn .ic { flex: none; margin-top: 1px; }
.apl-add-row { display: flex; align-items: center; gap: 12px; }
.apl-empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.apl-flash { animation: aplflash 1.3s; }
@keyframes aplflash { 0% { box-shadow: 0 0 0 4px rgba(77,178,236,.55); } 100% { box-shadow: 0 0 0 0 rgba(77,178,236,0); } }
@media (max-width: 1180px) { .apl-layout { grid-template-columns: 1fr; } .apl-preview { position: relative; top: 0; height: 75vh; order: -1; } }
@media (max-width: 640px) { .apl-tabs { grid-template-columns: 1fr; } .apl-2col, .apl-3col { grid-template-columns: 1fr; } }

/* Usuários: pacotes de IA no cadastro */
.uc-credits { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-md); background: var(--surface); }
.uc-credits h4 { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.uc-lot { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--hairline); font-size: 13px; }
.uc-lot > div { flex: 1; min-width: 0; }
.uc-lot small { display: block; color: var(--ink-muted); font-size: 12px; }
.uc-lot.off { opacity: .6; }
.uc-grant { display: flex; gap: 8px; }
.uc-grant select { flex: 1; }

/* ---------- Reiniciar o Controle com o SGO (Administrador, uma vez) ---------- */
.menu-item.danger, .menu-item.danger .ic { color: var(--danger); }
.sgo-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sgo-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--r-md); }
.sgo-steps li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sgo-steps small { font-size: 12px; line-height: 17px; color: var(--ink-muted); overflow-wrap: anywhere; }
.sgo-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--ink-muted); }
.sgo-steps li.is-run { border-color: var(--ink); }
.sgo-steps li.is-run .sgo-dot { background: var(--ink); color: var(--bg); animation: sgo-pulse 1.2s ease-in-out infinite; }
.sgo-steps li.is-done .sgo-dot { background: var(--success-tint); color: var(--success); }
.sgo-steps li.is-fail { border-color: var(--danger); }
.sgo-steps li.is-fail .sgo-dot { background: var(--danger-tint); color: var(--danger); }
.sgo-steps li.is-fail small { color: var(--danger); }
@keyframes sgo-pulse { 50% { opacity: .55; } }
.sgo-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); font-size: 13px; line-height: 19px; }
.sgo-box > strong { display: flex; align-items: center; gap: 6px; }
.sgo-msg { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; line-height: 19px; }
.sgo-msg.ok { background: var(--success-tint); color: var(--success); }
.sgo-msg.bad { background: var(--danger-tint); color: var(--danger); }
.sgo-confirm .input { font-family: var(--mono, ui-monospace, monospace); letter-spacing: .04em; }

/* Projeto de testes (zsfranquias-dev) — faixa fixa para não confundir com o sistema oficial */
.env-test-badge { position: fixed; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2147483000; pointer-events: none;
  background: #E0B400; color: #1A1400; font: 700 11px/1 'Inter Tight', Arial, sans-serif; letter-spacing: .12em; padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); }
html.env-test body { box-shadow: inset 0 3px 0 #E0B400; }

/* Protocolos → Criar negócio: área que recebe a cotação por e-mail (operacao/areas.js) */
.op-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border: 0; padding: 0; margin: 6px 0 0; }
.op-area { position: relative; display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); cursor: pointer; font-size: 14px; font-weight: 500; transition: border-color .15s, background .15s; }
.op-area input { position: absolute; opacity: 0; pointer-events: none; }
.op-area span::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; border: 2px solid var(--ink-muted); box-sizing: border-box; }
.op-area:hover { border-color: var(--border-strong); }
.op-area:has(input:checked) { border-color: var(--accent, #4DB2EC); background: var(--surface); }
.op-area:has(input:checked) span::before { border: 4px solid var(--accent, #4DB2EC); }
.op-area:has(input:focus-visible) { outline: 2px solid var(--accent, #4DB2EC); outline-offset: 2px; }
@media (max-width: 560px) { .op-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.op-area-sent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.op-area-sent > span { display: inline-flex; align-items: center; gap: 5px; }
.op-area-sent em { font-style: normal; font-weight: 600; cursor: help; }
