:root {
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-darker: #115e59;
  --brand-light: #2dd4bf;
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;
  --ink: #0f172a;
  --ink-soft: #64748b;
  --ink-faint: #94a3b8;
  --bg: #f6f8fa;
  --card: #ffffff;
  --border: #e6eaf0;
  --border-soft: #eef1f5;
  --warn-bg: #fffaf0;
  --warn-border: #fde3b8;
  --warn-ink: #9a5a12;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-ink: #b91c1c;
  --ok-bg: #ecfdf5;
  --ok-ink: #047857;
  --pending-bg: #fffbeb;
  --pending-ink: #b45309;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 16px -8px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 40px -16px rgba(15, 23, 42, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14.5px;
  line-height: 1.5;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Shell ---------- */

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(190deg, #0a1614 0%, #0c2320 55%, #0f2b27 100%);
  color: #cfe6e2;
  padding: 22px 0 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  padding: 0 20px 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #06201d;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -3px rgba(45, 212, 191, 0.5);
}

.sidebar nav {
  padding: 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #a9c8c3;
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: background 0.14s ease, color 0.14s ease;
}

.sidebar nav a svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar nav a:hover { background: rgba(255, 255, 255, 0.06); color: #eafffb; text-decoration: none; }
.sidebar nav a.active {
  background: rgba(45, 212, 191, 0.14);
  color: #ffffff;
  font-weight: 600;
  border-left: 3px solid var(--brand-light);
  padding-left: 9px;
}
.sidebar nav a.active svg { opacity: 1; }
.sidebar nav a.disabled { color: #3f5c58; cursor: default; }
.sidebar nav a.disabled:hover { background: none; color: #3f5c58; }

.sidebar .footer {
  margin: 10px 12px 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
  color: #8fb3ae;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar .footer .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #06201d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  flex-shrink: 0;
}

.sidebar .footer .who { min-width: 0; flex: 1; }
.sidebar .footer .who .email {
  color: #e4f5f2;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.sidebar .footer .who a { color: #7fb0a9; font-size: 12px; }
.sidebar .version { text-align: center; font-size: 10.5px; color: #4a6864; margin-top: 10px; letter-spacing: 0.02em; }

main {
  padding: 34px 40px 60px;
  max-width: 1140px;
  width: 100%;
}
/* Opt-in for a page whose content genuinely benefits from the full content-area width instead of the
   standard 1140px column — currently just the recruitment kanban board, which needs the room for its
   6 fixed stage columns to lay out side by side without horizontal scrolling. */
main.main-wide { max-width: none; }

h1 { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 5px; color: var(--ink); }
h2 { font-size: 16.5px; font-weight: 650; margin: 0 0 14px; letter-spacing: -0.01em; }
.subtitle { color: var(--ink-soft); margin: 0 0 26px; font-size: 14px; }

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  margin-bottom: 20px;
}

/* An editing card is the same shape as .card but visually distinct from a plain "create new" card — a
   brand-tinted background, a left accent bar, and an eyebrow label (see .card-editing-eyebrow) make it
   read as "you are changing an existing record", not as a second identical form. */
.card-editing {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  position: relative;
  padding-left: 27px;
}
.card-editing::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: linear-gradient(180deg, var(--brand-light), var(--brand-dark));
}
.card-editing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin-bottom: 8px;
}
.card-editing-summary {
  background: var(--card);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.card-editing-summary strong { color: var(--ink); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-light), var(--brand-dark));
}

.stat-card .label { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.stat-card .value { font-size: 30px; font-weight: 750; margin-top: 6px; letter-spacing: -0.02em; color: var(--ink); }
.stat-card .delta { font-size: 12px; color: var(--brand-dark); font-weight: 650; margin-top: 6px; }
.stat-card .delta.muted { color: var(--ink-faint); font-weight: 500; }

/* ---------- Dashboard: attention panel ---------- */

.attention-card { padding-bottom: 10px; }

.attention-list { display: flex; flex-direction: column; gap: 8px; }

.attention-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--ink-faint);
  color: var(--ink);
  font-size: 13.5px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.attention-item:hover { background: #f1f4f7; text-decoration: none; }
.attention-item .pill {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
}
/* Category tag: always neutral — it's a scan aid, not a severity signal, so it must never compete with
   the colored severity tag next to it. */
.attention-item .category-tag { background: var(--card); border: 1px solid var(--border); color: var(--ink-soft); }
.attention-item .text { flex: 1; }
.attention-item .go { flex-shrink: 0; font-size: 12px; font-weight: 650; color: var(--ink-faint); opacity: 0; transition: opacity 0.12s ease; }
.attention-item:hover .go { opacity: 1; }

.attention-item.high { border-left-color: var(--danger); }
.attention-item.high .severity-tag { background: var(--danger-bg); color: var(--danger-ink); }
.attention-item.medium { border-left-color: #d97706; }
.attention-item.medium .severity-tag { background: var(--pending-bg); color: var(--pending-ink); }
.attention-item.low { border-left-color: var(--brand); }
.attention-item.low .severity-tag { background: var(--brand-50); color: var(--brand-darker); }

/* Onboarding checklist items: same visual language as .attention-item, but a <details> element instead
   of a link, so each one can expand in place to explain what it's asking for before the admin clicks
   through — no JS needed, <summary> is natively focusable/keyboard-toggleable. */
.onboarding-item {
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--brand);
  font-size: 13.5px;
  color: var(--ink);
}
.onboarding-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}
.onboarding-item summary::-webkit-details-marker { display: none; }
.onboarding-item summary:hover { background: #f1f4f7; }
.onboarding-item summary .text { flex: 1; }
.onboarding-item summary .saiba-mais { flex-shrink: 0; font-size: 12px; font-weight: 650; color: var(--ink-faint); white-space: nowrap; }
.onboarding-item summary .saiba-mais::after { content: "Saiba mais ▾"; }
.onboarding-item[open] summary .saiba-mais::after { content: "Fechar ▴"; }
.onboarding-item .onboarding-detail {
  padding: 2px 14px 14px 14px;
  margin-left: 14px;
  margin-right: 14px;
  border-top: 1px solid var(--border-soft);
}
.onboarding-item .onboarding-detail p { margin: 10px 0 10px; color: var(--ink-soft); line-height: 1.55; }
.onboarding-item .onboarding-go { font-size: 12.5px; font-weight: 650; color: var(--brand-darker); }

.all-clear {
  padding: 16px 14px;
  border-radius: var(--radius-sm);
  background: var(--ok-bg);
  color: var(--ok-ink);
  font-size: 13.8px;
  font-weight: 600;
  text-align: center;
}

/* ---------- Dashboard: two-column widgets ---------- */

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.list { display: flex; flex-direction: column; }
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}
.list-row:last-child { border-bottom: none; padding-bottom: 2px; }
.list-row:first-child { padding-top: 2px; }
.list-row-title { font-size: 13.8px; font-weight: 600; color: var(--ink); }
.list-row-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.list-row-date { font-size: 13px; font-weight: 600; color: var(--ink-soft); flex-shrink: 0; }

.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 24px; align-items: center; gap: 10px; }
.bar-row-label {
  font-size: 12.8px;
  color: var(--ink-soft);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-row-track { background: var(--border-soft); border-radius: 999px; height: 8px; overflow: hidden; }
.bar-row-fill { height: 100%; border-radius: 999px; }
.bar-row-fill.brand { background: linear-gradient(90deg, var(--brand-light), var(--brand-dark)); }
.bar-row-count { font-size: 12.8px; font-weight: 700; color: var(--ink); text-align: right; }

/* ---------- Rich-text editor (Página de carreiras content) ---------- */

.rte { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.rte-toolbar {
  display: flex;
  gap: 2px;
  padding: 6px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.rte-toolbar button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.2;
}
.rte-toolbar button:hover { background: var(--card); border-color: var(--border-soft); color: var(--ink); }
.rte-editor {
  min-height: 140px;
  padding: 12px 14px;
  font-size: 13.8px;
  line-height: 1.6;
  color: var(--ink);
  outline: none;
}
.rte-editor:focus { background: var(--brand-50); }
.rte-editor p { margin: 0 0 10px; }
.rte-editor p:last-child { margin-bottom: 0; }
.rte-editor ul, .rte-editor ol { margin: 0 0 10px; padding-left: 22px; }
.rte-editor a { color: var(--brand-dark); }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border-soft); }
th {
  color: var(--ink-faint);
  font-weight: 650;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 2px;
  padding-bottom: 12px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafcfd; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-darker));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 13.8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 3px 10px -3px rgba(13, 148, 136, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 4px 14px -3px rgba(13, 148, 136, 0.5); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--bg); border-color: #cdd6e0; filter: none; box-shadow: none; }
