/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --navy:        #1A1814;
  --navy-mid:    #2A2820;
  --blue:        #F2C438;
  --blue-dark:   #D4A82E;
  --blue-light:  #FBF5D6;

  --bg:          #EDEDEA;
  --surface:     #FFFFFF;
  --surface-2:   #F5F5F2;

  --border:      #E8E8E4;
  --border-mid:  #D0D0CB;

  --text:        #1A1814;
  --text-muted:  #6B6B65;
  --text-xs:     #9A9A93;

  --danger:         #C2410C;

  --success:        #059669;
  --success-bg:     #ECFDF5;
  --success-border: #A7F3D0;
  --error:          #DC2626;
  --error-bg:       #FEF2F2;
  --error-border:   #FECACA;
  --warning:        #D97706;
  --warning-bg:     #FFFBEB;
  --warning-border: #FDE68A;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  --shadow:    0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  user-select: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--blue);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  color: white;
}

.logo-icon svg { width: 20px; height: 20px; }

.logo-text h1 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  display: block;
}

/* ===== NAV ===== */
nav {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 9px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.07);
}

.nav-btn {
  background: none;
  border: none;
  padding: 7px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: #94A3B8;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-block;
}

.nav-btn:hover  { background: rgba(255,255,255,0.08); color: #F0EDE6; }
.nav-btn.active { background: var(--blue); color: var(--navy); font-weight: 600; }

/* ===== MAIN ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

/* ===== FLASH MESSAGES ===== */
.flash-list { list-style: none; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }

.flash {
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success); }
.flash-danger  { background: var(--error-bg);   border: 1px solid var(--error-border);   color: var(--error); }
.flash-warning { background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--warning); }

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}

.section-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.section-actions { display: flex; gap: 8px; align-items: center; }

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.card-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 24px; }

/* ===== TABLE ===== */
.table-wrapper {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  background: var(--navy);
  color: #94A3B8;
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

thead th.col-right { text-align: right; }
thead th.col-center { text-align: center; }

tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 11px 16px; color: var(--text); }
tbody tr:hover { background: var(--surface-2); }

td.col-right  { text-align: right; font-family: 'DM Mono', monospace; font-size: 0.8125rem; }
td.col-center { text-align: center; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-muted   { background: var(--surface-2);  color: var(--text-muted); border: 1px solid var(--border); }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--blue);
  color: var(--navy);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(242,196,56,0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 3px 8px rgba(242,196,56,0.35); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-danger:hover:not(:disabled) { background: #9a3209; }
.btn-danger:active:not(:disabled) { transform: scale(0.98); }

/* Small button variant */
.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }

/* Icon-only button */
.btn-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
  color: #fff;
  opacity: 0.75;
}

.btn-icon:hover  { opacity: 1; transform: scale(1.1); }
.btn-icon:active { transform: scale(0.95); }

.btn-icon-edit   { background: var(--navy); }
.btn-icon-edit:hover { background: var(--blue); }

.btn-icon-danger { background: var(--navy); }
.btn-icon-danger:hover { background: var(--danger); }

.btn-icon-success { background: var(--navy); }
.btn-icon-success:hover { background: var(--success); }

.btn-icon-delete { background: var(--navy); }
.btn-icon-delete:hover { background: var(--danger); }

tbody tr .btn-icon { opacity: 0; }
tbody tr:hover .btn-icon { opacity: 0.75; }

