/* =========================================================
   MADRE RH · Design tokens + componentes
   Base visual: CRM de matrículas Madre de Deus (navy + laranja)
   Spec: MADRE_RH_MASTER_SPEC_v1 §2
   ========================================================= */
:root {
  --font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --brand-navy: #303E69;
  --brand-navy-700: #283459;
  --brand-navy-600: #3A4A7A;
  --brand-orange: #F47C27;
  --brand-orange-hover: #E66C17;
  --brand-orange-ink: #9A410B;
  --on-orange: #17213B;
  --canvas: #F9FAFB;
  --surface: #FFFFFF;
  --surface-muted: #F3F4F6;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --text: #24345C;
  --text-secondary: #526078;
  --text-muted: #64748B;
  --focus: #2563EB;
  --success: #22C55E;
  --danger: #EF4444;
  --danger-ink: #B91C1C;
  --warning: #EAB308;
  --info: #3B82F6;
  --purple: #A855F7;
  --teal: #14B8A6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgb(15 23 42 / 7%);
  --shadow-pop: 0 12px 32px rgb(15 23 42 / 16%);
  --sidebar-width: 244px;
  --content-max: 1280px;
  --z-sticky: 10; --z-drawer: 30; --z-modal: 40; --z-toast: 50;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 14px; line-height: 22px;
  color: var(--text); background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.num, .kpi-value, td.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-pop); font-weight: 600; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 14px; height: 14px; }

