:root {
  --bg: #111827;
  --bg-elev: #182234;
  --bg-soft: #1e293b;
  --sidebar: #0f172a;
  --sidebar-border: rgba(148, 163, 184, .12);
  --panel: #182235;
  --panel-2: #202d42;
  --panel-3: #0f172a;
  --muted: #94a3b8;
  --text: #dbe7f5;
  --heading: #f8fbff;
  --accent: #60a5fa;
  --accent-2: #3b82f6;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(148, 163, 184, .14);
  --shadow: 0 18px 34px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html, body { min-height: 100vh; }
html { font-size: 14px; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.12), transparent 22%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.45;
}

a { color: inherit; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  transition: grid-template-columns .18s ease;
}
body.sidebar-expanded .app-shell { grid-template-columns: 256px minmax(0, 1fr); }

.sidebar {
  background: rgba(10, 16, 28, .98);
  border-right: 1px solid var(--sidebar-border);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  min-height: 100vh;
  width: 76px;
  overflow: hidden;
  transition: width .18s ease, padding .18s ease;
}

.sidebar > div:first-child,
.sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.sidebar-expanded .sidebar > div:first-child,
body.sidebar-expanded .sidebar-footer {
  align-items: stretch;
}
body.sidebar-expanded .sidebar { width: 256px; padding: 18px 14px; }

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(96,165,250,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(148,163,184,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.sidebar-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-2), #7dd3fc);
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.sidebar-brand-copy span,
.menu-section-title,
.topbar-live span,
.breadcrumb-line,
.helper-note,
.muted-note,
.form-label,
.demo-box span,
.choice-box p,
.wizard-step-header p,
.repeat-empty-state,
.empty-state,
.company-logo-copy .helper-note,
.company-logo-box .helper-note,
.checklist-head,
.selected-dates-empty {
  color: var(--muted);
}
.sidebar-brand-copy span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 3px;
}
.sidebar-brand-copy strong {
  display: block;
  color: var(--heading);
  font-size: .92rem;
  line-height: 1.2;
}
.sidebar-brand-copy small {
  display: block;
  margin-top: 3px;
  color: #aab6ca;
  font-size: .78rem;
}

