/* ================================================================
   PRECIFIKA — MÓDULO DIÁRIAS — CSS COMPLETO
   Complementa css/employees.css com estilos de calendário,
   painel de dia, modais de lançamento, confirmação e pagamento.
   ================================================================ */

/* ──────────────────────────────────────────────
   PAGE LAYOUT
────────────────────────────────────────────── */
.daily-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.daily-page-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.daily-page-title i {
  font-size: 28px;
  color: #2563eb;
}
.daily-page-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.daily-page-title p {
  font-size: 13px;
  color: #64748b;
  margin: 2px 0 0;
}
.daily-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ──────────────────────────────────────────────
   SUB TABS
────────────────────────────────────────────── */
.daily-sub-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
  overflow-x: auto;
}
.daily-sub-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
  font-family: inherit;
}
.daily-sub-tab:hover { color: #2563eb; background: #f0f7ff; }
.daily-sub-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: #f0f7ff;
}
.daily-panel { display: none; }
.daily-panel.active { display: block; }

/* ──────────────────────────────────────────────
   CALENDAR TOOLBAR
────────────────────────────────────────────── */
.daily-cal-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.daily-cal-month-label {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  text-transform: capitalize;
  min-width: 160px;
}
.daily-cal-view-btns {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
}
.daily-view-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: none;
  color: #475569;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.daily-view-btn.active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* ──────────────────────────────────────────────
   MONTH CALENDAR GRID