.btn.danger { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 3px 10px -3px rgba(220, 38, 38, 0.4); }

/* A deliberately low-key button for an action that skips guidance rather than confirms one — sits next
   to a card title, should read as an option, not an invitation. */
.btn-quiet {
  background: none;
  border: none;
  padding: 4px 2px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-faint);
  cursor: pointer;
}
.btn-quiet:hover { color: var(--ink-soft); text-decoration: underline; }

form.inline { display: inline; }

/* ---------- Forms ---------- */

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.8px; font-weight: 650; margin-bottom: 6px; color: var(--ink); letter-spacing: 0.005em; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.8px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field .hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; line-height: 1.45; }

/* A couple of sizes smaller than the surrounding 14.5px body/.hint text — for a caption-level aside
   (e.g. "shows about 10 rows, scroll for more") that shouldn't compete with the content above it. */
.hint-sm { font-size: 11px; color: var(--ink-faint); }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.pending { background: var(--pending-bg); color: var(--pending-ink); }
.badge.rejected { background: var(--danger-bg); color: var(--danger-ink); }

/* Landed here from a dashboard "Precisa da sua atenção" alert — see the `?highlight=id1,id2` pattern
   (a table <tr> or .kanban-card whose id is in the list gets this class). Starts at the brand tint and
   fades to transparent over a few seconds so it reads as "this is what the alert meant" without staying
   as permanent visual noise; the first highlighted element also carries id="highlight" so the dashboard
   link's #highlight fragment scrolls straight to it with no JS involved. Reduced-motion users get a
   static highlight instead of the fade, so the cue doesn't disappear on them before they notice it. */
