*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/*
 * ╔═════════════════════════════════════════════════════════════╗
 * ║  M.F.T.S v24                                                ║
 * ║  Dark-first · DM Sans + DM Mono · Green accent              ║
 * ║  v14: Login, controle de acesso, pessoas+ausências otim.   ║
 * ╚═════════════════════════════════════════════════════════════╝
 */

:root {
  /* ── Superfícies — dark suavizado com gradiente ── */
  --bg:       #111827;
  --surface:  #1E2433;
  --surface2: #252D3F;
  --surface3: #2D3750;
  --border:   rgba(255,255,255,.1);
  --border2:  rgba(255,255,255,.18);
  --border3:  rgba(255,255,255,.28);

  /* ── Texto ── */
  --text:  #F0F2FA;
  --text2: #8892AA;
  --text3: #525870;

  /* ── Accent: Verde M.F.T.S — único destaque no escuro ── */
  --accent:       #00CA6E;
  --accent-hover: #00A85C;
  --accent-light: rgba(0,202,110,.1);
  --accent-mid:   rgba(0,202,110,.25);
  --accent-dark:  #0C4A2E;

  /* ── Status ── */
  --success:       #34D399;
  --success-light: rgba(52,211,153,.1);
  --warn:          #FBBF24;
  --warn-light:    rgba(251,191,36,.1);
  --danger:        #F87171;
  --danger-light:  rgba(248,113,113,.1);
  --gold:          #F59E0B;
  --gold-light:    rgba(245,158,11,.1);
  --purple:        #A78BFA;
  --purple-light:  rgba(167,139,250,.1);
  --teal:          #2DD4BF;
  --teal-light:    rgba(45,212,191,.1);

  /* ── Sombras (sutis no escuro) ── */
  --shadow:    0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.6), 0 4px 12px rgba(0,0,0,.4);
  --shadow-accent: 0 4px 20px rgba(0,202,110,.2);

  /* ── Raios ── */
  --radius:    8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --radius-xl: 18px;

  /* ── Sidebar vars ── */
  --sb-width:    220px;
  --sb-bg:       #0F1420;
  --sb-border:   rgba(255,255,255,.08);
  --sb-hover:    rgba(255,255,255,.06);
  --sb-active:   rgba(0,202,110,.14);
  --sb-text:     rgba(255,255,255,.5);
  --sb-text-hi:  rgba(255,255,255,.92);
}

/* ══════════════════════════════════════
   BASE
══════════════════════════════════════ */
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(0,202,110,.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(99,102,241,.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.shell { display: flex; min-height: 100vh; }

/* ══════════════════════════════════════
   SIDEBAR — obsidian deep
══════════════════════════════════════ */
.sidebar {
  width: var(--sb-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, #0D1220 0%, var(--sb-bg) 60%, #0A0F1A 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 30;
  border-right: 1px solid var(--sb-border);
}

.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--sb-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  box-shadow: var(--shadow-accent);
}
.logo-mark {
  font-family: 'DM Mono', monospace;
  font-size: 8.5px; font-weight: 400;
  letter-spacing: .2em;
  color: rgba(255,255,255,.2);
  text-transform: uppercase;
  margin-bottom: 1px;
}
.logo-text {
  font-size: 13px; font-weight: 600;
  color: #fff; letter-spacing: .01em;
}

.sidebar-section { padding: 6px 0; }
.sidebar-section + .sidebar-section {
  border-top: 1px solid var(--sb-border);
}
.sidebar-label {
  font-size: 9px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.16);
  padding: 0 14px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 14px;
  cursor: pointer;
  color: var(--sb-text);
  font-size: 12.5px; font-weight: 500;
  transition: all .12s;
  border: none; background: none;
  width: 100%; text-align: left;
  position: relative;
  border-radius: 0;
}
.nav-item:hover {
  color: var(--sb-text-hi);
  background: var(--sb-hover);
}
.nav-item.active {
  color: var(--accent);
  font-weight: 600;
  background: var(--sb-active);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  right: 0; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent);
  border-radius: 2px 0 0 2px;
}
.nav-item .nav-icon {
  font-size: 14px; width: 16px;
  text-align: center; flex-shrink: 0;
  opacity: .5; transition: opacity .12s;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }

.nav-gestao { color: rgba(0,202,110,.55) !important; }
.nav-gestao:hover {
  background: rgba(0,202,110,.06) !important;
  color: rgba(0,202,110,.88) !important;
}
.nav-gestao.active {
  background: rgba(0,202,110,.1) !important;
  color: var(--accent) !important;
}
.nav-gestao.active::after { background: var(--accent) !important; }

.sidebar-projects { padding: 4px 0 8px; flex: 1; overflow-y: auto; }
.project-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 14px;
  cursor: pointer; font-size: 11.5px;
  color: rgba(255,255,255,.28);
  transition: all .12s;
  border: none; background: none; width: 100%; text-align: left;
}
.project-pill:hover { color: rgba(255,255,255,.65); background: var(--sb-hover); }
.project-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.project-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-hours {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px; color: rgba(255,255,255,.18);
}
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--sb-border);
  font-size: 11px; color: rgba(255,255,255,.2);
}
.user-badge { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.user-avatar {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-name { color: rgba(255,255,255,.55); font-size: 11.5px; font-weight: 500; }

/* ══════════════════════════════════════
   MAIN + TOPBAR
══════════════════════════════════════ */
.main {
  margin-left: var(--sb-width);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}
.topbar {
  background: linear-gradient(90deg, var(--sb-bg) 0%, #141928 100%);
  border-bottom: 1px solid var(--sb-border);
  padding: 0 24px;
  height: 54px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 10;
}
.topbar-title {
  font-size: 14px; font-weight: 600;
  flex: 1; letter-spacing: .01em;
  color: var(--text);
}
.content { padding: 20px 24px; flex: 1; }

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
  background: linear-gradient(160deg, var(--surface2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card-title {
  font-size: 12.5px; font-weight: 600;
  color: var(--text); letter-spacing: .01em;
}
.card-body { padding: 18px; }

/* ══════════════════════════════════════
   METRIC CARDS — numbers that command
══════════════════════════════════════ */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px; margin-bottom: 16px;
}
.metric-card {
  background: linear-gradient(145deg, var(--surface2) 0%, var(--surface) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow);
  transition: border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.metric-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-md);
}
/* Green glow line on hover */
.metric-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
  opacity: 0; transition: opacity .2s;
}
.metric-card:hover::after { opacity: .6; }
.metric-label {
  font-size: 10px; font-weight: 600;
  color: var(--text3);
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 10px;
}
.metric-val {
  font-size: 26px; font-weight: 700; line-height: 1;
  font-family: 'DM Mono', monospace;
  letter-spacing: -.04em; color: var(--text);
}
.metric-sub {
  font-size: 11px; color: var(--text3);
  margin-top: 7px; font-weight: 400;
}

/* ══════════════════════════════════════
   FORMULÁRIOS
══════════════════════════════════════ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 10.5px; font-weight: 600;
  color: var(--text2);
  text-transform: uppercase; letter-spacing: .1em;
}
input, select, textarea {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  color: var(--text); outline: none;
  transition: border-color .14s, box-shadow .14s;
  width: 100%; font-weight: 400;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,202,110,.12);
  background: var(--surface2);
}
input::placeholder { color: var(--text3); }
textarea { resize: vertical; min-height: 70px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23525870'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 28px; cursor: pointer;
}

/* ══════════════════════════════════════
   BOTÕES
══════════════════════════════════════ */
.btn {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12.5px; font-weight: 600;
  padding: 7px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer; border: none;
  transition: all .14s;
  display: inline-flex; align-items: center; gap: 5px;
  line-height: 1; letter-spacing: .01em; white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #000;
  box-shadow: var(--shadow-accent);
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 24px rgba(0,202,110,.3);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--surface2); color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: var(--surface3); border-color: var(--border3); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 11.5px; }
.btn-ghost { background: none; color: var(--text3); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--surface2); color: var(--text2); border-color: var(--border2); }
.btn-gold { background: var(--accent); color: #000; font-weight: 700; }
.btn-gold:hover { background: var(--accent-hover); }
.btn-teal { background: var(--teal); color: #000; font-weight: 600; }
.btn-teal:hover { opacity: .88; }

/* ══════════════════════════════════════
   TABELAS
══════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface2); }
thead th {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--text3);
  padding: 9px 13px;
  text-align: left;
  border-bottom: 1px solid var(--border2);
  white-space: nowrap;
}
tbody td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px; vertical-align: middle;
  font-weight: 400; color: var(--text);
}
tbody tr { transition: background .1s; }
tbody tr:hover td { background: var(--surface2); }
tbody tr:last-child td { border-bottom: none; }

/* ══════════════════════════════════════
   BADGES — dark-mode semantic
══════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
  white-space: nowrap; letter-spacing: .04em;
}
.badge-blue   { background: rgba(96,165,250,.12); color: #60A5FA; }
.badge-green  { background: var(--success-light); color: var(--success); }
.badge-warn   { background: var(--warn-light); color: var(--warn); }
.badge-gray   { background: rgba(255,255,255,.06); color: var(--text2); border: 1px solid var(--border2); }
.badge-red    { background: var(--danger-light); color: var(--danger); }
.badge-gold   { background: var(--gold-light); color: var(--gold); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-teal   { background: var(--teal-light); color: var(--teal); }

/* ══════════════════════════════════════
   PROJECT CARDS
══════════════════════════════════════ */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--project-color, var(--border));
  opacity: .7;
}
.project-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.project-card:hover::before { opacity: 1; }
.project-card.concluded { opacity: .5; }
.project-card.concluded:hover { opacity: .78; }