.sidebar-brand-copy,
.menu-section-title,
.nav-link span,
.user-card strong,
.user-card span,
.btn-sidebar-theme span,
.btn-sidebar-logout span {
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  transition: opacity .12s ease;
}
body.sidebar-expanded .sidebar-brand-copy,
body.sidebar-expanded .menu-section-title,
body.sidebar-expanded .nav-link span,
body.sidebar-expanded .user-card strong,
body.sidebar-expanded .user-card span,
body.sidebar-expanded .btn-sidebar-theme span,
body.sidebar-expanded .btn-sidebar-logout span {
  opacity: 1;
  visibility: visible;
}
.sidebar:not(.expanded) .nav-link {
  gap: 0;
}
.sidebar:not(.expanded) .nav-link span {
  display: none !important;
}
.sidebar-brand {
  justify-content: center;
  align-items: center;
  width: 56px;
  min-height: 56px;
  padding: 0;
  margin: 0 auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
body.sidebar-expanded .sidebar-brand {
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  min-height: 0;
  padding: 14px;
  margin: 0;
}
.sidebar-nav {
  margin-top: 18px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.sidebar-expanded .sidebar-nav { align-items: stretch; }
.menu-section-title {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  padding: 0 10px;
  margin: 0 0 8px;
  height: 0;
  overflow: hidden;
}
body.sidebar-expanded .menu-section-title {
  height: auto;
  overflow: visible;
}
.nav-link {
  color: #c7d2e2;
  border-radius: 14px;
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  font-size: .92rem;
  margin: 0 auto 8px;
  transition: .18s ease;
}
.nav-link i { font-size: 1rem; min-width: 18px; text-align: center; }
body.sidebar-expanded .nav-link { justify-content: flex-start; width: 100%; min-height: 0; padding: 10px 12px; margin: 0 0 4px; }
.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.05);
}
.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(59,130,246,.30), rgba(96,165,250,.10));
  border: 1px solid rgba(96,165,250,.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.user-card {
  background: transparent;
  border: 0;
  border-radius: 16px;
  width: 52px;
  min-height: 52px;
  padding: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
body.sidebar-expanded .user-card {
  width: 100%;
  min-height: 0;
  padding: 14px;
  margin: 0;
  display: block;
  text-align: left;
}

.user-card::before {
  content: "\F4DA";
  font-family: "bootstrap-icons";
  font-size: 1.15rem;
  color: #dbe7f5;
}
body.sidebar-expanded .user-card::before { display: none; }
.sidebar:not(.expanded) .user-card strong,
.sidebar:not(.expanded) .user-card span { display: none; }
.sidebar .btn-sidebar-theme.w-100,
.sidebar .btn-sidebar-logout.w-100 { width: 52px !important; }
body.sidebar-expanded .sidebar .btn-sidebar-theme.w-100,
body.sidebar-expanded .sidebar .btn-sidebar-logout.w-100 { width: 100% !important; }
.user-card strong { display: block; color: var(--heading); font-size: .92rem; }
.user-card span { display: block; margin-top: 4px; font-size: .82rem; }
.btn-sidebar-logout,
.btn-sidebar-theme {
  border-radius: 14px;
  width: 52px;
  min-height: 52px;
  padding: 0;
  margin-left: auto;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
body.sidebar-expanded .btn-sidebar-logout,
body.sidebar-expanded .btn-sidebar-theme {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  margin-left: 0;
  margin-right: 0;
}
.btn-sidebar-logout {
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(255,255,255,.03);
  color: #e5edf7;
}
.btn-sidebar-logout:hover { background: rgba(255,255,255,.08); color: #fff; }

.content-area {
  min-width: 0;
  padding: 22px 24px 32px;
}

.page-head { margin-bottom: 18px; }
.page-head-main {
  background: linear-gradient(180deg, rgba(25,36,53,.96), rgba(21,30,46,.96));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.breadcrumb-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  margin-bottom: 12px;
}
.breadcrumb-line a {
  color: #cfe0f7;
  text-decoration: none;
}
.breadcrumb-line span { color: var(--heading); }
.page-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.page-title-row h1,
.login-brand h1,
.choice-box h2,
.wizard-step-header h3,
.setup-header h2,
.brand-box h1,
.topbar h2,
.panel-header h3,
.modal-title,
.company-logo-copy strong,
.company-logo-box strong {
  color: var(--heading);
}
.page-title-row h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
}
.page-title-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .96rem;
}
.page-head-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar-live {
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  text-align: right;
}
.topbar-live span {
  display: block;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 3px;
}
.topbar-live strong {
  color: var(--heading);
  font-size: .88rem;
  font-weight: 700;
}

.panel-card,
.metric-card,
.mini-stat,
.company-logo-panel,
.choice-box,
.demo-box,
.setup-card,
.repeat-card,
.scope-box,
.selection-toolbar,
.calendar-nav,
.detail-notes,
.employee-selector,
.page-indicator {
  background: linear-gradient(180deg, rgba(27,38,56,.98), rgba(24,35,52,.98));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.panel-card, .metric-card, .mini-stat { padding: 18px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-header h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.metric-card span, .mini-stat span, .info-grid span {
  display: block;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px;
}
.metric-card strong { font-size: 1.85rem; }
.mini-stat strong { font-size: 1.15rem; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.info-grid > div,
.sector-item,
.wizard-hint-box,
.wizard-skip-box,
.repeat-empty-state,
.company-logo-box,
.company-logo-upload,
.choice-pill,
.checklist-menu {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.info-grid > div { padding: 14px; }
.sector-item { padding: 14px 16px; }
.sector-item span { color: #d9e7fb; font-size: 1.2rem; font-weight: 800; }
.sector-list { display: flex; flex-direction: column; gap: 10px; }

.form-label {
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-control,
.form-select,
.btn,
.dropdown-checklist .checklist-toggle {
  min-height: 42px;
  border-radius: 12px;
}
.form-control,
.form-select,
.dropdown-checklist .checklist-toggle,
.checklist-menu {
  background-color: rgba(15,23,42,.42);
  color: var(--text);
  border: 1px solid rgba(148,163,184,.16);
  font-size: .92rem;
}
.form-control::placeholder { color: #7f8ba0; }
.form-control:focus,
.form-select:focus {
  background-color: rgba(15,23,42,.55);
  color: var(--text);
  border-color: rgba(96,165,250,.45);
  box-shadow: 0 0 0 .2rem rgba(96,165,250,.14);
}
textarea.form-control { min-height: 108px; }

.btn {
  font-weight: 700;
  padding: 0 16px;
  border-width: 1px;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.btn-sm {
  min-height: 34px !important;
  padding: 0 12px;
  font-size: .82rem;
  border-radius: 10px;
}
.btn-primary,
.btn-success {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  border-color: transparent;
  color: white;
}
.btn-primary:hover,
.btn-success:hover { filter: brightness(1.04); }
.btn-outline-primary {
  border-color: rgba(96,165,250,.35);
  color: #d7e9ff;
  background: rgba(96,165,250,.08);
}
.btn-outline-primary:hover { background: rgba(96,165,250,.18); color: white; }
.btn-outline-secondary,
.btn-light,
.btn-outline-light {
  background: rgba(255,255,255,.03);
  border-color: rgba(148,163,184,.18);
  color: var(--text);
}
.btn-outline-danger {
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.24);
  color: #fecaca;
}
.btn-outline-danger:hover { background: rgba(239,68,68,.16); color: #fff; }

.corporate-alert {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
}
.alert-warning { background: rgba(245,158,11,.12); color: #fde68a; border-color: rgba(245,158,11,.18); }
.alert-success { background: rgba(34,197,94,.12); color: #bbf7d0; border-color: rgba(34,197,94,.18); }
.alert-danger { background: rgba(239,68,68,.12); color: #fecaca; border-color: rgba(239,68,68,.18); }
.alert-info, .alert-primary { background: rgba(96,165,250,.12); color: #dbeafe; border-color: rgba(96,165,250,.18); }

.corporate-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: rgba(148,163,184,.12);
  margin: 0;
  table-layout: auto;
}
.corporate-table thead th {
  background: rgba(255,255,255,.04);
  color: #f3f8ff;
  font-weight: 700;
  font-size: .84rem;
  border-bottom-width: 1px;
  white-space: nowrap;
  padding-top: 13px;
  padding-bottom: 13px;
}
.corporate-table tbody td {
  color: var(--text);
  background: transparent;
  font-size: .9rem;
  padding-top: 13px;
  padding-bottom: 13px;
}
.corporate-table tbody tr:hover { background: rgba(255,255,255,.02); }
.table-responsive {
  border-radius: 16px;
  overflow-x: auto;
}
.badge { border-radius: 999px; padding: .4rem .7rem; font-weight: 700; }
.text-bg-success { background: rgba(34,197,94,.18) !important; color: #bbf7d0 !important; }
.text-bg-secondary { background: rgba(148,163,184,.16) !important; color: #d5deeb !important; }

.action-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}
.page-fab { display: none !important; }
.page-indicator {
  min-width: 120px;
  text-align: center;
  padding: 12px 14px;
  color: var(--muted);
}

.login-page,
.setup-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.18), transparent 28%),
    linear-gradient(180deg, #0b1220 0%, #111827 100%);
}
.login-card,
.choice-card,
.setup-card {
  width: min(100%, 1180px);
  border-radius: 24px;
  padding: 24px;
}
.login-card,
.choice-card {
  max-width: 520px;
  background: linear-gradient(180deg, rgba(27,38,56,.98), rgba(20,29,43,.98));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.login-brand { margin-bottom: 22px; }
.login-brand h1 { font-size: 1.8rem; margin: 10px 0 8px; }
.login-brand p { color: var(--muted); margin: 0; }
.brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
  font-weight: 800;
  margin-bottom: .9rem;
}
.demo-box, .choice-box { padding: 16px; }
.demo-box strong, .choice-box strong { color: var(--heading); }
.choice-card .btn-lg, .login-card .btn-lg { min-height: 48px; }

.setup-shell { width: min(100%, 1280px); }
.setup-main { width: 100%; }
.setup-card {
  background: linear-gradient(180deg, rgba(27,38,56,.98), rgba(20,29,43,.98));
  padding: 24px;
}
.setup-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.setup-header small,
.section-kicker {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #9ec6ff;
  font-weight: 700;
}
.setup-header h2 { font-size: 1.8rem; margin: 6px 0 8px; }
.setup-header p { color: var(--muted); margin: 0; }
.setup-summary-inline {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  max-width: 320px;
}
.setup-summary-inline strong { display: block; }
.setup-summary-inline span { display: block; margin-top: 4px; color: var(--muted); }
.setup-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.onboarding-step-chip {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  border-radius: 16px;
  min-height: 76px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  font-size: .88rem;
}
.onboarding-step-chip span {
  font-size: .72rem;
  color: #9ec6ff;
  font-weight: 700;
}
.onboarding-step-chip.active {
  background: linear-gradient(180deg, rgba(96,165,250,.15), rgba(255,255,255,.04));
  border-color: rgba(96,165,250,.25);
}
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-step-header { margin-bottom: 16px; }
.wizard-step-header h3 { margin: 0 0 6px; font-size: 1.35rem; }
.wizard-step-header p { margin: 0; }
.wizard-hint-box,
.wizard-skip-box,
.repeat-empty-state,
.repeat-card { padding: 16px; }
.wizard-hint-box strong,
.wizard-skip-box strong { display: block; color: var(--heading); margin-bottom: 4px; }
.setup-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.custom-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}
.custom-check .form-check-input {
  margin-top: 4px;
  background-color: rgba(15,23,42,.3);
  border-color: rgba(148,163,184,.28);
}
.custom-check .form-check-input:checked { background-color: var(--accent-2); border-color: var(--accent-2); }
.custom-check .form-check-label { color: var(--text); }
.custom-check small { display: block; color: var(--muted); margin-top: 3px; }

.corporate-modal {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(27,38,56,.98), rgba(20,29,43,.98));
  color: var(--text);
}
.corporate-modal .modal-header,
.corporate-modal .modal-body {
  background: transparent;
  border-color: var(--border);
}
.modal-content { box-shadow: var(--shadow); }
.btn-close { filter: invert(1) contrast(.9); }

.empty-state {
  padding: 40px 22px;
  text-align: center;
  border: 1px dashed rgba(148,163,184,.18);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
}

.calendar-board,
.employee-selector,
.selection-toolbar,
.scope-box,
.dropdown-checklist,
.choice-pill,
.choice-grid,
.checklist-menu {
  color: var(--text);
}
.calendar-board {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(27,38,56,.98), rgba(20,29,43,.98));
}
.calendar-head,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-head span,
.calendar-day {
  border-right: 1px solid rgba(148,163,184,.10);
  border-bottom: 1px solid rgba(148,163,184,.10);
}
.calendar-head span:last-child,
.calendar-week .calendar-day:last-child { border-right: 0; }
.calendar-head span {
  padding: .7rem .4rem;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--muted);
  background: rgba(255,255,255,.03);
}
.calendar-week { min-height: 96px; }
.calendar-day {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
  padding: .55rem;
  background-color: rgba(255,255,255,.02);
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, outline-color .15s ease;
}
.calendar-day:hover { background-color: rgba(255,255,255,.05); }
.calendar-day.is-out { background: rgba(148,163,184,.05); color: #90a0b5; }
.calendar-day.is-weekend { background: rgba(255,255,255,.025); }
.calendar-day.is-selected {
  background: rgba(96,165,250,.12);
  outline: 2px solid rgba(96,165,250,.35);
  outline-offset: -2px;
}
.calendar-day.is-today .calendar-day-number {
  background: rgba(96,165,250,.2);
  color: #eff6ff;
}
.calendar-day-top { display: flex; justify-content: flex-end; }
.calendar-day-number {
  display: inline-flex;
  min-width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--heading);
  font-weight: 700;
  font-size: .86rem;
}
.calendar-events-dots {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  min-height: 14px;
  margin-top: .55rem;
  align-items: center;
}
.calendar-event-chip,
.selected-date-badge,
.event-type-pill {
  background: rgba(96,165,250,.16);
  color: #dbeafe;
}
.calendar-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96,165,250,.16);
}
.calendar-event-box {
  width: 16px;
  height: 12px;
  border-radius: 4px;
  border: 0;
  padding: 0;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239,68,68,.12);
}
.event-type-pill.type-feriado,
.calendar-event-dot.type-feriado,
.calendar-event-box.type-feriado { background: rgba(239,68,68,.82); }
.event-type-pill.type-recesso,
.calendar-event-dot.type-recesso { background: rgba(124,58,237,.65); color: #ede9fe; }
.event-type-pill.type-fechamento,
.calendar-event-dot.type-fechamento { background: rgba(234,88,12,.7); color: #ffedd5; }
.event-type-pill.type-evento-interno,
.calendar-event-dot.type-evento-interno { background: rgba(8,145,178,.68); color: #cffafe; }
.calendar-event-more { font-size: .74rem; color: var(--muted); }

.dropdown-checklist { position: relative; }
.checklist-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 8px;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
}
.checklist-menu.open { display: block; }
.checklist-item {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
}
.checklist-item:hover { background: rgba(255,255,255,.04); }
.checklist-item span small { color: var(--muted); }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .55rem;
}
.choice-pill {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .75rem .85rem;
}
.choice-pill input { margin-top: .2rem; }
.choice-pill small { color: var(--muted); }
.scope-box {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: .95rem;
}
.selection-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .95rem 1rem;
}
.selected-dates-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-height: 34px;
}
.selected-date-badge {
  display: inline-flex;
  align-items: center;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
}
.detail-notes {
  border-radius: 14px;
  padding: .95rem;
  min-height: 88px;
}
.employee-selector {
  max-height: 340px;
  overflow: auto;
  border-radius: 14px;
  padding: .55rem;
}
.employee-check {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .6rem;
  border-radius: 10px;
}
.employee-check:hover { background: rgba(96,165,250,.06); }
.employee-check small { color: var(--muted); }
.report-table,
.employee-table,
.maintenance-events-table,
.standard-list-table {
  width: 100%;
  table-layout: fixed;
}
.employee-table .wrap-col,
.maintenance-events-table .wrap-col,
.standard-list-table .wrap-col,
.report-table .wrap-col {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.employee-table th,
.employee-table td,
.report-table th,
.report-table td,
.maintenance-events-table th,
.maintenance-events-table td { vertical-align: middle; }
.employee-table .col-name { width: 22%; }
.employee-table .col-code { width: 10%; }
.employee-table .col-cpf { width: 14%; }
.employee-table .col-role { width: 18%; }
.employee-table .col-sector { width: 16%; }
.employee-table .col-status { width: 10%; }
.employee-table .col-actions { width: 10%; }
.page-indicator {
  min-width: 110px;
  text-align: center;
  padding: .65rem .9rem;
}
.modal-sheet-window { max-width: 1140px; }
.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  padding: 0;
}
.page-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
}

/* maintenance page refinements */
.maintenance-calendar-card { padding: 18px; }
.maintenance-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.maintenance-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem;
}
.calendar-title {
  min-width: 132px;
  padding: 0 .25rem;
  text-align: center;
  font-weight: 700;
  color: var(--heading);
}
.compact-selection-toolbar { align-items: center; }
.selection-copy { flex: 1 1 420px; }
.maintenance-events-table th:nth-child(1) { width: 24%; }
.maintenance-events-table th:nth-child(2) { width: 24%; }
.maintenance-events-table th:nth-child(3) { width: 18%; }
.maintenance-events-table th:nth-child(4) { width: 34%; }
.event-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: .34rem .6rem;
  border-radius: 999px;
  font-size: .79rem;
  font-weight: 700;
}
.event-type-pill.type-feriado { background: rgba(239,68,68,.16); color: #fecaca; }
.event-type-pill.type-recesso { background: rgba(124,58,237,.18); color: #ede9fe; }
.event-type-pill.type-fechamento { background: rgba(234,88,12,.18); color: #ffedd5; }
.event-type-pill.type-evento-interno { background: rgba(8,145,178,.18); color: #cffafe; }
.detail-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.maintenance-toolbar .helper-note { max-width: 620px; }

.company-logo-panel {
  padding: 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}
.company-logo-upload,
.company-logo-box { padding: 14px; }
.company-logo-preview {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  background: rgba(255,255,255,.95);
  border-radius: 14px;
  padding: 10px;
}
.company-logo-remove-form { display: flex; justify-content: flex-end; }

.status-presente { background: rgba(34,197,94,.08); }
.status-falta { background: rgba(239,68,68,.08); }
.status-incompleto { background: rgba(245,158,11,.08); }
.status-fim_semana { background: rgba(148,163,184,.06); }
.status-evento { background: rgba(96,165,250,.08); }
.status-justificado, .status-abonado { background: rgba(45,212,191,.08); }
.row-selected { outline: 2px solid rgba(96,165,250,.26); }
.date-link { color: #bfdbfe; text-decoration: none; font-weight: 700; }
.date-link:hover { text-decoration: underline; }
.sticky-card { position: sticky; top: 1rem; }
.corporate-table tbody td small { color: var(--muted); }

@media (max-width: 1200px) {
  .setup-progress { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .company-logo-panel { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; width: 100%; overflow: visible; padding: 18px 14px; }
  .sidebar-brand-copy,
  .menu-section-title,
  .nav-link span,
  .user-card strong,
  .user-card span,
  .btn-sidebar-theme span,
  .btn-sidebar-logout span { opacity: 1; visibility: visible; }
  .sidebar > div:first-child,
  .sidebar-footer { align-items: stretch; }
  .sidebar-brand {
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    min-height: 0;
    padding: 14px;
    margin: 0;
  }
  .nav-link { justify-content: flex-start; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky-card { position: static; }
}
@media (max-width: 992px) {
  .maintenance-toolbar,
  .maintenance-actions {
    width: 100%;
  }
  .maintenance-actions {
    justify-content: space-between;
  }
  .calendar-week { min-height: 88px; }
  .calendar-day { min-height: 88px; }
}
@media (max-width: 768px) {
  .content-area { padding: 14px; }
  .page-head-main,
  .panel-card,
  .metric-card,
  .mini-stat,
  .login-card,
  .choice-card,
  .setup-card,
  .maintenance-calendar-card { padding: 16px; }
  .page-title-row,
  .setup-header,
  .setup-footer,
  .selection-toolbar { flex-direction: column; }
  .page-head-side { width: 100%; justify-content: space-between; }
  .topbar-live { text-align: left; width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
  .setup-progress { grid-template-columns: 1fr; }
  .calendar-head span { font-size: .72rem; padding: .55rem .25rem; }
  .calendar-week { min-height: 82px; }
  .calendar-day { min-height: 82px; padding: .4rem; }
  .calendar-day-number { min-width: 24px; min-height: 24px; font-size: .78rem; }
  .maintenance-events-table th:nth-child(1),
  .maintenance-events-table th:nth-child(2),
  .maintenance-events-table th:nth-child(3),
  .maintenance-events-table th:nth-child(4) { width: auto; }
  .detail-grid-2 { grid-template-columns: 1fr; }
}

.activation-code {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(96,165,250,.12);
  color: #dbeafe;
  border: 1px solid rgba(96,165,250,.18);
  font-size: .92rem;
  letter-spacing: .08em;
}
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.clock-terminal-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}
.clock-terminal-card {
  width: min(100%, 740px);
  background: linear-gradient(180deg, rgba(25,36,53,.96), rgba(17,24,39,.96));
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.clock-activation-head,
.clock-live-box,
.clock-register-form,
.clock-terminal-header,
.device-info-box { margin-bottom: 24px; }
.clock-activation-head h2,
.clock-terminal-header h2 {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 8px;
  color: var(--heading);
}
.clock-activation-head p {
  text-align: center;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}
.clock-code-input {
  height: 72px;
  border-radius: 18px;
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: .04em;
  margin-bottom: 20px;
}
.device-info-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
  padding: 18px 20px;
}
.device-info-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 700;
  color: var(--heading);
}
.device-info-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
}
.device-info-grid span { color: var(--muted); }
.device-info-grid strong { color: var(--heading); text-align: right; }
.clock-submit-btn {
  width: 100%;
  min-height: 62px;
  border-radius: 18px;
  font-size: 1.2rem;
  font-weight: 700;
}
.clock-terminal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
}
.clock-terminal-header h2 {
  margin: 0;
  text-align: left;
  font-size: 1.8rem;
}
.clock-terminal-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c8d7ea;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}
.clock-live-box {
  text-align: center;
  padding: 42px 20px;
}
.clock-weekday {
  color: var(--accent);
  font-size: 2.2rem;
  text-transform: capitalize;
}
.clock-time {
  color: var(--heading);
  font-size: clamp(3.8rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1;
  margin: 12px 0;
}
.clock-date {
  color: #c8d7ea;
  font-size: 1.6rem;
  text-transform: capitalize;
}
.clock-register-form {
  max-width: 720px;
  margin: 0 auto 16px;
}
.clock-footer-note {
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
}
@media (max-width: 768px) {
  .clock-terminal-card { padding: 22px 16px; }
  .clock-terminal-header { flex-direction: column; text-align: center; }
  .clock-terminal-header h2 { text-align: center; }
  .clock-weekday { font-size: 1.5rem; }
  .clock-date { font-size: 1.1rem; }
  .clock-code-input { height: 60px; font-size: 1.15rem; }
}


.employee-table {
  table-layout: fixed;
}
.employee-table thead th,
.employee-table tbody td {
  vertical-align: middle;
}
.employee-table th.col-name,
.employee-table td.col-name { width: 25%; min-width: 220px; text-align: left; }
.employee-table th.col-code,
.employee-table td.col-code { width: 90px; }
.employee-table th.col-cpf,
.employee-table td.col-cpf { width: 130px; }
.employee-table th.col-role,
.employee-table td.col-role { width: 19%; min-width: 170px; text-align: left; }
.employee-table th.col-sector,
.employee-table td.col-sector { width: 17%; min-width: 150px; text-align: left; }
.employee-table th.col-status,
.employee-table td.col-status { width: 92px; }
.employee-table th.col-actions,
.employee-table td.col-actions { width: 96px; }
.employee-table .wrap-col {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.employee-action-group {
  gap: 6px;
  flex-wrap: nowrap;
}
.employee-action-group form {
  margin: 0;
}
.employee-action-group .btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.employee-face-inline-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 14px;
  background: #f8fafc;
}
.employee-face-inline-card strong {
  display: block;
  color: #0f172a;
  margin-bottom: .15rem;
}
@media (max-width: 767px) {
  .employee-face-inline-card {
    flex-direction: column;
    align-items: stretch;
  }
}

.fab-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fab-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, .28);
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.fab-btn:hover {
  filter: brightness(1.06);
}
.fab-btn i {
  font-size: 1rem;
}
@media (max-width: 991.98px) {
  .employee-table {
    table-layout: auto;
  }
}
@media (max-width: 767.98px) {
  
.employee-face-inline-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 14px;
  background: #f8fafc;
}
.employee-face-inline-card strong {
  display: block;
  color: #0f172a;
  margin-bottom: .15rem;
}
@media (max-width: 767px) {
  .employee-face-inline-card {
    flex-direction: column;
    align-items: stretch;
  }
}

.fab-stack {
    right: 14px;
    bottom: 14px;
  }
  .fab-btn {
    min-height: 46px;
    padding: 0 14px;
    font-size: .92rem;
  }
}

.method-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  min-height: 100%;
}
.method-check input {
  margin-top: 4px;
}
.method-check span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.method-check small {
  color: var(--muted);
  line-height: 1.35;
}
.method-check.disabled {
  opacity: .82;
}
.clock-method-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.clock-method-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--heading);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.clock-method-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 22px;
}
.clock-tab-btn {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--heading);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}
.clock-tab-btn.active {
  background: var(--accent);
  color: #0f172a;
  border-color: transparent;
}
.clock-method-panel { display: none; }
.clock-method-panel.active { display: block; }
.qr-scanner-panel {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255,255,255,.02);
}
.qr-reader-box {
  width: min(100%, 420px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: #0b1220;
}
.qr-reader-box video {
  border-radius: 18px !important;
}
.qr-reader-fallback {
  padding: 24px 20px;
  color: var(--muted);
  text-align: center;
}
.qr-payload-input {
  min-height: 92px;
  border-radius: 16px;
  resize: vertical;
}
.face-coming-soon {
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 24px;
  padding: 34px 24px;
  background: rgba(255,255,255,.02);
}
.face-coming-soon i {
  font-size: 2.5rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 10px;
}
.face-coming-soon h3 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 1.2rem;
}
.face-coming-soon p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
}
@media (max-width: 768px) {
  .clock-method-chips { justify-content: center; }
}