.row-highlight { animation: rowHighlightFade 4s ease-out forwards; }
tr.row-highlight { box-shadow: inset 3px 0 0 var(--brand); }
@keyframes rowHighlightFade {
  0% { background: var(--brand-50); }
  70% { background: var(--brand-50); }
  100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .row-highlight { animation: none; background: var(--brand-50); }
}

/* ---------- Notices / banners ---------- */

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 3px solid #d97706;
  color: var(--warn-ink);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 13px;
  margin-bottom: 20px;
}
/* Only the leading "<div class="notice"><strong>Heading</strong> body text...</div>" pattern gets the
   block treatment (its own line, acting as a title). Scoped to a direct, first-child <strong> so it
   doesn't also blockify a <strong> used for inline emphasis mid-sentence elsewhere in a notice — e.g.
   inside .notice-toggle-body, where several notices bold a phrase or figure without meaning to break
   the sentence onto its own line (the bug reported on Formação's "Obrigação legal" toggle). */
.notice > strong:first-child { display: block; margin-bottom: 3px; font-size: 13.3px; }

/* A <details class="notice notice-toggle"> collapses the notice down to just its <summary> (the title)
   until clicked — same zero-JS <details>/<summary> pattern as the dashboard onboarding checklist, reused
   here for the "wall of legal text" notices (Ausências, Formação, Registo de horas, Recrutamento). */
.notice-toggle { padding: 0; }
.notice-toggle > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
}
.notice-toggle > summary::-webkit-details-marker { display: none; }
.notice-toggle > summary strong { margin-bottom: 0; }
.notice-toggle > summary::after {
  content: "Ver detalhes ▾";
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
  color: var(--warn-ink);
  opacity: 0.75;
}
.notice-toggle[open] > summary::after { content: "Ocultar ▴"; }
.notice-toggle[open] > summary { padding-bottom: 6px; }
.notice-toggle > .notice-toggle-body { padding: 0 16px 13px; }

.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; }

.card-link {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--brand-dark);
  flex-shrink: 0;
  white-space: nowrap;
}
.card-link:hover { text-decoration: underline; }