/* ══════════════════════════════════════
   PEOPLE CARDS
══════════════════════════════════════ */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
/* People card redesenhado v14 */
.people-card {
  background: linear-gradient(155deg, var(--surface2) 0%, var(--surface) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); position: relative;
  transition: border-color .18s, box-shadow .18s, transform .15s;
  display: flex; flex-direction: column;
}
.people-card:hover { border-color: var(--border2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.people-card.inactive { opacity: .55; border-style: dashed; filter: grayscale(.4); }
.people-card::before { content: ''; display: block; height: 3px; background: var(--card-accent, var(--border)); }
.people-card[data-role="admin"]   { --card-accent: var(--accent); }
.people-card[data-role="user"]    { --card-accent: var(--teal); }
.people-card[data-role="inativo"] { --card-accent: var(--text3); }
.pc-header { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 10px; }
.pc-avatar { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden; }
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-info { flex: 1; min-width: 0; }
.pc-name { font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-cargo { font-size: 11px; color: var(--text3); margin-top: 2px; }
.pc-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.pc-actions { display: flex; gap: 4px; flex-shrink: 0; }
.pc-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface3); color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all .12s; }
.pc-btn:hover { background: var(--surface2); border-color: var(--border2); color: var(--text); }
.pc-btn.danger:hover { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }
.pc-body { padding: 0 16px 14px; flex: 1; }
.pc-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text2); margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-icon { font-size: 12px; flex-shrink: 0; width: 16px; text-align: center; color: var(--text3); }
.pc-login-row { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: var(--surface3); border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 2px 0 10px; }
.pc-login-val { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text2); flex: 1; }
.pc-role-pill { font-size: 9px; padding: 2px 7px; border-radius: 10px; font-family: 'DM Mono', monospace; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; flex-shrink: 0; }
.pc-ferias { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; background: var(--surface2); border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 8px; font-size: 11px; }
.pc-projs { font-size: 11px; color: var(--text3); padding-top: 8px; border-top: 1px solid var(--border); margin-top: auto; }
.pc-alert { margin: 0 16px 8px; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; }
.person-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.person-row:last-child { border-bottom: none; }
.person-avatar { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; flex-shrink: 0; }

/* ══════════════════════════════════════
   FILTER BAR
══════════════════════════════════════ */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar select { width: auto; min-width: 120px; }