────────────────────────────────────────────── */
.daily-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.daily-cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  padding: 6px 0;
}
.daily-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.daily-cal-day {
  min-height: 78px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
}
.daily-cal-day:hover {
  background: #f0f7ff;
  border-color: #93c5fd;
}
.daily-cal-day--empty {
  background: transparent;
  border: 1px solid transparent;
  pointer-events: none;
}
.daily-cal-day--today {
  border-color: #2563eb;
  background: #f0f7ff;
}
.daily-cal-day--today .daily-cal-day-num {
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.daily-cal-day--has-entries {
  border-color: #93c5fd;
}
.daily-cal-day-num {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  line-height: 1;
}
.daily-cal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-pending { background: #f59e0b; }
.dot-paid    { background: #22c55e; }
.dot-partial { background: linear-gradient(90deg, #f59e0b 50%, #22c55e 50%); }
.daily-cal-summary {
  font-size: 10px;
  color: #475569;
  line-height: 1.3;
  font-weight: 600;
}
.daily-cal-amount {
  color: #2563eb;
  font-weight: 700;
}

/* ──────────────────────────────────────────────
   WEEK GRID
────────────────────────────────────────────── */
.daily-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.daily-week-day {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  transition: background .12s, border-color .12s;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.daily-week-day:hover { background: #f0f7ff; border-color: #93c5fd; }
.daily-week-day--today { border-color: #2563eb; background: #f0f7ff; }
.daily-week-day-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: capitalize;
}
.daily-week-entries-count { font-size: 20px; font-weight: 800; color: #0f172a; }
.daily-week-amount { font-size: 12px; color: #2563eb; font-weight: 700; }
.daily-week-empty { font-size: 20px; color: #cbd5e1; }

/* ──────────────────────────────────────────────
   TODAY VIEW
────────────────────────────────────────────── */
.daily-today-wrap { max-width: 700px; }
.daily-today-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  text-transform: capitalize;
}
.daily-today-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}
.daily-today-empty i { font-size: 40px; margin-bottom: 12px; display: block; }

/* ──────────────────────────────────────────────
   DAY PANEL (SLIDE-IN)
────────────────────────────────────────────── */
.daily-day-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 900;
}
.daily-day-panel-overlay.open { display: block; }

.daily-day-panel {
  position: fixed;
  top: 0;
  right: -480px;
  width: 460px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  z-index: 901;
  display: flex;
  flex-direction: column;
  transition: right .28s cubic-bezier(.4,0,.2,1);
}
.daily-day-panel.open { right: 0; }

.daily-day-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.daily-day-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-transform: capitalize;
}
.daily-day-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.daily-day-panel-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.daily-day-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
  gap: 12px;
}
.daily-day-empty i { font-size: 36px; }

/* Day entries grouped by project */
.daily-day-project-group { margin-bottom: 16px; }
.daily-day-project-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.daily-day-project-header i { color: #f59e0b; }
.daily-day-project-total {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
}
.daily-day-entry-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 6px;
  transition: border-color .12s;
}
.daily-day-entry-card:hover { border-color: #93c5fd; }
.daily-day-entry-card.entry-paid { background: #f0fdf4; border-color: #86efac; }
.daily-day-entry-card.entry-cancelled { opacity: .55; background: #fafafa; }
.daily-entry-left { flex: 1; }
.daily-entry-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.daily-entry-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.daily-entry-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.daily-entry-amount { font-size: 14px; font-weight: 700; color: #0f172a; }
.daily-entry-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-pending { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.badge-paid    { background: #dcfce7; color: #16a34a; border: 1px solid #86efac; }
.badge-cancelled { background: #f1f5f9; color: #94a3b8; border: 1px solid #e2e8f0; }
.daily-entry-actions { display: flex; gap: 5px; }
.btn-xs { padding: 3px 8px !important; font-size: 10px !important; }
.btn-danger { color: #dc2626 !important; }
.btn-danger:hover { background: #fee2e2 !important; }
.daily-entry-paid-info { font-size: 10px; color: #16a34a; }

/* ──────────────────────────────────────────────
   DAILY MODALS (shared wrapper)
────────────────────────────────────────────── */
.daily-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,.6);
  backdrop-filter: blur(4px);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.daily-modal-overlay.open { display: flex; }
.daily-modal-box {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  overflow: hidden;
}
.daily-confirm-modal-box { max-width: 560px; }
.daily-pay-modal-box     { max-width: 460px; }
.daily-copy-modal-box    { max-width: 400px; }
.daily-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.daily-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}
.daily-modal-title i { color: #2563eb; }
.daily-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 14px;
  transition: background .15s;
}
.daily-modal-close:hover { background: #fee2e2; color: #dc2626; }
.daily-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}
.daily-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────
   LAUNCH MODAL BODY
────────────────────────────────────────────── */
.daily-launch-date-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 18px;
}
.daily-launch-date-header i { font-size: 18px; }
.daily-copy-badge {
  background: #fef3c7;
  color: #d97706;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}
.daily-launch-section { margin-bottom: 18px; }
.daily-launch-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: block;
  margin-bottom: 7px;
}
.daily-launch-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
}
.daily-launch-emp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.daily-launch-emp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  color: #94a3b8;
}
.daily-launch-emp-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: #0f172a;
  font-family: inherit;
  min-width: 140px;
}
.daily-emp-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}
.daily-emp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  user-select: none;
}
.daily-emp-row:hover { border-color: #93c5fd; background: #f8faff; }
.daily-emp-row.checked { border-color: #2563eb; background: #f0f7ff; }
.daily-emp-check { accent-color: #2563eb; width: 16px; height: 16px; cursor: pointer; }
.daily-emp-avatar {
  width: 34px;
  height: 34px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.daily-emp-info { flex: 1; }
.daily-emp-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.daily-emp-role { font-size: 11px; color: #64748b; }
.daily-emp-rate { font-size: 13px; font-weight: 700; color: #2563eb; white-space: nowrap; }
.daily-emp-rate span { font-size: 10px; color: #94a3b8; font-weight: 400; }

/* Summary bar */
.daily-launch-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 16px;
  margin-top: 14px;
  gap: 12px;
}
.daily-summary-items { display: flex; gap: 20px; align-items: center; }
#daily-summary-count { font-size: 13px; font-weight: 600; color: #334155; }
#daily-summary-total { font-size: 18px; font-weight: 800; color: #1d4ed8; }

/* ──────────────────────────────────────────────
   CONFIRMATION MODAL
────────────────────────────────────────────── */
.daily-confirm-header-info {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.daily-confirm-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #475569;
  font-weight: 600;
}
.daily-confirm-meta i { color: #2563eb; }
.daily-confirm-rows { margin-bottom: 14px; }
.daily-confirm-row {
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}
.daily-confirm-row--header {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  padding-top: 0;
}
.daily-confirm-emp {
  display: flex;
  align-items: center;
  gap: 9px;
}
.daily-confirm-avatar {
  width: 28px;
  height: 28px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.daily-confirm-rate {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.daily-confirm-notes {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  color: #475569;
  font-family: inherit;
  width: 100%;
}
.daily-confirm-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 14px;
}
.daily-confirm-total-amount {
  font-size: 20px;
  font-weight: 800;
  color: #2563eb;
}
.daily-confirm-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.5;
}
.daily-confirm-notice i { color: #d97706; margin-top: 2px; flex-shrink: 0; }

/* ──────────────────────────────────────────────
   PAYMENT MODAL
────────────────────────────────────────────── */
.daily-pay-employee {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}
.daily-pay-avatar {
  width: 44px;
  height: 44px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.daily-pay-name { font-size: 15px; font-weight: 700; color: #0f172a; }
.daily-pay-date { font-size: 12px; color: #64748b; margin-top: 2px; }
.daily-pay-pix-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #059669;
  font-weight: 600;
  margin-top: 3px;
}
.daily-pay-pix-hint i { color: #059669; }
.daily-pay-form { display: flex; flex-direction: column; gap: 14px; }
.daily-pay-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
}
.daily-pay-field input,
.daily-pay-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  font-family: inherit;
  background: #fff;
}
.daily-pay-pix-section {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: #15803d;
}
.daily-pay-pix-section i { color: #16a34a; }
.daily-pay-batch-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #eff6ff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  color: #1d4ed8;
}
.daily-pay-batch-summary i { font-size: 20px; }
.daily-pay-batch-total {
  margin-left: auto;
  font-size: 20px;
  font-weight: 800;
}

/* ──────────────────────────────────────────────
   PAYABLE VIEW
────────────────────────────────────────────── */
.daily-payable-header {
  margin-bottom: 16px;
}
.daily-payable-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}
.daily-payable-header p {
  font-size: 13px;
  color: #64748b;
}
.daily-payable-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
#daily-pay-selected-btn:disabled { opacity: .5; cursor: not-allowed; }
.daily-payable-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.daily-payable-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
}
.daily-payable-emp-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.daily-payable-avatar {
  width: 38px;
  height: 38px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.daily-payable-emp-name { font-size: 14px; font-weight: 700; color: #0f172a; }
.daily-payable-pix { font-size: 11px; color: #059669; font-weight: 600; margin-top: 2px; }
.daily-payable-group-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  color: #64748b;
}
.daily-payable-group-total strong {
  font-size: 16px;
  font-weight: 700;
  color: #dc2626;
}
.daily-payable-entries { padding: 8px 16px; }
.daily-payable-entry-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  user-select: none;
}
.daily-payable-entry-row:last-child { border-bottom: none; }
.daily-payable-entry-row input[type="checkbox"] {
  accent-color: #2563eb;
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.daily-payable-date { font-size: 13px; color: #475569; font-weight: 600; min-width: 80px; }
.daily-payable-proj { font-size: 13px; color: #64748b; flex: 1; }
.daily-payable-amount { font-size: 14px; font-weight: 700; color: #dc2626; min-width: 80px; text-align: right; }

/* ──────────────────────────────────────────────
   REPORTS
────────────────────────────────────────────── */
.daily-reports-header { margin-bottom: 16px; }
.daily-report-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.daily-filter-select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
}
.daily-custom-range {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}
.daily-custom-range input[type="date"] {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.daily-report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.daily-report-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.daily-report-kpi--green { border-color: #86efac; background: #f0fdf4; }
.daily-report-kpi--orange { border-color: #fde68a; background: #fffbeb; }
.daily-report-kpi-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }
.daily-report-kpi-value { font-size: 20px; font-weight: 800; color: #0f172a; }
.daily-report-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.daily-report-table-wrap { overflow-x: auto; margin-bottom: 10px; }
.daily-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.daily-report-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.daily-report-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.daily-report-table tr:hover td { background: #f8fafc; }
.text-green  { color: #16a34a !important; font-weight: 700; }
.text-orange { color: #d97706 !important; font-weight: 700; }
.text-blue   { color: #2563eb !important; font-weight: 700; }

/* ──────────────────────────────────────────────
   DASHBOARD
────────────────────────────────────────────── */
.daily-dash-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 18px;
  text-transform: capitalize;
}
.daily-dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.daily-dash-kpi {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
}
.daily-dash-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.daily-dash-kpi-data { display: flex; flex-direction: column; gap: 4px; }
.daily-dash-kpi-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }
.daily-dash-kpi-value { font-size: 20px; font-weight: 800; color: #0f172a; }
.daily-dash-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.daily-dash-highlight-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.daily-dash-highlight-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.daily-dash-highlight-label i { color: #2563eb; }
.daily-dash-highlight-value { font-size: 17px; font-weight: 700; color: #0f172a; }
.daily-dash-highlight-sub { font-size: 12px; color: #64748b; }

/* ──────────────────────────────────────────────
   COPY DATE MODAL
────────────────────────────────────────────── */
.daily-copy-target-hint {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 14px;
}

/* ──────────────────────────────────────────────
   EMPTY / ERROR / SPINNER
────────────────────────────────────────────── */
.daily-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  gap: 12px;
}
.daily-empty-state i { font-size: 40px; }
.daily-empty-state p { font-size: 14px; }
.daily-empty-msg { font-size: 13px; color: #94a3b8; text-align: center; padding: 20px 0; }
.daily-error-msg { font-size: 13px; color: #dc2626; text-align: center; padding: 20px 0; }
.daily-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #94a3b8;
  font-size: 22px;
}

/* ──────────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────────── */
@media (max-width: 768px) {
  .daily-page-header { flex-direction: column; }
  .daily-header-actions { width: 100%; justify-content: flex-end; }
  .daily-cal-days { grid-template-columns: repeat(7, 1fr); }
  .daily-cal-day { min-height: 52px; padding: 4px 5px; }
  .daily-cal-summary { display: none; }
  .daily-cal-dot { display: block; }
  .daily-week-grid { grid-template-columns: repeat(4, 1fr); }
  .daily-day-panel { width: 100vw; right: -100vw; }
  .daily-confirm-row { grid-template-columns: 1fr 80px; }
  .daily-confirm-notes { display: none; }
  .daily-report-filters { flex-direction: column; align-items: stretch; }
  .daily-dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .daily-dash-highlights { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .daily-cal-day { min-height: 40px; padding: 3px 3px; }
  .daily-cal-day-num { font-size: 11px; }
  .daily-cal-weekday { font-size: 9px; }
  .daily-week-grid { grid-template-columns: repeat(2, 1fr); }
  .daily-dash-kpis { grid-template-columns: 1fr; }
  .daily-confirm-row { grid-template-columns: 1fr; }
}

/* ================================================================
   MÓDULO CLT — PRESENÇA, FECHAMENTO E RATEIO
   ================================================================ */

/* ── Modais CLT (overlay base) ── */
.clt-modal-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.clt-modal-box {
  background: #fff; border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  display: flex; flex-direction: column;
  max-height: 90vh; overflow: hidden;
  width: 100%; animation: clt-fade-in .18s ease;
}
@keyframes clt-fade-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }

.clt-presence-modal-box { max-width: 520px; }
.clt-closing-modal-box  { max-width: 780px; }
.clt-rateio-modal-box   { max-width: 640px; }

.clt-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; padding: 22px 24px 16px; border-bottom: 1px solid #f1f5f9;
}
.clt-modal-title-wrap { display: flex; align-items: flex-start; gap: 14px; }
.clt-modal-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.clt-modal-icon--clt     { background: #eff6ff; color: #2563eb; }
.clt-modal-icon--closing { background: #f0fdf4; color: #16a34a; }
.clt-modal-icon--rateio  { background: #fef3c7; color: #d97706; }
.clt-modal-title   { font-size: 17px; font-weight: 700; color: #0f172a; margin: 0 0 2px; }
.clt-modal-subtitle{ font-size: 13px; color: #64748b; margin: 0; }
.clt-modal-close {
  background: none; border: none; cursor: pointer;
  color: #94a3b8; font-size: 18px; padding: 4px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.clt-modal-close:hover { color: #dc2626; background: #fee2e2; }

.clt-modal-body {
  flex: 1; overflow-y: auto; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.clt-modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding: 16px 24px; border-top: 1px solid #f1f5f9;
}

/* ── Presença: Salário wrap ── */
.clt-presence-salary-wrap {
  display: flex; align-items: center; gap: 8px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: #1d4ed8; font-weight: 500;
}
.clt-permission-badge {
  margin-left: auto; background: #2563eb; color: #fff;
  border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700;
}

/* ── Presença: Nav mês ── */
.clt-presence-month-nav {
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.clt-presence-month-label {
  font-size: 15px; font-weight: 700; color: #1e293b;
  text-transform: capitalize; min-width: 180px; text-align: center;
}

/* ── Presença: Regra notice ── */
.clt-presence-rule-notice {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f0f9ff; border: 1px solid #bae6fd;
  border-radius: 10px; padding: 10px 14px;
  font-size: 12px; color: #0369a1; line-height: 1.5;
}
.clt-presence-rule-notice i { flex-shrink: 0; margin-top: 1px; }
.clt-presence-rule-notice--warning {
  background: #fffbeb; border-color: #fde68a; color: #92400e;
}

/* ── Calendário de presença ── */
.clt-presence-calendar { display: flex; flex-direction: column; gap: 6px; }
.clt-cal-header-row {
  display: grid; grid-template-columns: repeat(7,1fr);
  gap: 4px; margin-bottom: 4px;
}
.clt-cal-dayname {
  text-align: center; font-size: 11px; font-weight: 700;
  color: #94a3b8; padding: 4px 0;
}
.clt-cal-days-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.clt-cal-cell {
  min-height: 44px; border-radius: 10px; border: 2px solid #f1f5f9;
  background: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; transition: all .15s; position: relative;
  font-size: 13px;
}
.clt-cal-cell:hover:not(.clt-cal-cell--empty):not(.clt-cal-cell--future) {
  border-color: #2563eb; background: #eff6ff;
}
.clt-cal-cell--empty     { background: transparent; border-color: transparent; cursor: default; }
.clt-cal-cell--present   { background: #dcfce7; border-color: #86efac; }
.clt-cal-cell--present:hover { background: #bbf7d0; border-color: #4ade80; }
.clt-cal-cell--today     { border-color: #2563eb !important; font-weight: 700; }
.clt-cal-cell--future    { opacity: .4; cursor: default; }
.clt-cal-cell--weekend   { background: #fafafa; }
.clt-cal-day-num { font-size: 12px; font-weight: 600; color: #334155; line-height: 1; }
.clt-cal-check   { font-size: 11px; color: #16a34a; }

.clt-presence-count-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #16a34a;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 8px; padding: 8px 14px;
}

/* ── Fechamento: Month select ── */
.clt-closing-month-select-wrap { display: flex; align-items: center; gap: 12px; }
.clt-closing-label { font-size: 13px; font-weight: 600; color: #334155; white-space: nowrap; }
.clt-closing-month-input {
  padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 14px; color: #0f172a; outline: none; cursor: pointer;
}
.clt-closing-month-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

/* ── Fechamento: Summary bar ── */
.clt-closing-summary-bar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px 16px; font-size: 13px; color: #475569; font-weight: 500;
}

/* ── Fechamento: Lista de funcionários ── */
.clt-closing-body { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.clt-closing-spinner { display: flex; align-items: center; justify-content: center; padding: 40px; color: #94a3b8; font-size: 20px; gap: 10px; }
.clt-closing-empty  { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px; color: #94a3b8; text-align: center; }
.clt-closing-error  { color: #dc2626; text-align: center; padding: 20px; font-size: 13px; }
.clt-closing-hint   { color: #94a3b8; text-align: center; padding: 20px; font-size: 13px; }

.clt-closing-emp-list { display: flex; flex-direction: column; gap: 8px; }
.clt-closing-emp-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 12px 16px; transition: border-color .15s;
}
.clt-closing-emp-row:hover { border-color: #cbd5e1; }
.clt-closing-emp-row--closed { background: #f0fdf4; border-color: #bbf7d0; }

.clt-closing-emp-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.clt-closing-emp-info { flex: 1; min-width: 0; }
.clt-closing-emp-name { font-size: 14px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clt-closing-emp-role { font-size: 12px; color: #64748b; }

.clt-closing-emp-days { text-align: center; }
.clt-closing-days-num   { font-size: 20px; font-weight: 800; color: #2563eb; }
.clt-closing-days-label { font-size: 11px; color: #94a3b8; }

.clt-closing-emp-amount { font-size: 15px; font-weight: 700; color: #16a34a; white-space: nowrap; }
.clt-closing-emp-actions { display: flex; gap: 8px; flex-shrink: 0; }

.clt-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
}
.clt-badge--closed  { background: #dcfce7; color: #16a34a; }
.clt-badge--nodays  { background: #f1f5f9; color: #94a3b8; }

.clt-closing-footer-actions {
  display: flex; justify-content: flex-end; padding-top: 12px;
  border-top: 1px solid #f1f5f9; margin-top: 8px;
}

/* ── Rateio: Info bar ── */
.clt-rateio-info-bar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: #fefce8; border: 1px solid #fde68a; border-radius: 10px;
  padding: 10px 16px; font-size: 13px; color: #78350f; font-weight: 500;
}

/* ── Rateio: Instrução ── */
.clt-rateio-instruction {
  font-size: 13px; color: #475569; display: flex; align-items: flex-start; gap: 8px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px;
}

/* ── Rateio: Tabela ── */
.clt-rateio-table-wrap { overflow-x: auto; }
.clt-rateio-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.clt-rateio-table thead tr { background: #f8fafc; }
.clt-rateio-table th {
  padding: 10px 14px; font-size: 12px; font-weight: 700;
  color: #64748b; text-align: left; border-bottom: 2px solid #e2e8f0;
}
.clt-rateio-table td {
  padding: 10px 14px; border-bottom: 1px solid #f1f5f9;
  color: #334155; vertical-align: middle;
}
.clt-rateio-days-input {
  border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 6px 10px; font-size: 14px; color: #0f172a;
  text-align: center; transition: border-color .15s;
}
.clt-rateio-days-input:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.clt-rateio-calc-cell { font-weight: 700; color: #16a34a; }

/* ── Rateio: Restante ── */
.clt-rateio-remaining {
  font-size: 13px; font-weight: 700; padding: 10px 14px;
  border-radius: 8px; background: #f1f5f9; color: #475569; text-align: center;
  transition: all .2s;
}
.clt-rateio-rule {
  font-size: 12px; color: #94a3b8; text-align: center;
  background: #f8fafc; border-radius: 8px; padding: 8px 12px;
}
.clt-rateio-rule code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: monospace; }

/* ── Painel CLT na aba de Diárias ── */
.daily-clt-panel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.daily-clt-panel-title {
  display: flex; align-items: center; gap: 12px;
}
.daily-clt-panel-title i { font-size: 28px; color: #2563eb; }
.daily-clt-panel-title h3 { margin: 0; font-size: 18px; font-weight: 700; color: #0f172a; }
.daily-clt-panel-title p  { margin: 0; font-size: 13px; color: #64748b; }

.daily-clt-month-bar {
  font-size: 14px; font-weight: 600; color: #334155;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 10px 16px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

.daily-clt-emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.daily-clt-emp-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 16px; display: flex; align-items: center; gap: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.daily-clt-emp-card:hover { border-color: #bfdbfe; box-shadow: 0 2px 8px rgba(37,99,235,.08); }
.daily-clt-emp-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#2563eb,#7c3aed);
  color: #fff; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.daily-clt-emp-info { flex: 1; min-width: 0; }
.daily-clt-emp-name { font-size: 13px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily-clt-emp-role { font-size: 11px; color: #64748b; }
.daily-clt-emp-presence { display: flex; flex-direction: column; gap: 4px; min-width: 70px; }
.daily-clt-days-count { font-size: 16px; font-weight: 800; color: #2563eb; text-align: center; }
.daily-clt-days-count span { font-size: 12px; font-weight: 500; color: #94a3b8; }
.daily-clt-progress-bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.daily-clt-progress-fill { height: 100%; background: linear-gradient(90deg,#2563eb,#7c3aed); border-radius: 3px; transition: width .3s; }
.daily-clt-salary { font-size: 12px; font-weight: 700; color: #16a34a; white-space: nowrap; }
.daily-clt-salary span { font-size: 10px; font-weight: 400; color: #94a3b8; }

/* Botão fechar mês CLT no header */
.btn-clt-closing {
  border-color: #16a34a !important; color: #16a34a !important;
}
.btn-clt-closing:hover { background: #f0fdf4 !important; }

/* ── Relatórios CLT expandidos ── */
.daily-report-section-clt { margin-top: 28px; }
.daily-report-section-clt .daily-report-section-title {
  background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe;
}
.clt-report-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 14px 0;
}
.clt-report-kpi {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 14px; text-align: center;
}
.clt-report-kpi-label { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 4px; }
.clt-report-kpi-value { font-size: 20px; font-weight: 800; color: #0f172a; display: block; }
.clt-report-kpi--blue .clt-report-kpi-value { color: #2563eb; }
.clt-report-kpi--green .clt-report-kpi-value { color: #16a34a; }

/* ── Responsive CLT ── */
@media (max-width: 600px) {
  .clt-modal-box { border-radius: 14px; }
  .clt-closing-emp-row { flex-wrap: wrap; gap: 8px; }
  .clt-rateio-table th, .clt-rateio-table td { padding: 8px; }
  .daily-clt-emp-grid { grid-template-columns: 1fr; }
  .clt-cal-cell { min-height: 36px; font-size: 11px; }
}