.error-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-left: 3px solid var(--danger);
  color: var(--danger-ink);
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 13.8px;
}

.success-banner {
  background: var(--ok-bg);
  border: 1px solid #a7f3d0;
  border-left: 3px solid var(--ok-ink);
  color: var(--ok-ink);
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 13.8px;
}

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

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(45, 212, 191, 0.16), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(13, 148, 136, 0.22), transparent 50%),
    linear-gradient(160deg, #0a1614 0%, #0c2320 55%, #0f2b27 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 34px;
  width: 360px;
}
.login-card .mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #06201d;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px -4px rgba(13, 148, 136, 0.45);
}
.login-card h1 { font-size: 21px; margin-bottom: 3px; }
.login-card .subtitle { margin-bottom: 22px; }
.login-card .demo-hint {
  margin-top: 18px;
  padding: 10px 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--brand-darker);
  text-align: center;
}

.empty-state { color: var(--ink-soft); font-size: 13.8px; padding: 22px 0; text-align: center; }

/* ---------- Kanban board (recruitment pipeline) ---------- */

/* 6 fixed pipeline stages (STAGES in recruitment.js), always laid out side by side across the full card
   width — grid with equal fr columns, rather than the fixed-width flex row this used to be, so the board
   never needs horizontal scrolling regardless of viewport width; each column's own body still scrolls
   vertically when it has more cards than fit. Below ~960px six columns get too narrow to be usable, so
   the same board switches to the old horizontal-scroll behavior as a fallback. */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
}
@media (max-width: 960px) {
  .kanban-board {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .kanban-column { flex: 0 0 270px; width: 270px; }
}
.kanban-column {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.kanban-column.drag-over {
  background: var(--brand-50);
  border-color: var(--brand-light);
}
.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--border-soft);
}
.kanban-count {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 650;
}
.kanban-column-body {
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.kanban-column-body .empty-state { padding: 14px 0; font-size: 12.5px; }
.kanban-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 12px 13px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.8px;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 8px; }
.kanban-card-top .badge { white-space: nowrap; font-size: 10.5px; padding: 3px 8px 3px 7px; flex-shrink: 0; }
.kanban-card-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.kanban-card-name:hover { color: var(--brand-dark); text-decoration: underline; }
.kanban-card-contact { color: var(--ink-soft); }
.kanban-move { display: flex; gap: 6px; margin-top: 2px; }
.kanban-move select {
  flex: 1;
  font-size: 12px;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
}
.kanban-move .btn { padding: 5px 10px; font-size: 12px; }

/* Recruitment candidate detail page — internal comment thread (Recrutamento round). */
.comment { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.comment:last-child { border-bottom: none; }
.comment-meta { font-size: 12.5px; margin-bottom: 3px; }
.comment-body { white-space: pre-wrap; margin: 0; }

/* Recruitment candidate detail page — Contacto card, labeled like a small info sheet instead of two
   plain lines of text (which read as an unstyled ".txt" dump once one or both fields were empty). */
.contact-grid { display: flex; flex-wrap: wrap; gap: 18px 32px; }
.contact-item { display: flex; flex-direction: column; gap: 4px; }
.contact-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.contact-value { font-size: 14px; color: var(--ink); }
.contact-value .contact-empty { color: var(--ink-faint); font-style: italic; }

/* ---------- Employee self-service shell (/me/*) — mobile-first, bottom tab bar ---------- */

.me-body { background: var(--bg); }

.me-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.me-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(190deg, #0a1614 0%, #0c2320 55%, #0f2b27 100%);
  color: #eafffb;
}

.me-brand { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 15px; letter-spacing: -0.01em; }
.me-brand .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #04211d; font-weight: 800; font-size: 12.5px;
}
.me-account { color: #9fd8cf; font-size: 12px; font-weight: 600; text-decoration: none; max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-account:hover { color: #eafffb; text-decoration: underline; }

.me-content {
  flex: 1;
  padding: 16px 16px 84px;
  padding-bottom: max(84px, calc(env(safe-area-inset-bottom) + 76px));
}

.me-content h1 { font-size: 19px; margin: 2px 0 4px; letter-spacing: -0.01em; }
.me-content .subtitle { color: var(--ink-soft); margin: 0 0 18px; font-size: 13.3px; }

.me-tabbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.me-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 8px;
  color: var(--ink-faint);
  font-size: 10.8px;
  font-weight: 650;
  text-decoration: none;
}
.me-tab svg { width: 21px; height: 21px; opacity: 0.75; }
.me-tab:hover { text-decoration: none; color: var(--ink-soft); }
.me-tab.active { color: var(--brand-dark); }
.me-tab.active svg { opacity: 1; }