/* ══════════════════════════════════════
   TOAST — green accent
══════════════════════════════════════ */
/* ── Toast notifications ── */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.12);
  pointer-events: all;
  transform: translateX(120%) scale(.94);
  opacity: 0;
  transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .28s ease;
  backdrop-filter: blur(12px);
}
.toast-item.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}
.toast-item.toast-success {
  background: linear-gradient(135deg, #1a2e1a 0%, #162616 100%);
  border-color: rgba(52,211,153,.3);
  color: #d1fae5;
}
.toast-item.toast-warn {
  background: linear-gradient(135deg, #2e1f0a 0%, #261a06 100%);
  border-color: rgba(0,202,110,.3);
  color: #fef3c7;
}
.toast-item.toast-error {
  background: linear-gradient(135deg, #2e0f0f 0%, #260a0a 100%);
  border-color: rgba(239,68,68,.3);
  color: #fee2e2;
}
.toast-item.toast-info {
  background: linear-gradient(135deg, #0f1e2e 0%, #0a1826 100%);
  border-color: rgba(96,165,250,.3);
  color: #dbeafe;
}
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg  { flex: 1; line-height: 1.4; }

/* legado — manter para compatibilidade */
.toast { display: none; }
.toast.show { display: none; }

/* ── EMPTY STATE ── */
.empty { text-align: center; padding: 48px 20px; color: var(--text3); }
.empty-icon { font-size: 28px; margin-bottom: 10px; opacity: .2; }
.empty-text { font-size: 12.5px; font-weight: 500; }

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }
/* Projetos em modo kanban precisa de flex para o board preencher a altura */

/* ══════════════════════════════════════
   LOCK SCREEN — dark + green glow
══════════════════════════════════════ */
.lock-screen {
  position: fixed; inset: 0;
  background: rgba(8,10,16,.96);
  backdrop-filter: blur(20px) saturate(1.2);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.lock-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px 44px; width: 360px;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border2), 0 0 60px rgba(0,202,110,.08);
  border: 1px solid var(--border);
  animation: lockIn .28s cubic-bezier(.22,1.2,.36,1) both;
}
@keyframes lockIn {
  from { opacity: 0; transform: scale(.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.lock-icon { font-size: 36px; margin-bottom: 14px; }
.lock-title { font-size: 19px; font-weight: 700; margin-bottom: 5px; letter-spacing: -.01em; }
.lock-sub { font-size: 12.5px; color: var(--text3); margin-bottom: 24px; }
.lock-input {
  width: 100%; padding: 13px;
  font-size: 22px; letter-spacing: .6em; text-align: center;
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  margin-bottom: 13px; font-family: 'DM Mono', monospace;
  background: var(--surface2); color: var(--text);
  transition: border-color .14s, box-shadow .14s;
}
.lock-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,202,110,.15);
}
.lock-input.error { border-color: var(--danger); animation: shake .3s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* ══════════════════════════════════════
   GESTÃO TABS
══════════════════════════════════════ */
.gtabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.gtab {
  padding: 9px 18px; font-size: 12.5px; font-weight: 500;
  color: var(--text3); cursor: pointer;
  border: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .14s; background: none;
}
.gtab:hover { color: var(--text2); }
.gtab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ══════════════════════════════════════
   REPORT HEADER — dark executive
══════════════════════════════════════ */
.report-header {
  background: linear-gradient(135deg, #1C2438 0%, #212D45 50%, #1A2640 100%);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 16px;
  position: relative; overflow: hidden;
  border: 1px solid var(--border2);
}
/* Green glow decoration */
.report-header::before {
  content: '';
  position: absolute; top: -60px; right: -40px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(0,202,110,.12) 0%, transparent 65%);
  pointer-events: none;
}
/* Dot-grid decoration (manual da marca — elementos gráficos) */
.report-header::after {
  content: '';
  position: absolute; bottom: -20px; left: -20px;
  width: 140px; height: 140px;
  background-image: radial-gradient(rgba(0,202,110,.35) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  pointer-events: none;
}
.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px; margin-top: 16px;
  position: relative; z-index: 1;
}
@media (max-width: 1280px) {
  .report-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.report-kpi {
  background: rgba(255,255,255,.04);
  border-radius: 8px; padding: 11px 10px;
  border: 1px solid var(--border);
  transition: background .14s;
  min-width: 0; /* permite shrinking */
}
.report-kpi:hover { background: rgba(255,255,255,.07); }
.report-kpi-label {
  font-size: 9px; color: var(--text3);
  text-transform: uppercase; letter-spacing: .14em;
  margin-bottom: 6px; font-weight: 600;
}
.report-kpi-val {
  font-family: 'DM Mono', monospace;
  font-size: 16px; font-weight: 700; letter-spacing: -.03em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-kpi-sub { font-size: 10px; color: var(--text3); margin-top: 4px; }

/* ══════════════════════════════════════
   MODAIS
══════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-overlay.open > .card {
  animation: modalIn .2s cubic-bezier(.22,1.2,.36,1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── CAPACITY ROW ── */
.cap-row {
  display: grid; grid-template-columns: 130px 1fr 80px 70px;
  align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.cap-row:last-child { border-bottom: none; }

/* ── AUSÊNCIAS ── */
.ausencia-tipo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600;
  padding: 2.5px 8px; border-radius: 99px;
}
.ausencia-ferias  { background: rgba(52,211,153,.12); color: #34D399; }
.ausencia-medica  { background: rgba(248,113,113,.12); color: #F87171; }

/* Status de ausência */
.aus-status-agendada   { background: rgba(96,165,250,.14);  color: #60A5FA; }
.aus-status-programada { background: rgba(251,191,36,.14);  color: #FBBF24; }
.aus-status-concluida  { background: rgba(52,211,153,.14);  color: #34D399; }
.aus-status-reprovada  { background: rgba(239,68,68,.14);    color: #EF4444; }
.ausencia-folga   { background: rgba(96,165,250,.12); color: #60A5FA; }
.ausencia-dayoff  { background: rgba(167,139,250,.12); color: #A78BFA; }
.ausencia-feriado { background: rgba(251,191,36,.12); color: #FBBF24; }
.ausencia-outro   { background: rgba(255,255,255,.06); color: var(--text2); }
.aus-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  box-shadow: var(--shadow);
}

/* ══════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }
.sidebar::-webkit-scrollbar { width: 0; }

/* ══════════════════════════════════════
   ANIMAÇÕES
══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page.active { animation: fadeUp .18s ease-out; }

.metrics-row .metric-card { animation: fadeUp .2s ease-out both; }
.metrics-row .metric-card:nth-child(1) { animation-delay: .03s; }
.metrics-row .metric-card:nth-child(2) { animation-delay: .06s; }
.metrics-row .metric-card:nth-child(3) { animation-delay: .09s; }
.metrics-row .metric-card:nth-child(4) { animation-delay: .12s; }
.metrics-row .metric-card:nth-child(5) { animation-delay: .15s; }
.metrics-row .metric-card:nth-child(6) { animation-delay: .18s; }


/* ══════════════════════════════════════════════════════════
   KANBAN — Microsoft Planner Style
   • Board horizontal com scroll
   • Colunas com cabeçalho colorido (barra superior grossa)
   • Cards brancos/superfície com sombra mínima
   • Drag visual com opacidade
   • Bucket count badge no header
══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════
   KANBAN DE PROJETOS — estilo Microsoft Planner
═══════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   CARD — inspirado no Planner
═══════════════════════════════════════════════ */
/* ══════════════════════════════════════
   LOGIN SCREEN v14
══════════════════════════════════════ */
#loginScreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(0,202,110,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(99,102,241,.06) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
#loginScreen.hidden { display: none; }
.login-card {
  background: linear-gradient(160deg, var(--surface2) 0%, var(--surface) 100%);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(0,202,110,.06);
  padding: 40px 44px 36px;
  width: 380px;
  max-width: 95vw;
  position: relative;
  overflow: hidden;
}
/* Dot-grid decoration (manual da marca — elementos gráficos) */
.login-card::after {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 150px; height: 150px;
  background-image: radial-gradient(rgba(0,202,110,.3) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  pointer-events: none;
}
.login-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 32px;
}
.login-logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; font-size: 18px;
  box-shadow: var(--shadow-accent);
}
.login-logo-text { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.login-logo-sub { font-size: 11px; color: var(--text3); margin-top: 1px; font-family: 'DM Mono', monospace; letter-spacing: .08em; }
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-sub { font-size: 13px; color: var(--text2); margin-bottom: 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text2); margin-bottom: 6px; letter-spacing: .02em; text-transform: uppercase; }
.login-field input {
  width: 100%; padding: 10px 14px; border-radius: var(--radius);
  background: var(--surface3); border: 1.5px solid var(--border);
  color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.login-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,202,110,.12); }
.login-btn {
  width: 100%; padding: 11px; border-radius: var(--radius);
  background: var(--accent); color: #111; font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; transition: background .15s, transform .08s;
  letter-spacing: .02em; margin-top: 8px;
}
.login-btn:hover { background: var(--accent-hover); }
.login-btn:active { transform: scale(.98); }
.login-error {
  background: var(--danger-light); border: 1px solid var(--danger);
  color: var(--danger); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 12px; font-weight: 500;
  margin-bottom: 14px; display: none;
}
.login-error.show { display: block; }
.login-badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.login-badge { font-size: 10px; padding: 3px 9px; border-radius: 30px; font-family: 'DM Mono', monospace; }
.login-badge-admin { background: rgba(0,202,110,.15); color: var(--accent); border: 1px solid rgba(0,202,110,.25); }
.login-badge-user  { background: rgba(52,211,153,.1);  color: var(--success); border: 1px solid rgba(52,211,153,.2); }

/* ── Role badge na sidebar ── */
.role-badge {
  font-size: 9px; padding: 2px 7px; border-radius: 20px;
  font-family: 'DM Mono', monospace; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; margin-left: auto;
}
.role-admin { background: rgba(0,202,110,.18); color: var(--accent); }
.role-user  { background: rgba(52,211,153,.12); color: var(--success); }

/* ── Admin-only items ── */
.admin-only { /* visibilidade controlada pelo applyRoleUI() via JS */ }

/* ══════════════════════════════════════
   PESSOAS v14 — otimizações
══════════════════════════════════════ */
.pessoas-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.pessoas-search {
  flex: 1; min-width: 200px; padding: 8px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 13px; font-family: inherit;
  transition: border-color .15s;
}
.pessoas-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,202,110,.08); }
.pessoas-stats-row {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px; margin-bottom: 16px;
}
@media(max-width:900px){ .pessoas-stats-row { grid-template-columns: repeat(2,1fr); } }

/* ══════════════════════════════════════
   AUSÊNCIAS v14 — otimizações
══════════════════════════════════════ */
.aus-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px; margin-top: 14px;
}
.aus-kanban-col {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px;
}
.aus-kanban-col-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.aus-kanban-item {
  background: var(--surface3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 10px; margin-bottom: 8px;
  font-size: 12px;
}
.aus-kanban-item:last-child { margin-bottom: 0; }
.aus-timeline {
  overflow-x: auto; padding-bottom: 8px;
}
.aus-timeline table { min-width: 600px; }
.aus-timeline th { font-size: 10px; text-align: center; padding: 4px; color: var(--text3); }
.aus-timeline td { padding: 3px; }
.aus-cell-filled {
  height: 18px; border-radius: 3px; background: var(--accent-mid);
  border: 1px solid var(--accent);
}
.aus-cell-empty { height: 18px; }
/* ── Dashboard ── */
.dash-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}

.aus-view-tabs {
  display: flex; gap: 2px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 3px;
}
.aus-view-tab {
  padding: 4px 12px; border-radius: 5px; font-size: 11.5px;
  font-weight: 600; cursor: pointer; border: none; background: none;
  color: var(--text2); transition: all .12s;
}
/* ══════════════════════════════════════
   PERFIL DO USUÁRIO v14
══════════════════════════════════════ */
#perfilAvatarPreview {
  transition: box-shadow .2s;
}
#perfilAvatarPreview:hover {
  box-shadow: 0 0 0 3px var(--accent), var(--shadow-accent);
}
.role-inativo { background: rgba(255,255,255,.06); color: var(--text3); border: 1px solid var(--border); }

/* People card com avatar foto */
.people-card .person-photo {
  width: 44px; height: 44px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
}
.people-card .person-photo img { width: 100%; height: 100%; object-fit: cover; }


/* ─── Gestao tab pages — strict isolation ─── */
.gtab-page { display: none; }
.gtab-page.gtab-active { display: block; }

