/* ConectDP - Departamento Pessoal (PWA) */
:root {
  --bg: #f4f3fa;
  --card: #ffffff;
  --ink: #1b1830;
  --ink-2: #4b4766;
  --ink-3: #85809e;
  --line: #e4e1f0;
  --nav: #1c1538;
  --nav-2: #2a2150;
  --accent: #7c5cff;
  --accent-2: #a28bff;
  --accent-bg: #efebff;
  --blue: #3b6cf5;
  --ok: #12925a;
  --ok-bg: #dcf6e9;
  --warn: #b26a00;
  --warn-bg: #fff0d1;
  --err: #d0342c;
  --err-bg: #fde4e2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(30, 20, 70, .05), 0 4px 14px rgba(30, 20, 70, .06);
  --shadow-lg: 0 10px 30px rgba(30, 20, 70, .14);
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { overflow-x: hidden; }
body { font-size: 15px; line-height: 1.4; overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.err { color: var(--err); }

/* paleta dos avisos */
.c-red { --c: #e5484d; --cb: #fdecec; }
.c-amber { --c: #e08a00; --cb: #fff3d6; }
.c-orange { --c: #f06b1d; --cb: #ffeadc; }
.c-violet { --c: #7c5cff; --cb: #efebff; }
.c-blue { --c: #3b6cf5; --cb: #e6edff; }
.c-pink { --c: #e0457b; --cb: #fde6ef; }
.c-slate { --c: #5b6478; --cb: #eceff4; }
.c-green { --c: #16a36b; --cb: #ddf6ea; }

/* ---------- casca ---------- */
.shell { display: flex; min-height: 100%; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side { display: none; }
@media (min-width: 1000px) {
  .side {
    display: flex; flex-direction: column; width: 256px; flex: none; position: sticky; top: 0; height: 100vh;
    background: var(--nav); color: #e9e5ff; padding: 18px 12px 12px; gap: 6px;
    background-image: radial-gradient(500px 300px at -20% -10%, rgba(124, 92, 255, .35), transparent 60%);
  }
  .only-m { display: none !important; }
  .tabbar { display: none !important; }
  main { padding-bottom: 40px !important; }
  .fab { bottom: 28px !important; }
  .actionbar { left: 256px !important; }
}
.side-brand { display: flex; gap: 10px; align-items: center; padding: 2px 8px 14px; }
.side-brand b { display: block; font-size: 17px; color: #fff; }
.side-brand span { font-size: 12px; opacity: .65; }
.emp-sel { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); color: #fff; border-radius: 12px; padding: 9px 10px; cursor: pointer; font-size: 13px; text-align: left; margin-bottom: 8px; }
.emp-sel svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: #d4cdf7; font-weight: 550; }
.side nav a svg { width: 20px; height: 20px; opacity: .85; }
.side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a.on { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(124, 92, 255, .45); }
.side-foot button { display: flex; align-items: center; gap: 10px; width: 100%; background: rgba(255, 255, 255, .06); border: 0; color: #fff; border-radius: 12px; padding: 8px 10px; cursor: pointer; text-align: left; }
.side-foot small { display: block; opacity: .6; font-size: 11.5px; }
.side-foot svg { width: 18px; height: 18px; opacity: .7; }
.nb { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #ff4d5e; color: #fff; font-size: 11px; font-weight: 800; font-style: normal; line-height: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.0); }
.nc { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #ece9f7; color: var(--ink-2); font-size: 11px; font-weight: 700; font-style: normal; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  background: rgba(244, 243, 250, .86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px; border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.topbar h1 { font-size: 19px; margin: 0; font-weight: 750; letter-spacing: -.2px; }
.topbar .sub { font-size: 12.5px; color: var(--ink-3); }
.icon-btn { position: relative; border: 0; background: transparent; color: inherit; cursor: pointer; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: rgba(124, 92, 255, .1); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.sino .nb { position: absolute; top: 2px; right: 0; transform: scale(.9); }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #8f74ff, #5b3df5); color: #fff; display: grid; place-items: center; font-weight: 850; font-size: 14px; flex: none; box-shadow: 0 6px 16px rgba(124, 92, 255, .4); letter-spacing: .5px; }

/* ---------- barra inferior (celular) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b));
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-3); font-size: 11px; font-weight: 650; padding: 4px 0; position: relative; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.on { color: var(--accent); }
.tabbar .tb { position: absolute; top: -2px; left: 50%; margin-left: 6px; }
.tabbar .tb .nb { min-width: 18px; height: 18px; font-size: 10px; }

/* ---------- drawer ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(20, 12, 50, .45); z-index: 40; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); z-index: 41; background: var(--nav); color: #e9e5ff; padding: calc(env(safe-area-inset-top, 0px) + 16px) 10px 16px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; animation: dr .18s ease-out; }
@keyframes dr { from { transform: translateX(-30px); opacity: .5; } }
.drawer .who { display: flex; gap: 10px; align-items: center; padding: 4px 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 8px; }
.drawer .who b { display: block; font-size: 16px; color: #fff; }
.drawer a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: inherit; }
.drawer a.emp { background: rgba(255, 255, 255, .06); margin-bottom: 6px; font-size: 13px; }
.drawer a:hover, .drawer a.active { background: var(--nav-2); }
.drawer a svg { width: 20px; height: 20px; opacity: .85; }
.drawer .sep { flex: 1; }

/* ---------- layout ---------- */
main { padding: 14px 14px calc(96px + var(--safe-b)); width: 100%; max-width: 1240px; margin: 0 auto; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border: 1px solid rgba(30, 20, 70, .05); }
.card + .card { margin-top: 12px; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
@media (min-width: 900px) { .cols2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cols2 > *, .dados-grid > *, .epi-grid > *, .crit-grid > * { min-width: 0; }
.cols2 > .card + .card { margin-top: 0; }
.sec-h { display: flex; align-items: center; gap: 10px; margin: 22px 2px 10px; }
.sec-h h3 { margin: 0; font-size: 15.5px; font-weight: 750; flex: 1; display: flex; gap: 8px; align-items: center; }
.sec-h h3 svg { width: 18px; height: 18px; color: var(--accent); }
.sec-h.in { margin: 0 0 12px; }
.sec-h a { font-size: 13px; font-weight: 650; }

/* ---------- avatar ---------- */
.av {
  --s: 40px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: hsl(var(--h, 262) 70% 92%); color: hsl(var(--h, 262) 55% 36%); background-size: cover; background-position: center 25%;
  font-weight: 750; font-size: calc(var(--s) * .38); letter-spacing: .3px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(30, 20, 70, .15);
}
.av.has .ini { visibility: hidden; }
.av.sm { --s: 30px; }
.av.md { --s: 44px; }
.av.lg { --s: 58px; }
.av.xl { --s: 84px; border-width: 3px; }
.av.xxl { --s: 112px; border-width: 4px; }
.av.more { background: #ece9f7; color: var(--ink-2); font-size: 11px; }
.av .dot { position: absolute; right: 2%; bottom: 2%; width: 26%; height: 26%; min-width: 10px; min-height: 10px; border-radius: 50%; border: 2px solid #fff; }
.av .dot.err { background: #ff4d5e; animation: pulso 1.6s infinite; }
.av .dot.warn { background: #f5a524; }
.av .dot.green { background: #22c55e; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 94, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 77, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } }
.stack-av { display: flex; margin-top: 10px; }
.stack-av .av { margin-left: -8px; }
.stack-av .av:first-child { margin-left: 0; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #eeecf6; color: var(--ink-2); white-space: nowrap; }
.badge.ok, .badge.green { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.blue { background: #e6edff; color: var(--blue); }
.badge.orange { background: #ffeadc; color: #c4500f; }
.badge.violet { background: var(--accent-bg); color: #5b3df5; }
.badge.pink { background: #fde6ef; color: #c02a62; }
.badge.slate { background: #eceff4; color: #4a5368; }
.badge.pulse { animation: bpulse 1.4s ease-in-out infinite; }
@keyframes bpulse { 50% { transform: scale(1.07); } }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }

/* ---------- painel ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 4px 0 14px; padding: 20px; border-radius: 22px; color: #fff;
  background: radial-gradient(600px 240px at 110% -40%, rgba(255, 255, 255, .25), transparent 60%), linear-gradient(120deg, #5b3df5, #8f5cff 55%, #c05cf0); box-shadow: 0 14px 34px rgba(91, 61, 245, .35); }
.hero-hi { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.hero-sub { opacity: .88; margin-top: 2px; }
.hero-search { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); border-radius: 14px; padding: 0 12px; flex: 1 1 320px; max-width: 460px; }
.hero-search svg { width: 19px; height: 19px; opacity: .85; }
.hero-search input { flex: 1; border: 0; background: transparent; color: #fff; padding: 12px 0; outline: none; font-size: 15px; }
.hero-search input::placeholder { color: rgba(255, 255, 255, .75); }
.banner-aniv { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; margin-bottom: 14px; background: linear-gradient(90deg, #ffe7f1, #fff4d6); border: 1px solid #ffd3e3; }
.banner-aniv .av + .av { margin-left: -14px; }
.btn.ghost-w { background: #fff; color: #128c4a; border: 1px solid #bfe8cf; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpis.sm { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 12px; }
.kpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); color: var(--ink); border: 1px solid rgba(30, 20, 70, .05); transition: transform .12s; }
.kpi:hover { transform: translateY(-2px); }
.kpi .ki { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--cb); color: var(--c); }
.kpi .ki svg { width: 21px; height: 21px; }
.kpi b { font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi > span:last-child { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.av-card { position: relative; display: flex; flex-direction: column; gap: 2px; background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); color: var(--ink); border: 1px solid rgba(30, 20, 70, .05); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.av-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.av-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.av-card .av-ic, .aviso-head .av-ic, .rel .av-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--cb); color: var(--c); }
.av-card .av-ic svg, .aviso-head .av-ic svg, .rel .av-ic svg { width: 22px; height: 22px; }
.av-card .cnt, .aviso-head .cnt { min-width: 34px; height: 34px; padding: 0 9px; border-radius: 99px; background: var(--c); color: #fff; font-weight: 850; font-size: 16px; display: grid; place-items: center; box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 45%, transparent); }
.av-card .okc { width: 28px; height: 28px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; }
.av-card .okc svg { width: 16px; height: 16px; }
.av-card .av-t { font-weight: 750; margin-top: 10px; }
.av-card .av-s { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.av-card .badge { align-self: flex-start; }
.av-card.zero { opacity: .72; }
.av-card.zero::before { background: #d9d5ea; }
.aniv-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.aniv { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; color: var(--ink); scroll-snap-align: start; padding: 8px 4px; border-radius: 14px; }
.aniv b { font-size: 13px; margin-top: 4px; }
.aniv span { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.aniv small { font-size: 11px; color: var(--ink-3); }
.aniv.hoje { background: linear-gradient(180deg, #fff2c9, #ffe3ef); }
.aniv.hoje span { color: #c02a62; }
.aniv.passou { opacity: .55; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 120px 1fr 34px 38px; gap: 8px; align-items: center; color: var(--ink); font-size: 13px; }
.bar .bt { height: 10px; border-radius: 99px; background: #eeecf6; overflow: hidden; }
.bar .bt i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, hsl(var(--h) 75% 62%), hsl(var(--h) 70% 50%)); }
.bar b { text-align: right; }
.bar small { color: var(--ink-3); text-align: right; }
.empty { text-align: center; padding: 34px 10px; color: var(--ink-3); }
.empty.sm { padding: 16px; }
.big-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 50px 16px; }
.big-empty b { color: var(--ink); font-size: 16px; }
.em-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); margin-bottom: 6px; }
.em-ic svg { width: 30px; height: 30px; }
.skel-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.skel { height: 110px; border-radius: 18px; background: linear-gradient(90deg, #ebe8f5 0, #f6f4fc 40%, #ebe8f5 80%); background-size: 600px 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { from { background-position: -300px 0; } to { background-position: 300px 0; } }

/* ---------- chips / abas ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 650; font-size: 13px; white-space: nowrap; cursor: pointer; }
.chip svg { width: 16px; height: 16px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[class*="c-"].on { background: var(--c); border-color: var(--c); }
.chip .nb { margin-left: 2px; }
.chip.on .nb { background: #fff; color: var(--ink); }
.aviso-head { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--cb); margin-bottom: 12px; }
.aviso-head b { font-size: 17px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 16px 0 14px; position: sticky; top: 62px; z-index: 10; background: var(--bg); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 11px 12px; color: var(--ink-3); font-weight: 650; white-space: nowrap; border-bottom: 2.5px solid transparent; font-size: 14px; }
.tabs a svg { width: 17px; height: 17px; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- formularios ---------- */
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); min-width: 0; }
.req { color: var(--err); font-style: normal; }
.inp, select.inp, textarea.inp { width: 100%; border: 1.5px solid #dedbea; background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 16px; min-height: 46px; outline: none; transition: border-color .12s, box-shadow .12s; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, .15); }
.inp.alert { background: #fff3f2; border-color: #f0a19c; }
textarea.inp { min-height: 46px; resize: vertical; }
.inp-group { display: flex; gap: 6px; }
.inp-group .inp { flex: 1; min-width: 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.fgrid .w2 { grid-column: span 2; }
@media (max-width: 460px) { .fgrid { grid-template-columns: 1fr 1fr; } .fgrid .w2 { grid-column: 1 / -1; } }
.fsec { grid-column: 1 / -1; font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .7px; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer; align-self: end; min-height: 46px; }
.chk input { width: 20px; height: 20px; accent-color: var(--accent); }
.fsect h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; font-size: 16px; }
.fsect h3 svg { width: 20px; height: 20px; color: var(--accent); }
.fsect { scroll-margin-top: 80px; }
.form-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.form-head .nm { font-size: 20px; }
.form-head .chips { margin: 10px 0 0; }
.foto-edit { position: relative; border: 0; background: none; padding: 0; cursor: pointer; flex: none; border-radius: 50%; }
.foto-edit .cam { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; border: 3px solid #fff; box-shadow: var(--shadow); }
.foto-edit .cam svg { width: 16px; height: 16px; }
.foto-edit:hover .av { filter: brightness(.95); }

.btn { border: 1px solid transparent; border-radius: 12px; padding: 0 16px; min-height: 44px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #ece9f7; color: var(--ink); white-space: nowrap; transition: filter .12s, transform .06s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(124, 92, 255, .32); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: var(--err); color: #fff; }
.btn.ghost { background: #fff; border-color: var(--line); }
.btn.big { min-height: 52px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.opt { justify-content: flex-start; min-height: 50px; }
.seg { display: flex; background: #e9e6f5; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px 12px; font-weight: 700; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #dedbea; border-radius: 12px; padding: 0 12px; min-height: 46px; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, .15); }
.search svg { width: 19px; height: 19px; color: var(--ink-3); }
.search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; min-width: 0; }

/* ---------- listas ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--card); border-radius: 16px; border: 1px solid rgba(30, 20, 70, .06); box-shadow: var(--shadow); padding: 12px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; position: relative; color: var(--ink); }
.item:hover { border-color: #d6cffa; }
.item.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .18); }
.item .t { font-weight: 720; }
.item .meta { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.item .det { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.item .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.item .side { text-align: right; flex: none; }
.item.aviso .acts .btn { min-height: 36px; }
.chkrow { align-items: center; }
.chkrow input { width: 20px; height: 20px; accent-color: var(--accent); }
.emp-ic, .tl-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); flex: none; }
.emp-ic svg, .tl-ic svg { width: 20px; height: 20px; }
.tl-ic.ok { background: var(--ok-bg); color: var(--ok); }
.tl-ic.warn { background: var(--warn-bg); color: var(--warn); }
.tl-ic.err { background: var(--err-bg); color: var(--err); }
.cod-chip { font: 700 12px ui-monospace, monospace; background: #ece9f7; color: var(--ink-2); padding: 6px 8px; border-radius: 9px; }
.pos { width: 30px; text-align: center; font-weight: 800; font-size: 16px; align-self: center; }

/* cards de funcionario */
.fgrid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.fcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: var(--card); border-radius: 20px; padding: 18px 12px 12px; box-shadow: var(--shadow); color: var(--ink); border: 1px solid rgba(30, 20, 70, .05); transition: transform .12s, box-shadow .12s; overflow: hidden; }
.fcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 52px; background: linear-gradient(120deg, #efe9ff, #f7e9ff); }
.fcard > * { position: relative; }
.fcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.fcard .nm { margin-top: 8px; font-size: 14.5px; line-height: 1.25; }
.fcard .fn { font-size: 12.5px; color: var(--accent); font-weight: 650; }
.fcard .st { font-size: 12px; color: var(--ink-3); }
.fcard .badges { justify-content: center; min-height: 22px; }
.fcard .cod { font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.fcard.dem { opacity: .6; filter: grayscale(.6); }

/* perfil */
.perfil { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 20px; border-radius: 24px; background: linear-gradient(120deg, hsl(var(--h) 85% 96%), #fff 70%); border: 1px solid hsl(var(--h) 60% 90%); box-shadow: var(--shadow); }
.perfil h2 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.perfil .pf-sub { color: var(--ink-2); font-weight: 600; }
.perfil .pf-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.perfil .pf-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.perfil.dem { filter: grayscale(.4); }
.timeline { display: flex; flex-direction: column; gap: 4px; }
.tl { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; color: var(--ink); }
.tl:hover { background: #f6f4fd; }
.tl small { display: block; color: var(--ink-3); font-size: 12px; }
.kvs { display: flex; flex-direction: column; }
.kv { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0eef7; font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-3); min-width: 120px; }
.kv b { font-weight: 600; flex: 1; }
.dados-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .dados-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dados-grid > .card + .card { margin-top: 0; }
.mini-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mini-kpis a { background: #f7f5fd; border-radius: 14px; padding: 12px; color: var(--ink); }
.mini-kpis b { display: block; font-size: 22px; }
.mini-kpis span { font-size: 12px; color: var(--ink-3); }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 14px; }
.spark.lg { height: 130px; }
.spark span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.spark i { width: 100%; max-width: 30px; border-radius: 8px 8px 3px 3px; background: var(--accent); }
.spark small { font-size: 10px; color: var(--ink-3); }
.spark i.ok, .nota.ok { background: #22b871; }
.spark i.blue, .nota.blue { background: var(--blue); }
.spark i.warn, .nota.warn { background: #f5a524; }
.spark i.err, .nota.err { background: #ef4d55; }
.nota { min-width: 42px; height: 32px; padding: 0 8px; border-radius: 10px; display: inline-grid; place-items: center; color: #fff; font-weight: 800; background: #c9c4dc; align-self: center; }
.nota-big { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; align-content: center; font-size: 34px; font-weight: 850; color: #fff; background: #c9c4dc; line-height: 1; }
.nota-big small { font-size: 10px; font-weight: 600; opacity: .9; margin-top: 4px; }
.nota-big.ok { background: linear-gradient(135deg, #2fd38a, #12925a); }
.nota-big.blue { background: linear-gradient(135deg, #6a93ff, #3b6cf5); }
.nota-big.warn { background: linear-gradient(135deg, #ffc35c, #e08a00); }
.nota-big.err { background: linear-gradient(135deg, #ff7a80, #d0342c); }
.epi-grid { display: grid; gap: 10px; }
@media (min-width: 900px) { .epi-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.epi-grid .card + .card { margin-top: 0; }
.epi .acts { display: flex; gap: 6px; margin: 10px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; padding: 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 6px; border-bottom: 1px solid #f0eef7; }
.tbl tr.aberto td { background: #f4fbf7; }
.anexo-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 14px; background: #f7f5fd; border: 1px dashed #d6cffa; }
.dias-at { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-bg); color: #4a2fe0; }
.dias-at b { font-size: 20px; }

/* avaliacao */
.aval-top { display: grid; gap: 14px; }
@media (min-width: 900px) { .aval-top { grid-template-columns: 1.1fr 1.4fr auto; align-items: center; } }
.func-pick { display: flex; gap: 12px; align-items: center; border: 1.5px dashed #d6cffa; background: #faf9ff; border-radius: 16px; padding: 10px 12px; cursor: pointer; text-align: left; }
.func-pick > svg { width: 20px; height: 20px; color: var(--ink-3); }
.media-box { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.crit-grid { display: grid; gap: 10px; margin-top: 12px; }
@media (min-width: 900px) { .crit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.crit-grid .card + .card { margin-top: 0; }
.crit { display: flex; flex-direction: column; gap: 10px; transition: opacity .15s; }
.crit.na { opacity: .6; }
.crit .cn { font: 800 12px ui-monospace, monospace; color: var(--accent); background: var(--accent-bg); padding: 4px 7px; border-radius: 8px; }
.crit input[type=range] { accent-color: var(--accent); height: 28px; }
.crit .na { min-height: 0; font-size: 13px; }
.escala { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.escala button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 0; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.escala button.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* relatorios */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rel { --c: var(--accent); --cb: var(--accent-bg); display: flex; flex-direction: column; gap: 6px; text-align: left; border: 1px solid rgba(30, 20, 70, .06); background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); cursor: pointer; }
.rel:hover { box-shadow: var(--shadow-lg); }
.rel b { font-size: 15.5px; margin-top: 6px; }
.rel span:last-child { font-size: 13px; color: var(--ink-3); }

/* camera */
.cam { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 3/4; background: #000; border-radius: 18px; overflow: hidden; }
.cam.doc { max-width: 720px; aspect-ratio: 4/3; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
.cam-guia { position: absolute; inset: 12% 18% 22%; border: 3px dashed rgba(255, 255, 255, .7); border-radius: 50% 50% 45% 45%; pointer-events: none; }
.cam.doc .cam-guia { inset: 6%; border-radius: 10px; }

/* ---------- barra de acoes / fab ---------- */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + var(--safe-b)); display: flex; gap: 8px; justify-content: center; }
.actionbar > * { flex: 1; max-width: 300px; }
.form-page { padding-bottom: calc(120px + var(--safe-b)); }
.fab { position: fixed; right: 18px; bottom: calc(84px + var(--safe-b)); z-index: 26; width: 60px; height: 60px; border-radius: 20px; border: 0; background: linear-gradient(135deg, #8f74ff, #5b3df5); color: #fff; box-shadow: 0 10px 24px rgba(91, 61, 245, .45); display: grid; place-items: center; cursor: pointer; }
.fab svg { width: 28px; height: 28px; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(20, 12, 50, .5); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 18px 18px calc(16px + var(--safe-b)); animation: up .2s ease-out; }
@media (min-width: 700px) { .modal-bg { align-items: center; } .modal { border-radius: 24px; } }
.modal.wide { max-width: 900px; }
.modal h2 { margin: 0 0 2px; font-size: 19px; }
.modal .mh { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal .mf { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; position: sticky; bottom: calc(-16px - var(--safe-b)); background: #fff; padding: 10px 0 4px; }
.modal .msg { white-space: pre-wrap; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- toast / loading ---------- */
.toasts { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 66px); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 6px; width: min(94vw, 460px); pointer-events: none; }
.toast { background: #221b3d; color: #fff; padding: 12px 15px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 650; animation: up .15s; white-space: pre-wrap; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--err); }
.loading { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(244, 243, 250, .5); }
.spinner { width: 42px; height: 42px; border: 4px solid #ddd6fb; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- login ---------- */
.login-wrap { min-height: 100%; display: grid; grid-template-columns: 1fr; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 0% 0%, #5b3df5 0, #1c1538 60%); }
@media (min-width: 900px) { .login-wrap { grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px; } }
.login-art { display: none; position: relative; color: #fff; max-width: 460px; }
@media (min-width: 900px) { .login-art { display: block; } }
.art-txt h2 { font-size: 44px; margin: 0 0 12px; letter-spacing: -1px; }
.art-txt p { font-size: 17px; opacity: .85; line-height: 1.5; }
.bubble { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; }
.b1 { width: 180px; height: 180px; background: #c05cf0; top: -120px; left: -40px; }
.b2 { width: 90px; height: 90px; background: #ffb86b; bottom: -80px; right: 40px; }
.b3 { width: 50px; height: 50px; background: #5ce1e6; top: -30px; right: 0; }
.login { width: min(410px, 100%); background: #fff; border-radius: 26px; padding: 28px; box-shadow: 0 30px 70px rgba(0, 0, 0, .4); }
.login .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login .logo .brand-mark { width: 50px; height: 50px; font-size: 18px; border-radius: 15px; }
.login h1 { margin: 0; font-size: 24px; }
.login .err { font-weight: 650; min-height: 20px; }

/* login dividido (mesmo esquema do ConectExp) */
.lg { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.lg-arte { background: linear-gradient(150deg, #0c1450 0%, #1b2bb8 55%, #5a2ae6 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; overflow: hidden; }
.lg-arte::after { content: ""; position: absolute; inset: auto -120px -160px auto; width: 520px; height: 520px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .05); }
.lg-arte h1 { font-size: clamp(28px, 3.2vw, 42px); max-width: 16ch; margin: 0; letter-spacing: -.02em; line-height: 1.15; }
.lg-arte p { max-width: 46ch; color: #d3d8ff; font-size: 16px; margin: 0; line-height: 1.5; }
.lg-marca { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.lg-marca img { width: 36px; height: 36px; border-radius: 10px; }
.lg-marca b { font-weight: 800; }
.lg-fluxo { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lg-fluxo li { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 13.5px; }
.lg-fluxo svg { width: 16px; height: 16px; }
.lg-form { display: grid; place-items: center; padding: 32px 20px; }
.lg-card { width: min(420px, 100%); padding: 32px; display: grid; gap: 14px; background: var(--card, #fff); border-radius: 20px; box-shadow: var(--shadow); }
.lg-card h2 { font-size: 26px; margin: 0; }
.lg-card .muted { margin: -6px 0 4px; }
.lg-card .err { font-weight: 600; margin: 0; }
.lg-card .err:empty { display: none; }
.lg-campo { display: grid; gap: 6px; }
.lg-campo > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lg-campo input { height: 46px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; padding: 0 12px; width: 100%; outline: 0; font: inherit; box-sizing: border-box; }
.lg-campo input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, .15); }
.lg-versao { text-align: center; font-size: 12px; margin: 0; }
.lg-mob { display: none; color: var(--ink, #1c1538); }
@media (max-width: 860px) {
  .lg { grid-template-columns: 1fr; }
  .lg-arte { display: none; }
  .lg-mob { display: flex; margin-bottom: 4px; }
  .lg-card { box-shadow: none; background: transparent; padding: 8px 4px; }
  .lg-campo input { height: 50px; font-size: 16px; }
}

/* ---------- impressao ---------- */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  html, body { background: #fff; }
  @page { margin: 10mm; }
}
.pr { font: 11px/1.35 Arial, Helvetica, sans-serif; color: #000; }
.pr h1 { font-size: 15px; margin: 0; }
.pr h2 { font-size: 12px; margin: 12px 0 4px; border-bottom: 1px solid #000; }
.pr table { width: 100%; border-collapse: collapse; }
.pr th, .pr td { border: 1px solid #999; padding: 3px 4px; text-align: left; vertical-align: middle; }
.pr th { background: #eee; }
.pr .r { text-align: right; }
.pr td.ft { width: 34px; padding: 1px; }
.pr td.ft img { width: 30px; height: 40px; object-fit: cover; display: block; }
.pr .hdr { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 8px; }
.pr .hdr img { max-height: 54px; max-width: 160px; }
.pr .kv { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 2px 8px; border: 0; padding: 0; font-size: 11px; }
.pr .kv span { min-width: 0; color: #000; }
.pr .sign { display: flex; gap: 30px; margin-top: 40px; }
.pr .sign div { flex: 1; border-top: 1px solid #000; text-align: center; padding-top: 3px; }
.pr-pessoa { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.pr-pessoa img, .pr-pessoa .semfoto { width: 30mm; height: 40mm; object-fit: cover; border: 1px solid #999; display: grid; place-items: center; color: #999; }
.mural { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6mm; margin-top: 6mm; }
.mc { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1mm; break-inside: avoid; }
.mc img, .mc .ini { width: 32mm; height: 32mm; border-radius: 50%; object-fit: cover; border: 1.5mm solid #f0e6ff; }
.mc .ini { display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 800; }
.mc b { font-size: 16px; color: #5b3df5; }
.mc span { font-weight: 700; }
.crachas { display: flex; flex-wrap: wrap; gap: 4mm; }
.cracha { width: 54mm; height: 86mm; border: 1px solid #bbb; border-radius: 3mm; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; font: 10px Arial, sans-serif; break-inside: avoid; page-break-inside: avoid; }
.cracha .ct { width: 100%; height: 16mm; background: #5b3df5; color: #fff; display: grid; place-items: center; padding: 2mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cracha .ct img { max-height: 11mm; max-width: 44mm; background: #fff; border-radius: 1mm; padding: .5mm; }
.cracha .cf { width: 30mm; height: 38mm; object-fit: cover; margin-top: -4mm; border: 1mm solid #fff; border-radius: 2mm; background: #ddd; }
.cracha .cf.ini { display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 800; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cracha .cn { font-size: 13px; margin-top: 3mm; padding: 0 2mm; }
.cracha .cfu { color: #5b3df5; font-weight: 700; }
.cracha .cm { margin-top: auto; margin-bottom: 3mm; color: #555; }

/* ---------- celular ---------- */
@media (max-width: 600px) {
  .perfil { flex-direction: column; text-align: center; padding: 18px 14px; }
  .perfil .badges, .perfil .pf-meta, .perfil .pf-acts { justify-content: center; }
  .perfil h2 { font-size: 21px; }
  .fgrid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fcard { padding: 14px 8px 10px; border-radius: 18px; }
  .fcard .nm { font-size: 13.5px; }
  .fcard .av.xl { --s: 70px; }
  .fcard::before { height: 44px; }
  .toasts { top: auto; bottom: calc(84px + var(--safe-b)); }
  .hero { padding: 16px; border-radius: 20px; }
  .hero-hi { font-size: 20px; }
  .kpi b { font-size: 21px; }
  .tabs { top: 58px; }
  .form-head { flex-direction: column; text-align: center; }
  .form-head .chips { justify-content: flex-start; }
  .bar { grid-template-columns: 96px 1fr 26px 34px; }
}