/* Punch-clock cards */

.punch-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 18px;
  text-align: center;
  margin-bottom: 16px;
}
.punch-status { font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-bottom: 2px; }
.punch-clock { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 2px 0 14px; font-variant-numeric: tabular-nums; }
.punch-btn {
  display: block;
  width: 100%;
  padding: 18px 14px;
  border: none;
  border-radius: 16px;
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  box-shadow: 0 6px 18px -6px rgba(13, 148, 136, 0.55);
  cursor: pointer;
}
.punch-btn:active { transform: translateY(1px); }
.punch-btn.secondary {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.punch-btn.pause {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 18px -6px rgba(217, 119, 6, 0.5);
}
.punch-btn-row { display: flex; flex-direction: column; gap: 10px; }
.punch-done { color: var(--ok-ink); font-weight: 700; }
.punch-day-summary { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; font-size: 13.3px; color: var(--ink-soft); text-align: left; }
.punch-day-summary strong { color: var(--ink); }

/* Compact list of the employee's own recent days / requests */

.me-list { display: flex; flex-direction: column; gap: 10px; }
.me-list-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.me-list-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.me-list-row-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.me-list-row-sub { font-size: 12.3px; color: var(--ink-soft); }

.me-balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.me-balance-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
}
.me-balance-card .label { font-size: 11.5px; color: var(--ink-soft); font-weight: 650; }
.me-balance-card .value { font-size: 22px; font-weight: 800; color: var(--ink); margin-top: 3px; }

.me-home-tiles { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.me-home-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.me-home-tile:hover { text-decoration: none; border-color: #cdd6e0; }
.me-home-tile .tile-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-dark);
}
.me-home-tile .tile-icon svg { width: 22px; height: 22px; }
.me-home-tile .tile-title { font-weight: 700; font-size: 14.5px; }
.me-home-tile .tile-sub { font-size: 12.3px; color: var(--ink-soft); margin-top: 1px; }

@media (min-width: 540px) {
  .me-shell { border-left: 1px solid var(--border); border-right: 1px solid var(--border); box-shadow: var(--shadow-lg); }
}

/* --- Gestão de ausências: calendar (Round 9) --- */
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.cal-toolbar-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-range-label { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-left: 4px; }
.cal-view-switch {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.cal-view-btn {
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  border-radius: 999px;
}
.cal-view-btn:hover { text-decoration: none; color: var(--ink); }
.cal-view-btn.active { background: var(--card); color: var(--brand-darker); box-shadow: var(--shadow-sm); }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--ink);
}
.cal-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.cal-months { display: flex; flex-direction: column; gap: 18px; }
.cal-months-multi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.cal-month-label { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
  font-size: 10.8px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-day {
  min-height: 92px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 6px 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-day-dense { min-height: 44px; padding: 4px 5px; gap: 3px; }
.cal-day-out { background: var(--bg); }
.cal-day-out .cal-day-num { color: var(--ink-faint); }
.cal-day-today { border-color: var(--brand-light); box-shadow: inset 0 0 0 1px var(--brand-light); }
.cal-day-num { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.cal-day-today .cal-day-num { color: var(--brand-darker); }
.cal-day-entries { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-chip {
  border-radius: 5px;
  padding: 2.5px 5px;
  font-size: 10.6px;
  line-height: 1.35;
  overflow: hidden;
}
.cal-chip-name { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip-meta { display: block; font-size: 9.6px; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-day-dots { display: flex; flex-wrap: wrap; gap: 2px; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; cursor: default; }

@media (max-width: 720px) {
  .cal-months-multi { grid-template-columns: 1fr; }
  .cal-day { min-height: 70px; }
  .cal-chip-meta { display: none; }
}