/* ===== FORM ===== */
.form-group { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.form-label .required { color: var(--error); margin-left: 2px; }

.form-input {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(242,196,56,0.18);
}

/* Currency input */
.input-currency-wrap {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-currency-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(242,196,56,0.18);
}

.input-currency-prefix {
  display: flex;
  align-items: center;
  padding: 0 10px 0 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  user-select: none;
  white-space: nowrap;
}

.input-number {
  border: none;
  outline: none;
  padding: 9px 12px;
  font-size: 0.875rem;
  font-family: 'DM Mono', monospace;
  color: var(--text);
  background: var(--surface);
  width: 100%;
  -moz-appearance: textfield;
}

.input-number::-webkit-outer-spin-button,
.input-number::-webkit-inner-spin-button { -webkit-appearance: none; }

.form-actions { display: flex; gap: 10px; margin-top: 28px; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 64px 24px;
  font-size: 0.875rem;
}

.empty-state svg { opacity: 0.3; margin-bottom: 12px; }
.empty-state p   { margin-bottom: 6px; }
.empty-state a   { color: var(--blue); text-decoration: none; font-weight: 500; }
.empty-state a:hover { text-decoration: underline; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,24,20,0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  padding: 28px 32px;
  max-width: 400px;
  width: 100%;
  animation: slideUp 0.15s ease;
}

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.modal-icon-danger  { background: var(--error-bg);   color: var(--error); }
.modal-icon-warning { background: var(--warning-bg); color: var(--warning); }
.modal-icon-success { background: var(--success-bg); color: var(--success); }

.btn-confirm-success {
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 9px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}
.btn-confirm-success:hover { background: #047857; }

.modal h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.modal p  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.modal-form { max-width: 480px; padding: 0; overflow: hidden; }

.modal-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 0.5px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.modal-form-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.modal-form-body { padding: 24px; }

.modal-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.modal-close-btn:hover { background: var(--border); color: var(--text); }

/* ===== FOLHA MENSAL ===== */

/* Dark card header variant (like table thead) */
.card-header.card-header-dark {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.card-header.card-header-dark h3 {
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  gap: 0;
}

/* Month navigator */
.mes-nav-card { margin-bottom: 16px; }
.mes-nav-card .mes-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.mes-nav {
  display: flex;
  align-items: stretch;
}

.mes-nav-arrow {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-mid);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.mes-nav-arrow:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.mes-nav-arrow:last-child  { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.mes-nav-arrow:hover { background: var(--surface-2); color: var(--text); }
.mes-nav-arrow-disabled { opacity: 0.35; cursor: default; pointer-events: none; }

.mes-nav-label {
  position: relative;
  padding: 0 14px;
  height: 34px;
  border-top: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  user-select: none;
  white-space: nowrap;
  background: var(--surface);
  transition: background 0.15s;
}
.mes-nav-label:hover { background: var(--surface-2); }

.mes-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  z-index: 100;
  overflow: hidden;
}
.mes-dropdown-item {
  display: block;
  padding: 9px 16px;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.1s;
}
.mes-dropdown-item:hover  { background: var(--surface-2); }
.mes-dropdown-item.active { font-weight: 600; color: var(--blue); }

/* Calendar */
.folha-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.folha-top-grid > .card {
  display: flex;
  flex-direction: column;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-head {
  text-align: center;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-xs);
  padding: 2px 0 6px;
}
.cal-head-fds { color: var(--danger); }

.cal-instrucao {
  font-size: 0.6875rem;
  color: var(--text-xs);
  text-align: left;
  margin-top: auto;
  padding-top: 10px;
  letter-spacing: 0.02em;
}

.cal-day {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}
.cal-day:hover { background: var(--surface-2); }

.cal-num {
  font-size: 0.75rem;
  font-family: 'DM Mono', monospace;
  position: relative;
  z-index: 1;
  line-height: 1;
}

.cal-day-util .cal-num { color: #fff; font-weight: 600; }
.cal-day-off  .cal-num { color: var(--danger); }
.cal-day:not(.cal-day-util):not(.cal-day-off) .cal-num { color: var(--text-muted); }

.cal-bubble {
  position: absolute;
  inset: 3px;
  border-radius: 5px;
  background: #047857;
  z-index: 0;
}

/* Shared box label (replaces dark card-header) */
.box-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-xs);
  margin: 0;
}

/* Dias Presencial box */
.dias-box .card-body.dias-box-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feriados-list {
  padding: 14px 20px;
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
  margin-top: auto;
}
.feriados-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-xs);
  margin-bottom: 8px;
}
.feriado-item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 3px 0;
}
.feriado-dia  {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 20px;
}
.feriado-nome { font-size: 0.8125rem; color: var(--text); }

.dias-total-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px;
}
.dias-total {
  font-family: 'DM Mono', monospace;
  font-size: 4rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}
.dias-total-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Totais a Pagar box */
.totais-box-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}
.totais-total-wrap {
  padding: 8px 0 16px;
}
.totais-valor {
  font-family: 'DM Mono', monospace;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
hr.totais-divider {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 0 0 16px;
}
.totais-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.totais-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.totais-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.totais-item-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  flex: 1;
}
.totais-item-valor {
  font-family: 'DM Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

/* Faltas input */
.input-faltas {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px 6px;
  font-size: 0.8125rem;
  font-family: 'DM Mono', monospace;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.input-faltas:focus { border-color: var(--blue); }
.input-faltas::-webkit-outer-spin-button,
.input-faltas::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Faltas +/- controls */
.faltas-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.faltas-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.faltas-btn:hover { background: var(--surface-2); border-color: var(--border-mid); color: var(--text); }

/* Folha table sizing */
#tabelaFolha { font-size: 0.8125rem; }
#tabelaFolha th,
#tabelaFolha td { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
#tabelaFolha td:first-child,
#tabelaFolha td:nth-child(2) { white-space: normal; }
#tabelaFolha th:first-child,
#tabelaFolha th:nth-child(2) { white-space: normal; }

/* Add-employee row */
.add-func-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Checkbox list in create modal */
.func-check-list {
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}
.func-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 0.5px solid var(--border);
}
.func-check-item:last-child { border-bottom: none; }
.func-check-item:hover { background: var(--surface-2); }
.func-check-item input[type="checkbox"] { accent-color: var(--blue); width: 15px; height: 15px; flex-shrink: 0; }
.func-check-nome  { font-size: 0.875rem; font-weight: 500; flex: 1; }
.func-check-cargo { font-size: 0.75rem; color: var(--text-muted); }

/* Select input */
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B65' stroke-width='2.5'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; cursor: pointer; }

@media (max-width: 900px) {
  .folha-top-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .folha-top-grid { grid-template-columns: 1fr; }
}

/* ===== HEADER RIGHT ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-sep {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}

.nav-logout-btn {
  background: none;
  border: none;
  color: #94A3B8;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  line-height: 0;
}
.nav-logout-btn:hover { background: rgba(255,255,255,0.08); color: #F0EDE6; }

main.auth-main { padding: 0; max-width: none; }

/* ===== AUTH PAGE ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  padding: 36px;
}

.auth-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.auth-card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== FOCUS ===== */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; outline-color: var(--blue); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-inner { height: 56px; padding: 0 16px; }
  .logo-text span { display: none; }
  main { padding: 20px 16px 48px; }
  .nav-btn { padding: 6px 14px; font-size: 0.8125rem; }
}

@media (max-width: 480px) {
  .logo-text { display: none; }
  .header-user-name { display: none; }
  .form-row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .section-header { flex-direction: column; align-items: flex-start; }
  .section-actions { width: 100%; }
}