/* ---------- AppShell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width); background: var(--brand-navy); color: #fff;
  position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: var(--z-drawer);
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 16px 14px; border-bottom: 1px solid rgb(255 255 255 / 10%); }
.sidebar-brand a { display: flex; flex-direction: column; text-decoration: none; }
.sidebar-brand img { width: 128px; height: auto; display: block; }
.sidebar-brand .since { font-size: 9px; line-height: 12px; color: rgb(255 255 255 / 80%); align-self: flex-end; margin-top: -4px; margin-right: 4px; }
.module-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: rgb(255 255 255 / 12%); color: #fff; }
.nav { flex: 1; overflow-y: auto; padding: 16px 0 8px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav-sep { height: 1px; background: rgb(255 255 255 / 10%); margin: 8px 16px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; margin: 2px 12px; padding: 0 12px; min-height: 44px;
  border-radius: var(--radius-md); color: rgb(255 255 255 / 88%); text-decoration: none; font-weight: 600; font-size: 14px;
  transition: background-color .18s ease, color .18s ease;
}
.nav-link:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.nav-link[aria-current="page"] { background: var(--brand-orange); color: var(--on-orange); box-shadow: 0 2px 6px rgb(0 0 0 / 15%); }
.nav-link[aria-current="page"] .chev { margin-left: auto; }
.nav-link .chev { display: none; }
.nav-link[aria-current="page"] .chev { display: block; }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; line-height: 18px; padding: 0 7px; border-radius: 999px; background: var(--brand-orange); color: var(--on-orange); }
.sidebar-foot { border-top: 1px solid rgb(255 255 255 / 10%); padding: 10px 0 14px; }
.user-card { display: flex; align-items: center; gap: 10px; margin: 6px 12px; padding: 8px 10px; border-radius: var(--radius-md); }
.user-card .avatar { width: 38px; height: 38px; font-size: 13px; background: #fff; color: var(--brand-navy); }
.user-card strong { display: block; font-size: 14px; line-height: 18px; }
.user-card small { display: block; font-size: 12px; line-height: 16px; color: rgb(255 255 255 / 72%); }
.user-card .icon-btn { margin-left: auto; color: rgb(255 255 255 / 75%); }
.user-card .icon-btn:hover { background: rgb(255 255 255 / 10%); color: #fff; }

.main { flex: 1; margin-left: var(--sidebar-width); min-width: 0; }
.proto-bar { background: #FEF3C7; color: #854D0E; font-size: 12px; line-height: 18px; text-align: center; padding: 6px 16px; border-bottom: 1px solid #FDE68A; }
.proto-bar strong { font-weight: 700; }
.content { max-width: var(--content-max); margin: 0 auto; padding: 20px 32px 48px; }
.topbar-mobile { display: none; }

/* ---------- PageHeader ---------- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.crumbs { font-size: 12px; line-height: 18px; color: var(--text-muted); margin-bottom: 2px; }
.crumbs a { text-decoration: none; color: var(--text-secondary); }
.crumbs a:hover { text-decoration: underline; }
h1 { font-size: 26px; line-height: 34px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -.01em; }
.page-sub { margin: 2px 0 0; color: var(--text-secondary); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-actions .select { width: auto; }
h2 { font-size: 20px; line-height: 28px; font-weight: 650; margin: 0; }
h3 { font-size: 16px; line-height: 24px; font-weight: 600; margin: 0; }

/* ---------- Buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: var(--radius-md); border: 1px solid transparent; font-weight: 600; font-size: 14px; line-height: 20px;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .18s, border-color .18s, color .18s;
}
.btn-primary { background: var(--brand-orange); color: var(--on-orange); }
.btn-primary:hover { background: var(--brand-orange-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-muted); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-muted); color: var(--text); }
.btn-danger { background: var(--danger-ink); color: #fff; }
.btn-danger:hover { background: #991B1B; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { color: #1D4ED8; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md); border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; transition: background-color .18s; }
.icon-btn:hover { background: var(--surface-muted); color: var(--text); }
.icon-btn.bordered { border: 1px solid var(--border-strong); background: var(--surface); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 12px; line-height: 18px; font-weight: 600; color: var(--text-secondary); }
.input, .select, .textarea {
  min-height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface);
  color: var(--text); font-size: 14px; width: 100%; transition: border-color .18s, box-shadow .18s;
}
.textarea { padding: 10px 12px; min-height: 96px; resize: vertical; line-height: 22px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgb(37 99 235 / 20%); }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23526078' stroke-width='2' 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 12px center; }
.search { position: relative; flex: 1; min-width: 220px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search .input { padding-left: 40px; }
.hint { font-size: 12px; line-height: 18px; color: var(--text-muted); }

/* ---------- Cards / KPIs ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card-head .hint { margin-top: 2px; }
.card-body { padding: 16px 20px 20px; }
.grid { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; gap: 16px; padding: 20px; align-items: flex-start; min-height: 112px; }
.kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.kpi-icon .icon { width: 22px; height: 22px; }
.kpi-label { font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-secondary); }
.kpi-value { font-size: 28px; line-height: 36px; font-weight: 700; color: var(--text); }
.kpi-note { font-size: 12px; line-height: 16px; color: var(--text-muted); margin-top: 2px; }
.kpi-note .up { color: #166534; font-weight: 600; }
.kpi-note .down { color: #166534; font-weight: 600; }
.bg-navy { background: var(--brand-navy); } .bg-green { background: #16A34A; } .bg-blue { background: var(--info); }
.bg-orange { background: var(--brand-orange); color: var(--on-orange) !important; } .bg-purple { background: var(--purple); }
.bg-red { background: var(--danger); } .bg-yellow { background: var(--warning); color: #422006 !important; } .bg-teal { background: var(--teal); }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.split-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-16 { margin-top: 16px; } .mb-16 { margin-bottom: 16px; } .mt-8 { margin-top: 8px; }
.muted { color: var(--text-muted); } .secondary { color: var(--text-secondary); }
.small { font-size: 12px; line-height: 18px; }
.strong { font-weight: 600; }

/* ---------- Status badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.st-novo { background: #DBEAFE; color: #1E40AF; }
.st-analise { background: #FEF3C7; color: #854D0E; }
.st-processo { background: #F3E8FF; color: #6B21A8; }
.st-ok { background: #DCFCE7; color: #166534; }
.st-erro { background: #FEE2E2; color: #991B1B; }
.st-inativo { background: #F3F4F6; color: #374151; }
.st-banco { background: #CCFBF1; color: #115E59; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 18px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--surface-muted); color: #374151; border: 1px solid var(--border); white-space: nowrap; }
.chip-navy { background: #EEF1F8; color: var(--brand-navy); border-color: #DCE2F0; }

/* ---------- Avatar ---------- */
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 700; font-size: 13px; flex-shrink: 0; background: #EEF1F8; color: var(--brand-navy); letter-spacing: .02em; }
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.av-1 { background: #EEF1F8; color: #303E69; } .av-2 { background: #FDEBDD; color: #9A410B; } .av-3 { background: #F3E8FF; color: #6B21A8; }
.av-4 { background: #DCFCE7; color: #166534; } .av-5 { background: #DBEAFE; color: #1E40AF; } .av-6 { background: #CCFBF1; color: #115E59; }

/* ---------- FilterBar ---------- */
.filterbar { padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.active-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border-radius: 999px; background: #EEF1F8; color: var(--brand-navy); font-weight: 600; }
.filter-pill button { border: 0; background: transparent; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: inherit; }
.filter-pill button:hover { background: rgb(48 62 105 / 12%); }

/* ---------- DataTable ---------- */
.table-wrap { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }
.dt th { text-align: left; font-weight: 600; color: var(--text-secondary); background: var(--surface-muted); padding: 10px 12px; white-space: nowrap; font-size: 12px; letter-spacing: .02em; }
.dt th:first-child { border-top-left-radius: 0; }
.dt td { padding: 12px 12px; border-top: 1px solid var(--border); vertical-align: middle; height: 60px; }
.dt tbody tr { transition: background-color .15s; }
.dt tbody tr:hover { background: #FAFBFD; }
.dt tr.clickable { cursor: pointer; }
.dt .person { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; }
.dt .person strong { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.dt .person small { display: block; color: var(--text-muted); font-size: 12px; }
.sort-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager { display: flex; align-items: center; gap: 6px; }
.pager button { min-width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; display: grid; place-items: center; }
.pager button[aria-current="page"] { background: var(--brand-orange); border-color: var(--brand-orange); color: var(--on-orange); }
.pager button:hover:not([aria-current]) { background: var(--surface-muted); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.masked { letter-spacing: .04em; color: var(--text-muted); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 46px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--text-secondary); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand-orange); }
.tab .count { font-size: 11px; font-weight: 700; background: var(--surface-muted); border-radius: 999px; padding: 0 7px; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.segmented button { border: 0; background: none; min-height: 40px; min-width: 42px; padding: 0 10px; cursor: pointer; color: var(--text-secondary); display: grid; place-items: center; }
.segmented button[aria-pressed="true"] { background: var(--brand-navy); color: #fff; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font-sans); fill: var(--text-muted); font-size: 11px; }
.chart .grid-line { stroke: #EEF0F3; stroke-dasharray: 3 3; }
.chart .axis { stroke: #CBD5E1; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chart-table-toggle { font-size: 12px; }
details.data-table summary { cursor: pointer; font-size: 12px; font-weight: 600; color: #1D4ED8; padding: 8px 0 0; list-style: none; }
details.data-table summary::-webkit-details-marker { display: none; }
details.data-table table { margin-top: 8px; }
.donut-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.donut-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; }
.donut-legend i { width: 10px; height: 10px; border-radius: 50%; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-md); font-size: 12px; line-height: 18px; background: #EFF6FF; color: #1E3A8A; border: 1px solid #DBEAFE; }
.notice.warn { background: #FFFBEB; color: #854D0E; border-color: #FDE68A; }
.notice .icon { width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.list-item:first-child { border-top: 0; }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .meta strong { display: block; font-size: 14px; font-weight: 600; }
.list-item .meta small { display: block; font-size: 12px; color: var(--text-muted); }
.pending-count { font-weight: 700; font-size: 18px; min-width: 36px; text-align: right; }

/* ---------- Vagas ---------- */
.vaga { display: grid; grid-template-columns: 48px minmax(200px, 1.5fr) repeat(3, minmax(110px, 1fr)) 176px 196px; gap: 16px; align-items: center; padding: 18px 20px; margin-bottom: 12px; }
.vaga-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.vaga h3 a { text-decoration: none; }
.vaga h3 a:hover { text-decoration: underline; }
.meta-pair { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.meta-pair .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--text-secondary); }
.meta-pair b { display: block; font-size: 13px; line-height: 18px; color: var(--text); font-weight: 600; }
.meta-stack { display: flex; flex-direction: column; gap: 10px; }
.vaga-actions { display: flex; gap: 6px; align-items: center; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.col { background: #F1F3F7; border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: 420px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 700; font-size: 14px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.col-head .count { margin-left: auto; font-size: 12px; background: rgb(255 255 255 / 75%); border-radius: 999px; padding: 0 8px; }
.col-body { padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.col-body.drag-over { outline: 2px dashed var(--brand-navy-600); outline-offset: -6px; border-radius: 12px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; box-shadow: var(--shadow-card); cursor: grab; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .5; }
.kcard-top { display: flex; gap: 10px; align-items: flex-start; }
.kcard-top .who { flex: 1; min-width: 0; }
.kcard-top strong { display: block; font-size: 13px; line-height: 18px; }
.kcard-top small { display: block; font-size: 12px; color: var(--text-muted); line-height: 16px; }
.kcard-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--text-secondary); }
.kcard-meta span { display: inline-flex; align-items: center; gap: 6px; }
.kcard .icon-btn { width: 32px; height: 32px; }
.col-add { margin: 0 10px 10px; border: 1px dashed var(--border-strong); background: rgb(255 255 255 / 60%); border-radius: 10px; min-height: 38px; color: var(--text-secondary); font-weight: 600; font-size: 13px; cursor: pointer; }
.col-add:hover { background: #fff; }
.terminal-row { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- Agenda ---------- */
.cal { width: 100%; border-collapse: separate; border-spacing: 2px; text-align: center; }
.cal th { font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 6px 0; }
.cal td { padding: 0; }
.cal button { width: 100%; aspect-ratio: 1; max-width: 46px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-weight: 600; font-size: 13px; position: relative; color: var(--text); }
.cal button:hover { background: var(--surface-muted); }
.cal button.out { color: #A0AEC0; font-weight: 400; }
.cal button[aria-pressed="true"] { background: var(--brand-orange); color: var(--on-orange); }
.cal .dot { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; }
.slot { display: grid; grid-template-columns: 72px minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1fr) max-content 36px; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; font-size: 13px; }
.slot time { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.slot .lbl { display: block; font-size: 11px; color: var(--text-muted); line-height: 14px; }
.slot b { font-weight: 600; }

/* ---------- Ficha ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; padding: 20px; flex-wrap: wrap; }
.profile-head .avatar { width: 56px; height: 56px; font-size: 18px; }
.profile-head .who { flex: 1; min-width: 220px; }
.profile-head .who h1 { font-size: 22px; line-height: 30px; }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0; font-size: 13px; }
.dl dt { color: var(--text-muted); font-weight: 600; font-size: 12px; }
.dl dd { margin: 0; }
.cv-viewer { background: #525A6B; border-radius: 12px; padding: 18px; min-height: 620px; display: flex; flex-direction: column; gap: 10px; }
.cv-toolbar { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 12px; }
.cv-toolbar .icon-btn { color: #fff; width: 34px; height: 34px; }
.cv-toolbar .icon-btn:hover { background: rgb(255 255 255 / 12%); }
.cv-page { background: #fff; border-radius: 4px; padding: 40px 44px; flex: 1; box-shadow: 0 4px 16px rgb(0 0 0 / 25%); font-size: 12px; line-height: 18px; color: #334155; }
.cv-page h4 { margin: 0 0 4px; font-size: 18px; color: #1F2937; }
.cv-page h5 { margin: 18px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #475569; border-bottom: 1px solid #E5E7EB; padding-bottom: 4px; }
.cv-page p { margin: 0 0 6px; }
.watermark { font-size: 10px; color: #94A3B8; text-align: right; margin-top: 20px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 28px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border-strong); }
.timeline small { display: block; color: var(--text-muted); font-size: 12px; }
.comment { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.comment header { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.comment header strong { color: var(--text); font-size: 13px; }

/* ---------- Scorecard ---------- */
.criterion { padding: 16px 0; border-top: 1px solid var(--border); }
.criterion:first-of-type { border-top: 0; }
.scale { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale span { display: grid; place-items: center; min-width: 44px; height: 40px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; background: #fff; }
.scale input:checked + span { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.scale input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.anchor { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); max-width: 360px; margin-top: 4px; }

/* ---------- Unidades ---------- */
.unit { display: grid; grid-template-columns: 56px minmax(220px, 1.5fr) minmax(150px, 1fr) 110px 110px 120px 44px; gap: 16px; align-items: center; padding: 16px 20px; margin-bottom: 12px; }
.unit-mark { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: #EEF1F8; color: var(--brand-navy); font-weight: 800; font-size: 16px; }
.unit.planned .unit-mark { background: repeating-linear-gradient(135deg, #F3F4F6, #F3F4F6 6px, #E5E7EB 6px, #E5E7EB 12px); color: var(--text-secondary); }
.stat-mini b { display: block; font-size: 20px; line-height: 26px; font-weight: 700; }
.stat-mini span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }

/* ---------- Matrix ---------- */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.mx { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.mx-yes { background: #DCFCE7; color: #166534; } .mx-part { background: #FEF3C7; color: #854D0E; } .mx-no { background: #F3F4F6; color: #4B5563; }

/* ---------- Drawer / modal / menu / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgb(15 23 42 / 40%); z-index: var(--z-drawer); opacity: 0; transition: opacity .2s; }
.overlay.open { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: calc(var(--z-drawer) + 1); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .24s ease; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -48%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg); z-index: var(--z-modal); box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .2s, transform .2s; }
.modal.open { opacity: 1; transform: translate(-50%, -50%); }
.modal-head { padding: 20px 20px 0; display: flex; align-items: flex-start; gap: 12px; }
.modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 0 20px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.menu { position: fixed; z-index: var(--z-modal); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; min-width: 220px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; min-height: 38px; padding: 0 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-muted); outline: none; }
.menu .menu-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px 4px; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.menu .danger { color: var(--danger-ink); }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--brand-navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-pop); font-size: 13px; font-weight: 500; animation: toast-in .2s ease; }
.toast .icon { color: #86EFAC; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 48px 20px; color: var(--text-secondary); }
.empty .icon { width: 40px; height: 40px; color: var(--text-muted); margin-bottom: 8px; }

.notif-item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.notif-item.unread .meta strong::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-orange); margin-left: 8px; vertical-align: middle; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .content { padding: 20px 24px 40px; }
  .vaga { grid-template-columns: 48px 1fr 1fr 1fr; }
  .vaga .vaga-status, .vaga .vaga-actions { grid-column: span 2; }
  .slot { grid-template-columns: 72px 1fr 1fr max-content 36px; }
  .slot .slot-who2 { display: none; }
  .unit { grid-template-columns: 56px 1fr 1fr 1fr; }
}
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); transition: transform .24s; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-pop); }
  .main { margin-left: 0; }
  .topbar-mobile { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--brand-navy); color: #fff; position: sticky; top: 0; z-index: var(--z-sticky); }
  .topbar-mobile img { width: 92px; }
  .topbar-mobile .icon-btn { color: #fff; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-2, .split-3, .split-main { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .content { padding: 16px 16px 32px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; gap: 10px; min-height: 0; flex-direction: column; }
  .kpi-value { font-size: 24px; line-height: 30px; }
  .vaga, .slot, .unit { grid-template-columns: 1fr; }
  .vaga .vaga-status, .vaga .vaga-actions { grid-column: auto; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  h1 { font-size: 22px; line-height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
