@font-face { font-family: "Sora"; src: url("fonts/sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@property --shift { syntax: "<length>"; inherits: true; initial-value: 0px; }

:root {
  color-scheme: dark;
  --bg: #07040a;
  --bg-raised: #120a13;
  --glass: rgba(26, 14, 26, .58);
  --glass-strong: rgba(22, 12, 22, .86);
  --line: rgba(255, 214, 234, .11);
  --line-strong: rgba(255, 214, 234, .22);
  --text: #fdf3f8;
  --text-2: #c9b6c1;
  --text-3: #9b8793;
  --pink-200: #ffc4df;
  --pink-300: #ff9ccb;
  --pink-400: #ff6bb0;
  --pink-500: #ff2e93;
  --pink-700: #a50d5e;
  --on-pink: #1a0410;
  --grad: linear-gradient(120deg, #ffa6d0 0%, #ff5aa8 48%, #ff2e93 100%);
  --good: #6ee7b0;
  --warn: #ffc56e;
  --bad: #ff8080;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--pink-300); outline-offset: 2px; }
::selection { background: rgba(255, 46, 147, .45); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Fundo ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: -1; background: radial-gradient(120% 90% at 100% 0%, #1b0716 0%, var(--bg) 58%); }
.aurora::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(80% 70% at 40% 40%, #000, transparent); }
.aurora-blob { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.aurora-a { width: 46vmax; height: 46vmax; left: -14vmax; top: -18vmax; background: #ff2e93; opacity: .2; animation: drift-a 26s ease-in-out infinite alternate; }
.aurora-b { width: 38vmax; height: 38vmax; right: -12vmax; bottom: -16vmax; background: #a3125f; opacity: .3; animation: drift-b 32s ease-in-out infinite alternate; }
.aurora-c { width: 24vmax; height: 24vmax; left: 34%; top: 46%; background: #ff74b8; opacity: .08; animation: drift-c 22s ease-in-out infinite alternate; }
.aurora-cursor { display: none; }
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vmax, -9vmax) scale(.9); } }
@keyframes drift-c { to { transform: translate(-16vmax, -12vmax) scale(1.3); } }

body.is-login .aurora-a { opacity: .42; }
body.is-login .aurora-b { opacity: .5; }
body.is-login .aurora-c { opacity: .2; }
body.is-login .aurora-cursor { display: block; position: absolute; left: 0; top: 0; width: 44vmax; height: 44vmax; margin: -22vmax 0 0 -22vmax; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 90, 170, .2), transparent); transform: translate(var(--mx, 30vw), var(--my, 50vh)); transition: transform .5s var(--ease); }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 32vw); animation: fade .5s ease both; }
.login.is-leaving { animation: leave .38s ease both; }
@keyframes fade { from { opacity: 0; } }
@keyframes leave { to { opacity: 0; transform: scale(1.015); } }

.login-stage { position: relative; display: flex; align-items: center; padding: clamp(32px, 6vw, 96px); overflow: hidden; }
.login-ring { position: absolute; left: 34%; top: 50%; border-radius: 50%; pointer-events: none; padding: 1px; background: conic-gradient(from 0deg, transparent 0 58%, rgba(255, 107, 176, .75) 78%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: spin 22s linear infinite; }
.login-ring-a { width: 62vmin; height: 62vmin; margin: -31vmin 0 0 -31vmin; }
.login-ring-b { width: 92vmin; height: 92vmin; margin: -46vmin 0 0 -46vmin; animation-duration: 38s; animation-direction: reverse; opacity: .5; }
.login-ring-c { width: 124vmin; height: 124vmin; margin: -62vmin 0 0 -62vmin; animation-duration: 56s; opacity: .25; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand-hero { position: relative; z-index: 1; font-family: var(--display); font-weight: 700; letter-spacing: -.035em; line-height: 1.06; font-size: min(calc(50vw / (var(--chars, 13) * .66)), 7.4rem); animation: shift 11s linear infinite; }
@keyframes shift { to { --shift: 1600px; } }
.brand-glow { position: absolute; inset: 0; color: var(--pink-500); filter: blur(.42em); opacity: .55; pointer-events: none; animation: glow 5s ease-in-out 1.6s infinite alternate, glow-in 1.8s ease both; }
@keyframes glow { to { opacity: .28; } }
@keyframes glow-in { from { opacity: 0; } }
.brand-line { display: block; white-space: nowrap; }
.brand-word { display: inline-block; white-space: nowrap; }
.brand-word + .brand-word { margin-left: .26em; }
.brand-letter { display: inline-block; padding-bottom: .08em; color: transparent; background-image: linear-gradient(100deg, #ffffff 0%, #ffd6e9 18%, #ff8cc4 36%, #ff2e93 52%, #ff8cc4 68%, #ffd6e9 84%, #ffffff 100%); background-size: 1600px 100%; background-position-x: calc(var(--shift) - var(--x, 0px)); -webkit-background-clip: text; background-clip: text; animation: letter-in 1s var(--ease) calc(var(--i) * 42ms + 200ms) backwards, letter-wave 7s ease-in-out calc(var(--i) * 70ms + 2.4s) infinite; }
@keyframes letter-in { from { opacity: 0; transform: translateY(.55em) rotateX(-55deg); filter: blur(14px); } }
@keyframes letter-wave { 0%, 12%, 100% { transform: none; } 6% { transform: translateY(-.045em); } }
.brand-rule { position: relative; display: block; width: min(38%, 240px); height: 3px; margin-top: .34em; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .1); transform-origin: left; animation: rule-in 1.1s var(--ease) 1.2s backwards; }
.brand-rule::after { content: ""; position: absolute; inset: 0; width: 45%; background: var(--grad); border-radius: 3px; animation: rule-run 3.6s ease-in-out 2s infinite alternate; }
@keyframes rule-in { from { transform: scaleX(0); opacity: 0; } }
@keyframes rule-run { to { transform: translateX(122%); } }

.login-panel { position: relative; z-index: 2; display: flex; align-items: center; padding: clamp(28px, 4vw, 56px); background: linear-gradient(170deg, rgba(40, 16, 32, .62), rgba(12, 6, 13, .74)); border-left: 1px solid var(--line); backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3); box-shadow: -40px 0 90px -50px rgba(255, 46, 147, .55); animation: panel-in .9s var(--ease) .15s backwards; }
.login-panel::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, var(--pink-400), transparent); }
@keyframes panel-in { from { opacity: 0; transform: translateX(36px); } }
.login-form { width: 100%; max-width: 380px; margin-inline: auto; display: grid; gap: 18px; }
.login-form h2 { font-size: 1.75rem; margin-bottom: 10px; }
.login-form .btn { margin-top: 8px; height: 50px; font-size: 15px; }
.login-form.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- Formulários ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--pink-300); }
.input { width: 100%; height: 44px; padding: 0 14px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); border-radius: var(--r-s); transition: border-color .15s, background .15s, box-shadow .15s; outline: none; }
textarea.input { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; }
select.input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23ff9ccb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select.input option { background: var(--bg-raised); color: var(--text); }
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: var(--line-strong); }
.input:focus { border-color: var(--pink-400); background: rgba(255, 107, 176, .07); box-shadow: 0 0 0 3px rgba(255, 46, 147, .2); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.field-note { font-size: 12.5px; color: var(--warn); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .btn-icon { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.input-lead { position: relative; flex: 1 1 280px; min-width: 0; }
.input-lead svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-lead .input { padding-left: 40px; }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-s); background: rgba(255, 128, 128, .1); border: 1px solid rgba(255, 128, 128, .35); color: #ffd2d2; font-size: 14px; }
.form-error svg { margin-top: 2px; color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .05); font-weight: 650; font-size: 14px; white-space: nowrap; cursor: pointer; text-decoration: none; transition: transform .15s var(--ease), background .15s, border-color .15s, box-shadow .2s, filter .15s; }
.btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 214, 234, .36); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { border: 0; color: var(--on-pink); font-weight: 750; background: var(--grad); box-shadow: 0 10px 28px -12px rgba(255, 46, 147, .9), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 14px 34px -12px rgba(255, 46, 147, 1), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-danger { color: #ffb4b4; border-color: rgba(255, 128, 128, .35); }
.btn-danger:hover { background: rgba(255, 128, 128, .13); border-color: rgba(255, 128, 128, .6); }
.btn-solid-danger { border: 0; background: #ff6f6f; color: #260404; font-weight: 750; }
.btn-solid-danger:hover { background: #ff8a8a; }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: var(--r-s); background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; flex: none; }
.btn-icon:hover { background: rgba(255, 255, 255, .09); color: var(--text); }
.btn-icon.danger:hover { background: rgba(255, 128, 128, .14); color: var(--bad); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* ---------- Estrutura ---------- */
.shell { min-height: 100dvh; display: grid; grid-template-columns: 256px minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; background: linear-gradient(180deg, rgba(34, 14, 28, .6), rgba(10, 5, 11, .6)); border-right: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px; text-decoration: none; min-width: 0; }
.mark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; font: 700 15px var(--display); letter-spacing: -.03em; color: var(--on-pink); background: var(--grad); box-shadow: 0 8px 22px -8px rgba(255, 46, 147, .9); }
.side-name { font: 600 14px/1.25 var(--display); letter-spacing: -.01em; min-width: 0; overflow-wrap: anywhere; }
.nav { display: grid; gap: 4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--r-s); color: var(--text-2); font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: linear-gradient(90deg, rgba(255, 46, 147, .24), rgba(255, 46, 147, .05)); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: var(--grad); }
.nav a[aria-current="page"] svg { color: var(--pink-300); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.side-user { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-top { display: none; }

.main { min-width: 0; padding: clamp(20px, 3vw, 40px); }
.page { max-width: 1240px; margin-inline: auto; display: grid; gap: 22px; animation: page-in .4s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.page-head h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); outline: none; min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; justify-self: start; }
.back:hover { color: var(--pink-300); }

.card { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-l); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-head h2 { font-size: 1.05rem; }
.link { color: var(--pink-300); font-weight: 650; font-size: 13.5px; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Painel ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; overflow: hidden; transition: transform .25s var(--ease), border-color .2s; text-decoration: none; display: block; }
a.stat:hover { transform: translateY(-3px); border-color: rgba(255, 107, 176, .42); }
.stat::before { content: ""; position: absolute; right: -32px; top: -32px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 46, 147, .3), transparent); pointer-events: none; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.stat-label svg { color: var(--pink-300); }
.stat-value { margin-top: 10px; font: 600 clamp(1.6rem, 2.6vw, 2.25rem)/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: 4px; min-height: 20px; color: var(--text-3); font-size: 13px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: start; }
.bars { display: grid; gap: 14px; }
.bar-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.bar-name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; margin-top: 6px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--grad); animation: bar-in .8s var(--ease) backwards; transform-origin: left; }
@keyframes bar-in { from { transform: scaleX(0); } }

/* ---------- Listas ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar select.input { flex: 0 1 210px; width: auto; min-width: 150px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { height: 36px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 650; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: rgba(255, 46, 147, .24); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 107, 176, .45); }
.count { color: var(--text-3); font-size: 13.5px; font-variant-numeric: tabular-nums; }

.emp-table { overflow: hidden; }
.emp-row { display: grid; grid-template-columns: minmax(220px, 2.6fr) minmax(110px, 1.4fr) minmax(100px, 1fr) 90px 100px 20px; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); text-decoration: none; transition: background .15s; }
.emp-row:first-child { border-top: 0; }
a.emp-row:hover { background: rgba(255, 46, 147, .08); }
a.emp-row:hover .row-go { color: var(--pink-300); transform: translateX(3px); }
.emp-head { padding-block: 10px; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.emp-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.emp-who > div { min-width: 0; }
.emp-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-sub { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-cell { color: var(--text-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-docs { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.row-go { color: var(--text-3); transition: transform .15s, color .15s; }

.avatar { position: relative; width: 42px; height: 42px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font: 600 14px var(--display); color: var(--pink-200); background: linear-gradient(140deg, rgba(255, 46, 147, .36), rgba(120, 16, 74, .5)); box-shadow: inset 0 0 0 1px rgba(255, 156, 203, .3); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 112px; height: 112px; font-size: 34px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: rgba(255, 255, 255, .07); color: var(--text-2); }
.badge.good { background: rgba(110, 231, 176, .12); color: var(--good); }
.badge.warn { background: rgba(255, 197, 110, .13); color: var(--warn); }
.badge.bad { background: rgba(255, 128, 128, .14); color: var(--bad); }
.badge.busy { background: rgba(255, 107, 176, .15); color: var(--pink-300); }
.badge.busy svg { animation: spin 1.4s linear infinite; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.doc-list { display: grid; }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-top: 1px solid var(--line); min-width: 0; }
.doc-item:first-child { border-top: 0; }
.doc-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-s); }
.doc-open:hover .doc-name { color: var(--pink-300); }
.doc-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; color: var(--pink-300); background: rgba(255, 46, 147, .13); box-shadow: inset 0 0 0 1px rgba(255, 107, 176, .2); }
.doc-text { min-width: 0; flex: 1; }
.doc-name { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.doc-meta { display: block; color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-snippet { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--text-2); font-size: 13px; margin-top: 2px; }
.doc-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.more { display: flex; justify-content: center; padding-top: 6px; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; text-align: center; }
.empty-icon { width: 60px; height: 60px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 18px; color: var(--pink-300); background: rgba(255, 46, 147, .12); box-shadow: inset 0 0 0 1px rgba(255, 107, 176, .24), 0 0 44px -8px rgba(255, 46, 147, .6); }
.empty h3 { font-size: 1.05rem; }
.empty p { color: var(--text-3); max-width: 38ch; }
.empty .btn { margin-top: 10px; }
.error-state { text-align: center; padding: 36px 20px; display: grid; gap: 12px; justify-items: center; color: var(--text-2); }

.skeleton { border-radius: var(--r-s); min-height: 16px; background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 156, 203, .12), rgba(255, 255, 255, .05)); background-size: 200% 100%; animation: sheen 1.4s linear infinite; }
@keyframes sheen { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-stack { display: grid; gap: 12px; }

/* ---------- Ficha ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 24px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 140% at 0% 0%, rgba(255, 46, 147, .24), transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero-photo { position: relative; display: grid; justify-items: center; gap: 4px; }
.photo-btn { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; position: relative; display: block; }
.photo-btn .photo-over { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 4, 10, .62); opacity: 0; transition: opacity .15s; color: #fff; }
.photo-btn:hover .photo-over, .photo-btn:focus-visible .photo-over { opacity: 1; }
.photo-remove { background: none; border: 0; color: var(--text-3); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.photo-remove:hover { color: var(--bad); }
.hero-info { flex: 1 1 240px; min-width: 0; display: grid; gap: 8px; justify-items: start; }
.hero-info h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); overflow-wrap: anywhere; outline: none; }
.hero-sub { color: var(--text-2); overflow-wrap: anywhere; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ficha-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: start; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fact dt { color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.fact dd { overflow-wrap: anywhere; font-weight: 600; }
.fact dd.none { color: var(--text-3); font-weight: 500; }
.fact.span-2 { grid-column: 1 / -1; }
.fact dd.notes { white-space: pre-wrap; font-weight: 500; color: var(--text-2); }

.drop { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; margin-bottom: 8px; border-radius: var(--r-m); border: 1.5px dashed rgba(255, 156, 203, .3); background: rgba(255, 46, 147, .05); transition: border-color .15s, background .15s; }
.drop.is-over { border-color: var(--pink-400); background: rgba(255, 46, 147, .16); }
.drop-text { flex: 1 1 200px; min-width: 0; }
.drop-title { font-weight: 700; }
.drop-note { color: var(--text-3); font-size: 13px; }
.drop select.input { width: 190px; flex: 0 1 190px; }
.upload-rows { display: grid; gap: 6px; margin-bottom: 8px; }
.upload-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-s); background: rgba(255, 255, 255, .05); font-size: 13.5px; }
.upload-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Janelas ---------- */
dialog { color: var(--text); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-l); background: linear-gradient(165deg, rgba(38, 16, 32, .96), rgba(13, 7, 14, .97)); box-shadow: 0 40px 100px -24px #000, 0 0 90px -40px rgba(255, 46, 147, .7); width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; animation: dialog-in .28s var(--ease); }
dialog::backdrop { background: rgba(5, 2, 6, .68); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.15rem; min-width: 0; overflow-wrap: anywhere; }
.dialog-body { padding: 20px 22px; overflow-y: auto; display: grid; gap: 16px; }
.dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
dialog form { display: contents; }
.dialog-confirm { width: min(440px, calc(100vw - 24px)); }
.confirm-text { color: var(--text-2); overflow-wrap: anywhere; }
.confirm-text strong { color: var(--text); }
.dialog-doc { width: min(1160px, calc(100vw - 24px)); height: calc(100dvh - 24px); }
.doc-view { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.doc-preview { min-height: 0; display: grid; place-items: center; overflow: auto; background: rgba(0, 0, 0, .35); border-right: 1px solid var(--line); }
.doc-preview img { max-height: 100%; object-fit: contain; }
.doc-preview iframe { width: 100%; height: 100%; border: 0; background: #2a2a2e; }
.doc-side { min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; overflow: hidden; }
.doc-side-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.doc-side h3 { font-size: .98rem; }
.doc-body { flex: 1; min-height: 120px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; border-radius: var(--r-m); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; line-height: 1.6; }
.doc-hint { color: var(--text-3); font-size: 12.5px; }
.doc-tools { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Ajustes ---------- */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.stack { display: grid; gap: 14px; }
.settings form { display: grid; gap: 14px; }
.settings .btn { justify-self: start; }
.state-list { display: grid; gap: 12px; }
.state-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.state-row span:first-child { color: var(--text-2); }

/* ---------- Avisos ---------- */
.toasts { position: fixed; inset: auto 18px 18px auto; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible; gap: 10px; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toasts:popover-open { display: grid; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-m); background: rgba(30, 14, 26, .94); border: 1px solid var(--line-strong); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-weight: 600; font-size: 14px; animation: toast-in .3s var(--ease); overflow-wrap: anywhere; }
.toast svg { margin-top: 2px; color: var(--pink-300); }
.toast.bad svg { color: var(--bad); }
.toast.good svg { color: var(--good); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

.boot { min-height: 100dvh; display: grid; place-items: center; color: var(--pink-300); }
.boot .spinner { width: 28px; height: 28px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emp-row { grid-template-columns: minmax(200px, 2.4fr) minmax(100px, 1.2fr) 80px 96px 20px; }
  .emp-col-dept { display: none; }
}
@media (max-width: 1040px) {
  .dash-grid, .ficha-grid, .settings { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(34vh, auto) auto; }
  .login-stage { padding: 40px 24px 28px; justify-content: center; }
  .login-ring { left: 50%; }
  .brand-hero { font-size: min(calc(86vw / (var(--chars, 13) * .66)), 5rem); text-align: center; }
  .brand-rule { margin-inline: auto; }
  .login-panel { align-items: flex-start; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -30px 70px -40px rgba(255, 46, 147, .55); padding: 28px 24px calc(28px + env(safe-area-inset-bottom)); }
  .login-panel::before { display: none; }

  .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .side { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; top: auto; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: rgba(13, 7, 14, .9); }
  .side-brand, .side-foot { display: none; }
  .nav { flex: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
  .nav a { flex-direction: column; justify-content: center; gap: 2px; height: 52px; padding: 0 2px; font-size: 11.5px; }
  .nav a[aria-current="page"]::before { display: none; }
  .mobile-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(13, 7, 14, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
  .mobile-top .mark { width: 32px; height: 32px; font-size: 12px; border-radius: 10px; }
  .mobile-top .side-name { flex: 1; font-size: 13.5px; }
  .main { padding: 18px 16px 24px; }
  .toasts { inset: auto 16px calc(76px + env(safe-area-inset-bottom)) auto; width: calc(100vw - 32px); }

  .emp-head { display: none; }
  .emp-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
  .emp-col-role, .emp-col-dept, .emp-col-docs, .row-go { display: none; }
  .doc-view { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .doc-preview { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero { padding: 20px; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .page-head .btn-primary, .toolbar select.input { flex: 1 1 100%; width: 100%; }
  .drop select.input { width: 100%; flex: 1 1 100%; }
  .drop .btn { flex: 1 1 100%; }
  .hero-actions, .hero-actions .btn { flex: 1 1 auto; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact.span-2 { grid-column: auto; }
  .doc-item { flex-wrap: wrap; }
  .doc-open { flex: 1 1 100%; }
  .doc-actions { margin-left: auto; }
  .dialog-foot .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