.face-enroll-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:1rem}.face-camera-box,.face-preview-box,.face-scanner-box,.face-match-panel{background:#0f172a;border-radius:18px;padding:1rem;color:#e2e8f0}.face-camera-box video,.face-scanner-box video{width:100%;min-height:280px;max-height:360px;object-fit:cover;border-radius:14px;background:#020617}.face-camera-actions,.face-scanner-actions{display:flex;gap:.75rem;flex-wrap:wrap;justify-content:center;margin:.9rem 0}.face-preview-frame{min-height:280px;border:1px dashed rgba(148,163,184,.45);border-radius:14px;display:flex;align-items:center;justify-content:center;background:#111827;overflow:hidden}.face-preview-frame img,.face-match-photo img{width:100%;height:100%;object-fit:cover}.face-preview-placeholder,.face-match-empty{display:flex;align-items:center;justify-content:center;text-align:center;color:#94a3b8;padding:1rem;min-height:220px}.face-terminal-wrap{display:grid;grid-template-columns:1.1fr .9fr;gap:1rem}.face-match-card{display:flex;gap:1rem;align-items:center;height:100%}.face-match-photo{width:120px;height:150px;border-radius:14px;overflow:hidden;background:#111827;flex-shrink:0}.face-photo-fallback{display:flex;align-items:center;justify-content:center;height:100%;font-size:2rem;color:#94a3b8}.face-match-title{font-size:1.1rem;font-weight:700;margin-bottom:.3rem}.face-match-meta,.face-match-score{color:#cbd5e1;font-size:.92rem}.qr-reader-fallback{padding:1rem;border:1px dashed rgba(255,255,255,.3);border-radius:12px;text-align:center;color:#cbd5e1}.terminal-alert{font-size:.95rem}@media (max-width: 991px){.face-enroll-grid,.face-terminal-wrap{grid-template-columns:1fr}.face-camera-box video,.face-scanner-box video,.face-preview-frame{min-height:220px}}

.face-camera-actions .btn,.face-scanner-actions .btn{min-width:170px}.face-camera-actions input,.face-scanner-actions input{display:none}

.face-terminal-live-only .face-scanner-box{display:flex;flex-direction:column;gap:.85rem}.face-live-status{padding:.75rem 1rem;border-radius:999px;background:rgba(15,23,42,.8);border:1px solid rgba(148,163,184,.35);text-align:center;font-weight:600;color:#e2e8f0}.face-live-status[data-tone='success']{background:rgba(22,163,74,.18);border-color:rgba(34,197,94,.45);color:#dcfce7}.face-live-status[data-tone='warning']{background:rgba(234,179,8,.12);border-color:rgba(234,179,8,.45);color:#fef3c7}.face-live-status[data-tone='danger']{background:rgba(220,38,38,.16);border-color:rgba(248,113,113,.45);color:#fee2e2}.face-live-frame{position:relative}.face-live-frame video{display:block;width:100%;min-height:300px;max-height:420px;object-fit:cover;border-radius:16px;background:#020617}.face-target-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.face-target-ring{width:min(58vw,270px);height:min(72vw,340px);border:3px solid rgba(255,255,255,.92);border-radius:160px;box-shadow:0 0 0 9999px rgba(2,6,23,.28);background:transparent}@media (max-width: 991px){.face-live-frame video{min-height:360px;max-height:62vh}.face-target-ring{width:min(64vw,250px);height:min(86vw,320px)}}

.face-upload-box{display:flex;flex-direction:column;justify-content:center}.face-upload-drop{min-height:280px;border:1px dashed rgba(148,163,184,.45);border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:1.5rem;background:#111827;gap:.6rem}.face-upload-icon{font-size:2.6rem;color:#cbd5e1}.face-upload-drop h6{margin:0;font-size:1rem;font-weight:700}.face-upload-drop p{margin:0;color:#94a3b8;max-width:360px}.face-live-launcher{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.45rem;border:none;border-radius:16px;background:linear-gradient(180deg, rgba(2,6,23,.62), rgba(2,6,23,.88));color:#fff;text-align:center;padding:1.5rem}.face-live-launcher i{font-size:2.2rem}.face-live-launcher span{font-size:1rem;font-weight:700}.face-live-launcher small{max-width:240px;color:#cbd5e1}.face-live-frame video.d-none + .face-target-overlay{display:none}
.clock-terminal-header.centered{justify-content:center;text-align:center}
.clock-terminal-brand{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%}
.clock-terminal-sub.centered{justify-content:center}
.qr-confirm-card{margin-top:18px;border:1px solid var(--border);border-radius:20px;background:rgba(255,255,255,.04);padding:18px;display:grid;grid-template-columns:110px 1fr;gap:16px;align-items:center}
.qr-confirm-photo{width:110px;height:138px;border-radius:16px;overflow:hidden;background:#0b1220;display:flex;align-items:center;justify-content:center}
.qr-confirm-photo img{width:100%;height:100%;object-fit:cover}
.qr-confirm-fallback{font-size:2rem;color:#94a3b8}
.qr-confirm-copy{display:flex;flex-direction:column;gap:6px}
.qr-confirm-copy h3{margin:0;color:var(--heading);font-size:1.35rem}
.qr-confirm-label{color:var(--muted);font-size:.82rem;text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.qr-confirm-meta{margin:0;color:#c8d7ea}
.qr-confirm-event{display:inline-flex;align-self:flex-start;padding:8px 12px;border-radius:999px;background:rgba(37,99,235,.16);color:#dbeafe;border:1px solid rgba(96,165,250,.35);font-weight:700}
.qr-confirm-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.qr-feedback-box{margin-top:16px;padding:14px 16px;border-radius:16px;background:rgba(255,255,255,.04);border:1px dashed rgba(148,163,184,.4);text-align:center;color:#cbd5e1;font-weight:600}
@media (max-width: 768px){.qr-confirm-card{grid-template-columns:1fr;text-align:center}.qr-confirm-photo{margin:0 auto}.qr-confirm-event{align-self:center}.qr-confirm-actions{grid-template-columns:1fr}}


.employees-table-wrap{overflow-x:visible;}
.employee-table th.col-name,.employee-table td.col-name{width:26%;min-width:0;}
.employee-table th.col-code,.employee-table td.col-code{width:78px;}
.employee-table th.col-cpf,.employee-table td.col-cpf{width:118px;}
.employee-table th.col-role,.employee-table td.col-role{width:20%;min-width:0;}
.employee-table th.col-sector,.employee-table td.col-sector{width:18%;min-width:0;}
.employee-table th.col-status,.employee-table td.col-status{width:86px;}
.employee-table th.col-actions,.employee-table td.col-actions{width:108px;}
.employee-action-group{flex-wrap:nowrap;gap:.35rem;}
.employee-action-group form{margin:0;}
.report-type-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;}
.report-type-card{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.1rem;border:1px solid rgba(148,163,184,.18);border-radius:16px;background:rgba(15,23,42,.02);}
@media (max-width: 991px){.employees-table-wrap{overflow-x:auto;}.report-type-card{align-items:flex-start;flex-direction:column;}}


.form-select option, select option, .dropdown-menu, .dropdown-item { background-color: #0f172a; color: #e5eefc; }
.form-select option:checked, select option:checked { background-color: #1e40af; color: #fff; }
.table-responsive { overflow-x: auto; }


.btn-sidebar-theme {
  border: 1px solid rgba(148,163,184,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  color: #e5edf7;
  border-radius: 12px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}
.btn-sidebar-theme:hover { background: rgba(255,255,255,.1); color: #fff; }

body.light-theme {
  --bg: #f3f6fb;
  --bg-elev: #ffffff;
  --bg-soft: #eef3f9;
  --sidebar: #f8fafc;
  --sidebar-border: rgba(15, 23, 42, .08);
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #eef4fb;
  --muted: #64748b;
  --text: #1e293b;
  --heading: #0f172a;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --border: rgba(15, 23, 42, .10);
  --shadow: 0 14px 28px rgba(15, 23, 42, .08);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%);
  color: var(--text);
}
body.light-theme .sidebar {
  background: rgba(248,250,252,.98);
  border-right-color: rgba(15, 23, 42, .08);
}
body.light-theme .sidebar-brand {
  background: linear-gradient(180deg, rgba(37,99,235,.08), rgba(255,255,255,.98));
  border-color: rgba(37,99,235,.10);
}
body.light-theme .sidebar-brand-copy small,
body.light-theme .nav-link,
body.light-theme .menu-section-title,
body.light-theme .user-card span,
body.light-theme .helper-note,
body.light-theme .muted-note,
body.light-theme .breadcrumb-line,
body.light-theme .topbar-live span,
body.light-theme .form-label,
body.light-theme .checklist-head,
body.light-theme .selected-dates-empty,
body.light-theme .empty-state,
body.light-theme .repeat-empty-state {
  color: #64748b;
}
body.light-theme .user-card,
body.light-theme .page-head-main,
body.light-theme .panel-card,
body.light-theme .mini-stat,
body.light-theme .section-card,
body.light-theme .calendar-day,
body.light-theme .modal-content,
body.light-theme .dropdown-checklist .checklist-menu,
body.light-theme .table-responsive,
body.light-theme .clock-card,
body.light-theme .terminal-shell,
body.light-theme .auth-card,
body.light-theme .wizard-shell {
  background: rgba(255,255,255,.98);
  color: var(--text);
  border-color: rgba(15,23,42,.10);
  box-shadow: var(--shadow);
}
body.light-theme .page-head-main {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
}
body.light-theme .nav-link:hover { background: rgba(37,99,235,.08); color: #0f172a; }
body.light-theme .nav-link.active {
  color: #0f172a;
  background: linear-gradient(90deg, rgba(37,99,235,.16), rgba(37,99,235,.05));
  border-color: rgba(37,99,235,.18);
}
body.light-theme .btn-sidebar-theme,
body.light-theme .btn-sidebar-logout {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15,23,42,.10);
}
body.light-theme .btn-sidebar-theme:hover,
body.light-theme .btn-sidebar-logout:hover { background: #eff6ff; }
body.light-theme .form-control,
body.light-theme .form-select,
body.light-theme textarea,
body.light-theme select,
body.light-theme input {
  background-color: #fff;
  color: #0f172a;
  border-color: rgba(15,23,42,.14);
}
body.light-theme .form-control:focus,
body.light-theme .form-select:focus,
body.light-theme textarea:focus,
body.light-theme select:focus,
body.light-theme input:focus {
  background-color: #fff;
  color: #0f172a;
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 .18rem rgba(37,99,235,.12);
}
body.light-theme .form-select option { background: #fff; color: #0f172a; }
body.light-theme .table,
body.light-theme .table > :not(caption) > * > * { color: #1e293b; }
body.light-theme .corporate-table thead th {
  background: #eff6ff;
  color: #0f172a;
}
body.light-theme .dropdown-checklist .checklist-menu,
body.light-theme .checklist-item,
body.light-theme .checklist-item span,
body.light-theme .checklist-item small {
  background: #fff;
  color: #1e293b;
}
body.light-theme .calendar-event,
body.light-theme .badge,
body.light-theme .status-pill { filter: none; }


/* Light theme completeness pass */
body.light-theme .sidebar-brand-copy strong,
body.light-theme .page-title-row h1,
body.light-theme .panel-header h3,
body.light-theme .wizard-step-header h3,
body.light-theme .setup-header h2,
body.light-theme .choice-box h2,
body.light-theme .topbar h2,
body.light-theme .clock-terminal-company,
body.light-theme .clock-terminal-clock,
body.light-theme .qr-confirm-copy h3,
body.light-theme .face-match-title,
body.light-theme .brand-box h1,
body.light-theme .login-brand h1,
body.light-theme .company-logo-copy strong,
body.light-theme .company-logo-box strong,
body.light-theme .modal-title,
body.light-theme .section-kicker,
body.light-theme .setup-header small,
body.light-theme .onboarding-step-chip span,
body.light-theme .metric-card strong,
body.light-theme .mini-stat strong,
body.light-theme .sector-item span,
body.light-theme .wizard-hint-box strong,
body.light-theme .wizard-skip-box strong,
body.light-theme .demo-box strong,
body.light-theme .choice-box strong,
body.light-theme .topbar-live strong,
body.light-theme .calendar-day-number,
body.light-theme .qr-confirm-event,
body.light-theme .clock-method-chip,
body.light-theme .clock-tab-btn,
body.light-theme .face-upload-drop h6 {
  color: #0f172a;
}
body.light-theme .login-page,
body.light-theme .setup-page {
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%);
}
body.light-theme .login-card,
body.light-theme .choice-card,
body.light-theme .setup-card,
body.light-theme .calendar-board,
body.light-theme .corporate-modal,
body.light-theme .setup-summary-inline,
body.light-theme .onboarding-step-chip,
body.light-theme .custom-check,
body.light-theme .wizard-hint-box,
body.light-theme .wizard-skip-box,
body.light-theme .repeat-card,
body.light-theme .repeat-empty-state,
body.light-theme .info-grid > div,
body.light-theme .sector-item,
body.light-theme .company-logo-box,
body.light-theme .company-logo-upload,
body.light-theme .choice-pill,
body.light-theme .checklist-menu,
body.light-theme .qr-scanner-panel,
body.light-theme .face-coming-soon,
body.light-theme .method-check,
body.light-theme .clock-method-chip,
body.light-theme .clock-tab-btn,
body.light-theme .report-type-card,
body.light-theme .employee-face-inline-card,
body.light-theme .face-camera-box,
body.light-theme .face-preview-box,
body.light-theme .face-scanner-box,
body.light-theme .face-match-panel,
body.light-theme .face-upload-drop,
body.light-theme .qr-confirm-card,
body.light-theme .qr-feedback-box,
body.light-theme .setup-card,
body.light-theme .login-card,
body.light-theme .choice-card {
  background: #ffffff;
  color: #1e293b;
  border-color: rgba(15,23,42,.10);
}
body.light-theme .page-title-row p,
body.light-theme .login-brand p,
body.light-theme .setup-header p,
body.light-theme .setup-summary-inline span,
body.light-theme .custom-check small,
body.light-theme .choice-pill small,
body.light-theme .calendar-event-more,
body.light-theme .checklist-item span small,
body.light-theme .employee-check small,
body.light-theme .face-preview-placeholder,
body.light-theme .face-match-empty,
body.light-theme .face-photo-fallback,
body.light-theme .face-match-meta,
body.light-theme .face-match-score,
body.light-theme .face-upload-drop p,
body.light-theme .face-live-launcher small,
body.light-theme .qr-confirm-meta,
body.light-theme .qr-feedback-box,
body.light-theme .qr-reader-fallback,
body.light-theme .face-coming-soon p,
body.light-theme .method-check small,
body.light-theme .helper-note,
body.light-theme .muted-note {
  color: #64748b;
}
body.light-theme .btn-close { filter: none; }
body.light-theme .calendar-head span { background: #f8fafc; color: #475569; }
body.light-theme .calendar-day { background: #ffffff; }
body.light-theme .calendar-day:hover { background: #f8fbff; }
body.light-theme .calendar-day.is-out { background: #f8fafc; color: #94a3b8; }
body.light-theme .calendar-day.is-weekend { background: #fbfdff; }
body.light-theme .calendar-day.is-selected { background: rgba(37,99,235,.08); outline-color: rgba(37,99,235,.24); }
body.light-theme .calendar-day.is-today .calendar-day-number { background: rgba(37,99,235,.14); color: #1d4ed8; }
body.light-theme .checklist-item:hover,
body.light-theme .employee-check:hover { background: rgba(37,99,235,.06); }
body.light-theme .corporate-table thead th,
body.light-theme .table thead th { background: #eff6ff; color: #0f172a; }
body.light-theme .corporate-table tbody tr:hover { background: #f8fbff; }
body.light-theme .text-bg-secondary { background: #e2e8f0 !important; color: #334155 !important; }
body.light-theme .text-bg-success { background: #dcfce7 !important; color: #166534 !important; }
body.light-theme .text-bg-primary { background: #dbeafe !important; color: #1d4ed8 !important; }
body.light-theme .text-bg-info { background: #cffafe !important; color: #0f766e !important; }
body.light-theme .text-bg-dark { background: #e2e8f0 !important; color: #0f172a !important; }
body.light-theme .badge,
body.light-theme .status-pill { filter: none; }
body.light-theme .alert-warning { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
body.light-theme .alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
body.light-theme .alert-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
body.light-theme .alert-info,
body.light-theme .alert-primary { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
body.light-theme .form-control::placeholder { color: #94a3b8; }
body.light-theme .input-group-text {
  background: #f8fafc;
  color: #334155;
  border-color: rgba(15,23,42,.14);
}
body.light-theme .dropdown-menu,
body.light-theme .dropdown-item,
body.light-theme .dropdown-item-text {
  background: #ffffff;
  color: #1e293b;
}
body.light-theme .dropdown-item:hover,
body.light-theme .dropdown-item:focus {
  background: #eff6ff;
  color: #0f172a;
}
body.light-theme .clock-method-panel,
body.light-theme .clock-terminal,
body.light-theme .clock-terminal-header,
body.light-theme .clock-terminal-sub,
body.light-theme .clock-card,
body.light-theme .terminal-shell {
  color: #1e293b;
}
body.light-theme .face-live-status {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
body.light-theme .face-live-frame video,
body.light-theme .face-camera-box video,
body.light-theme .face-scanner-box video,
body.light-theme .qr-reader-box,
body.light-theme .qr-confirm-photo,
body.light-theme .face-preview-frame,
body.light-theme .face-match-photo,
body.light-theme .face-upload-drop {
  background: #e2e8f0;
}
body.light-theme .face-live-launcher {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(241,245,249,.96));
  color: #0f172a;
}
body.light-theme .face-live-launcher small { color: #475569; }
body.light-theme .face-target-ring {
  border-color: rgba(29,78,216,.55);
  box-shadow: 0 0 0 9999px rgba(226,232,240,.42);
}
body.light-theme .qr-confirm-event {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}
body.light-theme .event-type-pill,
body.light-theme .calendar-event-chip,
body.light-theme .selected-date-badge {
  background: #dbeafe;
  color: #1d4ed8;
}
body.light-theme .table-responsive {
  background: #fff;
}
body.light-theme .report-type-card .btn,
body.light-theme .action-group .btn,
body.light-theme .employee-action-group .btn {
  box-shadow: none;
}
body.light-theme .employees-table-wrap,
body.light-theme .table-responsive {
  overflow-x: visible;
}
@media (max-width: 991px) {
  body.light-theme .employees-table-wrap,
  body.light-theme .table-responsive { overflow-x: auto; }
}


/* Light theme contrast fixes - page by page */
body.light-theme .metric-card,
body.light-theme .page-indicator,
body.light-theme .selection-toolbar,
body.light-theme .calendar-nav,
body.light-theme .company-logo-panel,
body.light-theme .clock-terminal-card,
body.light-theme .device-info-box,
body.light-theme .clock-terminal-header,
body.light-theme .maintenance-actions {
  background: #ffffff;
  color: #1e293b;
  border-color: rgba(15,23,42,.12);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
body.light-theme .metric-card span,
body.light-theme .page-indicator,
body.light-theme .calendar-title,
body.light-theme .device-info-grid span,
body.light-theme .clock-activation-head p,
body.light-theme .clock-footer-note,
body.light-theme .company-logo-copy .helper-note,
body.light-theme .company-logo-box .helper-note,
body.light-theme .selected-dates-empty,
body.light-theme .selected-date-badge,
body.light-theme .selected-dates-badges,
body.light-theme .helper-note {
  color: #475569;
}
body.light-theme .btn-outline-primary,
body.light-theme .page-action-btn,
body.light-theme a.btn-outline-primary,
body.light-theme button.btn-outline-primary,
body.light-theme .edit-sector-btn,
body.light-theme .clock-tab-btn {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
body.light-theme .btn-outline-primary:hover,
body.light-theme .page-action-btn:hover,
body.light-theme a.btn-outline-primary:hover,
body.light-theme button.btn-outline-primary:hover,
body.light-theme .edit-sector-btn:hover,
body.light-theme .clock-tab-btn:hover {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #93c5fd;
}
body.light-theme .btn-light,
body.light-theme .btn-light.border,
body.light-theme .calendar-nav .btn-light,
body.light-theme .calendar-nav .btn-light.border {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(15,23,42,.14);
}
body.light-theme .btn-light:hover,
body.light-theme .btn-light.border:hover,
body.light-theme .calendar-nav .btn-light:hover,
body.light-theme .calendar-nav .btn-light.border:hover {
  background: #eef2f7;
  color: #0f172a;
}
body.light-theme .btn-outline-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
body.light-theme .btn-outline-danger:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
body.light-theme .calendar-board {
  background: #ffffff;
  border-color: rgba(15,23,42,.12);
}
body.light-theme .calendar-head span {
  background: #eff6ff;
  color: #334155;
  border-color: rgba(15,23,42,.10);
}
body.light-theme .selected-date-badge,
body.light-theme .calendar-event-chip,
body.light-theme .event-type-pill {
  background: #dbeafe;
  color: #1d4ed8;
}
body.light-theme .company-logo-upload,
body.light-theme .company-logo-box,
body.light-theme .company-logo-copy,
body.light-theme .clock-activation-head,
body.light-theme .selection-copy {
  color: #1e293b;
}
body.light-theme .clock-activation-head h2,
body.light-theme .device-info-title,
body.light-theme .clock-terminal-header h2,
body.light-theme .calendar-title,
body.light-theme .company-logo-copy strong,
body.light-theme .company-logo-box strong {
  color: #0f172a;
}
body.light-theme .clock-terminal-sub,
body.light-theme .clock-date {
  color: #475569;
}
body.light-theme .clock-live-box {
  background: #f8fbff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 20px;
}
body.light-theme .table-responsive,
body.light-theme .maintenance-calendar-card,
body.light-theme .maintenance-events-card {
  background: #ffffff;
}


/* Light theme final fix - activation code box in clocks */
body.light-theme .activation-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #1e3a8a;
  border: 1px solid #93c5fd;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  font-weight: 700;
}
body.light-theme td .activation-code,
body.light-theme code.activation-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: .08em;
}
body.light-theme .corporate-table td code.activation-code {
  white-space: nowrap;
}

.role-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}
.role-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}
.role-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}
.role-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}
body.light-theme .role-list-item {
  background: #fff;
  border-color: rgba(15,23,42,.12);
}


.sidebar-footer {
  gap: 10px;
}
.sidebar-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}
.sidebar:not(.expanded) .sidebar-brand-copy,
.sidebar:not(.expanded) .menu-section-title,
.sidebar:not(.expanded) .user-card strong,
.sidebar:not(.expanded) .user-card span,
.sidebar:not(.expanded) .btn-sidebar-theme span,
.sidebar:not(.expanded) .btn-sidebar-logout span,
.sidebar:not(.expanded) .nav-link span {
  display: none !important;
}
.sidebar:not(.expanded) .sidebar-brand,
.sidebar:not(.expanded) .user-card,
.sidebar:not(.expanded) .btn-sidebar-theme,
.sidebar:not(.expanded) .btn-sidebar-logout {
  box-shadow: none;
}
body.sidebar-expanded .user-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(148,163,184,.14);
}
body.sidebar-expanded .btn-sidebar-theme,
body.sidebar-expanded .btn-sidebar-logout {
  min-height: 42px;
}
body.light-theme .sidebar:not(.expanded) .sidebar-brand,
body.light-theme .sidebar:not(.expanded) .user-card,
body.light-theme .sidebar:not(.expanded) .btn-sidebar-theme,
body.light-theme .sidebar:not(.expanded) .btn-sidebar-logout {
  background: transparent;
  border-color: transparent;
}


/* Face button contrast fix in dark mode */
.employee-face-inline-card {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}
.employee-face-inline-card strong {
  color: #f8fafc;
}
.employee-face-inline-card .helper-note {
  color: #cbd5e1;
}
#editFaceLaunchBtn {
  background: linear-gradient(135deg, rgba(59,130,246,.24), rgba(37,99,235,.18));
  border: 1px solid rgba(96,165,250,.5);
  color: #eff6ff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(37,99,235,.16);
}
#editFaceLaunchBtn:hover,
#editFaceLaunchBtn:focus {
  background: linear-gradient(135deg, rgba(59,130,246,.34), rgba(37,99,235,.26));
  border-color: rgba(147,197,253,.72);
  color: #ffffff;
}
#editFaceLaunchBtn i {
  color: inherit;
}
body.light-theme #editFaceLaunchBtn {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  box-shadow: none;
}
body.light-theme #editFaceLaunchBtn:hover,
body.light-theme #editFaceLaunchBtn:focus {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
}
