#tab-employeeSection {
  padding: 6px 0 8px;
}

.employee-only-menu {
  display: none;
}

.employee-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- HERO ---------- */
.employee-hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  padding: 28px 30px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(147,197,253,.35), transparent 30%),
    radial-gradient(circle at left center, rgba(191,219,254,.25), transparent 22%),
    linear-gradient(135deg, #eff6ff 0%, #dbeafe 40%, #f8fbff 100%);
  border: 1px solid rgba(191,219,254,.85);
  box-shadow:
    0 18px 50px rgba(59,130,246,.10),
    inset 0 1px 0 rgba(255,255,255,.9);
  margin-bottom: 16px;
}

.employee-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.5), transparent 9%),
    radial-gradient(circle at 70% 34%, rgba(255,255,255,.35), transparent 5%),
    linear-gradient(110deg, transparent 10%, rgba(255,255,255,.18) 36%, transparent 60%);
  pointer-events: none;
}

.employee-hero-copy,
.employee-hero-meta {
  position: relative;
  z-index: 1;
}

.employee-kicker {
  margin: 0 0 8px;
  font-size: 6px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #3b82f6;
}

.employee-hero-copy h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.04;
  letter-spacing: -.02em;
  color: #0f172a;
}

.employee-hero-copy p {
  margin: 10px 0 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
}

.employee-hero-meta {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.employee-hero-user-card {
  min-width: 168px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(226,232,240,.9);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  backdrop-filter: blur(12px);
}

.employee-hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 10px 18px rgba(37,99,235,.25);
}

.employee-hero-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.employee-hero-user-text strong {
  font-size: 16px;
  color: #0f172a;
  line-height: 1.1;
}

.employee-hero-user-text span {
  margin-top: 6px;
  font-size: 14px;
  color: #64748b;
}

/* ---------- SEGMENTED SUBTABS ---------- */
.employee-subtabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.95);
  box-shadow:
    0 14px 34px rgba(15,23,42,.05),
    inset 0 1px 0 rgba(255,255,255,.85);
  margin-bottom: 18px;
}

.employee-subtab {
  min-height: 60px;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0 16px;
  border-radius: 16px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all .18s ease;
  white-space: nowrap;
  position: relative;
}

.employee-subtab:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 1px;
  height: 28px;
  background: #e2e8f0;
  transform: translateY(-50%);
}

.employee-subtab.active::after,
.employee-subtab:last-child::after {
  display: none;
}

.employee-subtab i {
  font-size: 18px;
  opacity: .9;
}

.employee-subtab:hover {
  color: #1e293b;
  background: rgba(241,245,249,.85);
}

.employee-subtab.active {
  color: #2563eb;
  background: #fff;
  box-shadow:
    0 10px 22px rgba(59,130,246,.12),
    inset 0 -3px 0 #3b82f6;
}

.employee-subtab-page {
  display: none;
}

.employee-subtab-page.active {
  display: block;
}

/* ---------- CARDS ---------- */
.employee-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.97));
  border: 1px solid rgba(226,232,240,.96);
  border-radius: 30px;
  padding: 28px;
  box-shadow:
    0 20px 50px rgba(15,23,42,.06),
    inset 0 1px 0 rgba(255,255,255,.88);
}

.employee-card-head.cleaner,
.employee-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.employee-card-head-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.employee-head-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef4ff, #dbeafe);
  color: #2563eb;
  font-size: 26px;
  flex-shrink: 0;
}

.employee-head-icon.subtle {
  background: linear-gradient(135deg, #f1f5f9, #eef2f7);
  color: #64748b;
}

.employee-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #3b82f6;
}

.employee-card-head.cleaner h3,
.employee-card-head h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.1;
  color: #0f172a;
}

.employee-card-head.cleaner p:last-child,
.employee-card-head p:last-child {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.5;
}

.employee-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.employee-rate-chip {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(96,165,250,.22);
  white-space: nowrap;
}

/* ---------- FORM ---------- */
.employee-form-topbar {
  display: grid;
  grid-template-columns: 390px 315px;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
  margin-top: 20px;
}

.employee-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}

.employee-field input,
.employee-field select {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid #dbe2ea;
  background: #fff;
  padding: 0 15px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.02);
}

.employee-field input:focus,
.employee-field select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96,165,250,.14);
}

/* ---------- TABLE ---------- */
.employee-timesheet-wrap.clean-table,
.employee-timesheet-wrap {
  border-radius: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.employee-timesheet-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.employee-timesheet-table thead th {
  background: linear-gradient(180deg, #f8fafc, #eef4ff);
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.employee-timesheet-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  font-size: 14px;
  color: #0f172a;
}

.employee-timesheet-table tbody tr:last-child td {
  border-bottom: none;
}

.employee-timesheet-table select,
.employee-timesheet-table input {
  width: 100%;
  min-width: 120px;
  min-height: 46px;
  border: 1px solid #dbe2ea;
  background: #fff;
  border-radius: 14px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.employee-timesheet-table select:focus,
.employee-timesheet-table input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96,165,250,.14);
}

.employee-timesheet-table select.duplicate-shift {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.employee-date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.employee-hours-cell {
  font-weight: 800;
  color: #0f172a;
}

.employee-empty-cell,
.employee-empty-state {
  text-align: center;
  color: #64748b;
  padding: 28px 18px !important;
  font-size: 15px;
}

.employee-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #3b82f6;
  font-size: 24px;
}

/* ---------- SUMMARY ---------- */
.employee-summary-strip {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
}

.employee-summary-mini {
  min-height: 76px;
  border-radius: 20px;
  padding: 14px 18px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e2e8f0;
}

.employee-summary-mini.salary {
  background: #f0fdf4;
}

.employee-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  flex-shrink: 0;
}

.employee-summary-icon.blue {
  background: linear-gradient(135deg, #4f6df5, #3b5bdb);
}

.employee-summary-icon.green {
  background: linear-gradient(135deg, #4caf50, #2e9d44);
}

.employee-summary-copy span {
  display: block;
  color: #475569;
  font-size: 14px;
  margin-bottom: 4px;
}

.employee-summary-copy strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
}

/* ---------- ACTIONS ---------- */
.clean-actions,
.employee-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.employee-btn {
  min-height: 45px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.employee-btn:hover {
  transform: translateY(-1px);
}

.employee-btn.ghost {
  background: #fff;
  color: #334155;
  border: 1px solid #dbe2ea;
}

.employee-btn.primary {
  background: linear-gradient(135deg, #4f6df5, #3b5bdb);
  color: #fff;
  box-shadow: 0 14px 28px rgba(79,109,245,.26);
}

/* ---------- FILTER ---------- */
.employee-filter-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.employee-filter-row select {
  min-width: 210px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid #dbe2ea;
  background: #fff;
  padding: 0 16px;
  font-size: 15px;
  color: #0f172a;
  outline: none;
}

.employee-filter-row select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96,165,250,.14);
}

/* ---------- STATUS ---------- */
.employee-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.employee-status-pill.pending {
  background: #fff7ed;
  color: #c2410c;
}

.employee-status-pill.approved {
  background: #dbeafe;
  color: #1d4ed8;
}

/* PAID = GREEN */
.employee-status-pill.paid {
  background: #dcfce7;
  color: #166534;
}

/* ---------- LIST CARDS ---------- */
.employee-manager-list {
  display: grid;
  gap: 14px;
}

.employee-history-card {
  width: 100%;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 24px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 30px rgba(15,23,42,.04);
  transition: all .18s ease;
}

.employee-history-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 18px 34px rgba(15,23,42,.07);
}

.employee-history-card.employee-manager-history-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
}

.employee-history-card-main {
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.employee-history-main {
  min-width: 0;
  flex: 1;
}

.employee-history-top {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.employee-history-top h4 {
  margin: 0;
  font-size: 19px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #64748b;
  font-size: 14px;
}

.employee-history-meta span {
  position: relative;
}

.employee-history-meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
  transform: translateY(-50%);
}

.employee-history-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
}

.employee-manager-inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.employee-mini-btn {
  min-height: 42px;
  border: none;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.employee-mini-btn.approve {
  background: #dcfce7;
  color: #166534;
}

.employee-mini-btn.edit {
  background: #dbeafe;
  color: #1d4ed8;
}

.employee-mini-btn.delete {
  background: #fee2e2;
  color: #b91c1c;
}

.employee-mini-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ---------- MODAL ---------- */
.employee-history-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.46);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.employee-history-modal {
  width: min(980px, 100%);
  max-height: 88vh;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15,23,42,.24);
  border: 1px solid rgba(226,232,240,.94);
}

.employee-history-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.employee-history-modal-head h3 {
  margin: 0 0 6px;
  font-size: 24px;
  color: #0f172a;
}

.employee-history-modal-head p {
  margin: 0;
  color: #64748b;
}

.employee-history-modal-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-history-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  font-size: 18px;
}

.employee-history-modal-body {
  padding: 20px 24px 24px;
  overflow: auto;
  max-height: calc(88vh - 95px);
}

.employee-manager-table-wrap {
  overflow-x: auto;
}

.employee-manager-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.employee-manager-table th,
.employee-manager-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}

.employee-manager-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}

.employee-manager-table td {
  font-size: 14px;
  color: #0f172a;
}

/* ---------- PLACEHOLDERS ---------- */
.employee-placeholder-card {
  min-height: 220px;
  display: flex;
  align-items: center;
}

.employee-inline-note {
  display: block;
  font-size: 12px;
  color: #dc2626;
  margin-top: 6px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .employee-form-topbar {
    grid-template-columns: 1fr 1fr;
  }

  .employee-history-card.employee-manager-history-card {
    grid-template-columns: 1fr;
  }

  .employee-manager-inline-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .employee-hero-card {
    flex-direction: column;
    align-items: stretch;
    padding: 22px 20px;
    border-radius: 24px;
  }

  .employee-hero-copy h2 {
    font-size: 28px;
  }

  .employee-hero-meta {
    justify-content: flex-start;
  }

  .employee-subtabs {
    grid-template-columns: 1fr;
    width: 100%;
    border-radius: 20px;
  }

  .employee-subtab {
    width: 100%;
    justify-content: flex-start;
    min-height: 54px;
  }

  .employee-subtab::after {
    display: none !important;
  }

  .employee-card {
    padding: 18px;
    border-radius: 22px;
  }

  .employee-card-head.cleaner,
  .employee-card-head,
  .employee-history-modal-head {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-card-head-main {
    flex-direction: column;
  }

  .employee-form-topbar {
    grid-template-columns: 1fr;
  }

  .employee-summary-strip {
    grid-template-columns: 1fr;
  }

  .clean-actions,
  .employee-actions {
    flex-direction: column;
  }

  .employee-btn {
    width: 100%;
  }

  .employee-history-top,
  .employee-history-card-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .employee-manager-inline-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .employee-mini-btn {
    flex: 1 1 auto;
  }

  .employee-history-modal-head-right {
    width: 100%;
    justify-content: space-between;
  }
}

.employee-form-card .employee-form-topbar {
  position: relative;
  margin-top: 22px;
  padding-top: 18px;
}

.employee-form-card .employee-form-topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -28px;
  right: -28px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(226,232,240,0),
    rgba(226,232,240,1) 10%,
    rgba(226,232,240,1) 90%,
    rgba(226,232,240,0)
  );
}


.employee-form-topbar {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 26px;
  align-items: end;
}

.employee-field label {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #374151;
}

.employee-date-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.employee-date-input-wrap i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #6b7280;
  pointer-events: none;
  z-index: 2;
}

.employee-date-input-wrap input[type="date"] {
  width: 100%;
  min-height: 98px;
  padding: 0 22px 0 72px;
  border-radius: 22px;
  border: 2px solid #d7dde5;
  background: #ffffff;
  font-size: 18px;
  font-weight: 500;
  color: transparent;
  caret-color: #111827;
  position: relative;
  z-index: 1;
}

.employee-date-input-wrap input[type="date"]::-webkit-datetime-edit {
  color: transparent;
}

.employee-date-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.employee-date-placeholder {
  position: absolute;
  left: 72px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 500;
  color: #6b7280;
  pointer-events: none;
  z-index: 2;
}

.employee-date-input-wrap.has-value .employee-date-placeholder {
  display: none;
}

.employee-date-input-wrap.has-value input[type="date"] {
  color: #111827;
}

.employee-date-input-wrap.has-value input[type="date"]::-webkit-datetime-edit {
  color: #111827;
}

.employee-field input#timesheetEmployeeName {
  min-height: 98px;
  border-radius: 22px;
  border: 2px solid #d7dde5;
  background: #f3f6fa;
  padding: 0 22px;
  font-size: 18px;
  font-weight: 500;
  color: #4b5563;
  box-shadow: none;
}

.employee-field input#timesheetEmployeeName[readonly] {
  cursor: default;
}

.employee-date-input-wrap input[type="date"]:focus,
.employee-field input#timesheetEmployeeName:focus {
  border-color: #cfd8e3;
  box-shadow: none;
}

@media (max-width: 768px) {
  .employee-form-topbar {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .employee-date-input-wrap input[type="date"],
  .employee-field input#timesheetEmployeeName {
    min-height: 76px;
    font-size: 16px;
    border-radius: 18px;
  }

  .employee-date-placeholder {
    font-size: 16px;
  }

  .employee-date-input-wrap i {
    font-size: 20px;
    left: 18px;
  }

  .employee-date-input-wrap input[type="date"] {
    padding-left: 62px;
  }

  .employee-date-placeholder {
    left: 62px;
  }
}

/* ===== COMPACT VERSION (MATCH SA DESIGN MO) ===== */

.employee-date-input-wrap input[type="date"] {
  min-height: 55px;
  padding: 0 18px 0 58px;
  border-radius: 18px;
  font-size: 15px;
}

.employee-date-placeholder {
  font-size: 15px;
  left: 58px;
}

.employee-date-input-wrap i {
  font-size: 20px;
  left: 16px;
}

/* Employee field */
.employee-field input#timesheetEmployeeName {
  min-height: 55px;
  border-radius: 18px;
  font-size: 15px;
  padding: 0 18px;
}


.employee-action-wrapper {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.employee-dots-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.employee-dots-btn:hover {
  background: #f8fafc;
}

.employee-action-menu {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 170px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
  padding: 8px;
  display: none;
  z-index: 50;
}

.employee-action-menu.show {
  display: grid;
  gap: 4px;
}

.employee-action-menu button {
  width: 100%;
  min-height: 40px;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 0 12px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-action-menu button:hover {
  background: #f1f5f9;
}

.employee-action-menu button.danger {
  color: #b91c1c;
}

.employee-action-menu button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.employee-manager-list,
.employee-history-card.employee-manager-history-card {
  overflow: visible !important;
}

.employee-history-card.employee-manager-history-card {
  position: relative;
  z-index: 1;
}

.employee-history-card.employee-manager-history-card:has(.employee-action-menu.show) {
  z-index: 999;
}

.employee-action-wrapper {
  position: relative;
  z-index: 20;
}

.employee-action-menu {
  top: 48px;
  right: 0;
  z-index: 9999;
}


.employee-paid-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .48);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.employee-paid-modal {
  width: min(760px, 100%);
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .95);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .24);
}

.employee-paid-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.employee-paid-head h3 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #0f172a;
}

.employee-paid-head p {
  margin: 0;
  color: #64748b;
}

.employee-paid-body {
  padding: 24px 26px;
}

.employee-paid-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.employee-paid-summary-card {
  min-height: 92px;
  padding: 16px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.employee-paid-summary-card.green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.employee-paid-summary-card span {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.employee-paid-summary-card strong {
  display: block;
  font-size: 22px;
  color: #0f172a;
}

.employee-paid-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.employee-paid-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-paid-actions {
  padding: 18px 26px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 768px) {
  .employee-paid-summary-grid,
  .employee-paid-form-grid {
    grid-template-columns: 1fr;
  }

  .employee-paid-actions {
    flex-direction: column;
  }

  .employee-paid-actions .employee-btn {
    width: 100%;
  }
}

.employee-salary-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.employee-salary-stat {
  padding: 18px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.employee-salary-stat.green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.employee-salary-stat span {
  display: block;
  color: #64748b;
  font-size: 14px;
  margin-bottom: 8px;
}

.employee-salary-stat strong {
  font-size: 24px;
  color: #0f172a;
}

.employee-salary-list {
  display: grid;
  gap: 14px;
}

.employee-salary-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 12px 30px rgba(15,23,42,.04);
}

.employee-salary-card h4 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
}

.employee-salary-card p {
  margin: 0 0 6px;
  color: #64748b;
}

.employee-salary-card small {
  color: #334155;
  font-weight: 700;
}

.employee-salary-actions button {
  min-height: 42px;
  border: none;
  border-radius: 14px;
  padding: 0 16px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .employee-salary-stats {
    grid-template-columns: 1fr;
  }

  .employee-salary-card {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-salary-actions button {
    width: 100%;
    justify-content: center;
  }
}

.employee-payslip-modal {
  width: min(900px, 100%);
  max-height: 90vh; 
  background: #fff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#payslipPrintArea {
  overflow-y: auto;
  max-height: calc(90vh - 60px); /* minus header buttons */
  padding-right: 10px;
}

#payslipPrintArea::-webkit-scrollbar {
  width: 8px;
}

#payslipPrintArea::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.employee-payslip-actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.employee-payslip-actions button {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

.employee-payslip {
  background: #fff;
  padding: 20px;
}

.payslip-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.payslip-company {
  display: flex;
  gap: 10px;
  align-items: center;
}

.payslip-logo {
  width: 60px;
}

.payslip-meta {
  text-align: right;
  font-size: 14px;
}

.payslip-section {
  margin-top: 20px;
}

.payslip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payslip-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.payslip-table th,
.payslip-table td {
  border: 1px solid #ddd;
  padding: 8px;
}

.payslip-receipt {
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
}

.payslip-signature {
  margin-top: 40px;
  text-align: right;
}

.payslip-signature img {
  width: 160px;
}

.employee-payslip-modal {
  width: min(960px, 96vw);
  height: 92vh;
  background: #f8fafc;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.employee-payslip-actions {
  height: 64px;
  padding: 10px 14px;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.employee-payslip-actions button {
  min-height: 42px;
  border: none;
  border-radius: 14px;
  padding: 0 16px;
  background: #4f6df5;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.employee-payslip-scroll {
  overflow: auto;
  padding: 24px;
}

.employee-payslip {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm;
  background: #fff;
  color: #0f172a;
  font-family: Arial, sans-serif;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .15);
}

.payslip-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.payslip-company {
  display: flex;
  align-items: center;
  gap: 14px;
}

.payslip-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.payslip-company h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.payslip-company p,
.payslip-meta span {
  color: #64748b;
  font-size: 12px;
}

.payslip-meta {
  text-align: right;
  display: grid;
  gap: 6px;
  align-content: start;
}

.payslip-section {
  margin-top: 18px;
}

.payslip-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.payslip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  font-size: 13px;
}

.payslip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.payslip-table th {
  background: #f8fafc;
  color: #475569;
}

.payslip-table th,
.payslip-table td {
  border: 1px solid #e5e7eb;
  padding: 9px 10px;
  text-align: left;
}

.payslip-receipt {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.payslip-signature {
  margin-top: 36px;
  display: flex;
  justify-content: flex-end;
}

.payslip-signature-box {
  width: 220px;
  text-align: center;
}

.payslip-signature img {
  max-width: 170px;
  max-height: 70px;
  object-fit: contain;
}

.payslip-signature-line {
  border-top: 1px solid #0f172a;
  margin-top: 8px;
  padding-top: 6px;
  font-size: 12px;
  color: #475569;
}

@media print {
  .employee-payslip-actions {
    display: none !important;
  }

  .employee-payslip {
    box-shadow: none;
    margin: 0;
  }
}

/* 🔥 FORCE OVERLAY SCROLL */
.employee-history-modal-overlay {
  align-items: flex-start !important;
  overflow-y: auto !important;
  padding: 20px;
}

/* 🔥 SCROLL CONTAINER */
.employee-payslip-scroll {
  max-height: 90vh;
  overflow-y: auto;
}

/* 🔥 SCROLLBAR (optional ganda) */
.employee-payslip-scroll::-webkit-scrollbar {
  width: 8px;
}
.employee-payslip-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.employee-payslip-scroll {
  max-height: 90vh;
  overflow-y: auto;

  display: flex;
  justify-content: center;  /* 🔥 CENTER HORIZONTAL */
}

.employee-payslip {
  width: 210mm;
  min-height: 297mm;

  margin: 0 auto; /* fallback */
  background: #fff;

  box-shadow: 0 20px 60px rgba(15, 23, 42, .15);
}

.employee-history-modal-overlay {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* top aligned but centered */
}

.employee-history-modal-overlay:has(.employee-payslip-modal) {
  justify-content: center !important;
  align-items: flex-start !important;
  overflow-y: auto !important;
}

.employee-payslip-modal {
  width: min(980px, 96vw) !important;
  margin: 24px auto !important;
}

.employee-payslip-scroll {
  width: 100% !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  display: flex !important;
  justify-content: center !important;
  padding: 24px !important;
  box-sizing: border-box !important;
}

.employee-payslip {
  position: relative !important;
  width: 210mm !important;
  min-height: 297mm !important;
  margin: 0 auto 24px !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.payslip-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  font-size: 64px;
  font-weight: 900;
  letter-spacing: 6px;

  color: rgba(153, 185, 255, 0.08); /* 🔥 mas visible */
  transform: rotate(-30deg);

  z-index: 2; /* 🔥 above content */
}


.payslip-verify-row {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.payslip-qr-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payslip-qr-text strong {
  display: block;
  font-size: 13px;
}

.payslip-qr-text span {
  display: block;
  font-size: 11px;
  color: #64748b;
}

.employee-payslip {
  position: relative !important;
  width: 210mm !important;
  min-height: 297mm !important;
  padding: 18mm !important;
  box-sizing: border-box !important; /* IMPORTANT */
  margin: 0 auto 24px !important;
  background: #fff !important;
  color: #0f172a !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.payslip-header {
  position: relative;
}

.payslip-badge {
  position: absolute;
  top: 0;
  right: 0;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  border-radius: 999px;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.payslip-badge.verified {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.payslip-signature {
  margin-top: 60px;
  display: flex;
  justify-content: flex-end;
}

.payslip-signature-box {
  width: 260px;
  text-align: center;
  position: relative; /* 🔥 para mag overlay */
}

/* 🔥 SIGNATURE IMAGE (ITO KEY) */
.payslip-signature img {
  position: absolute;
  top: -28px;          /* 🔥 aangat sa ibabaw ng name */
  left: 52%;
  transform: translateX(-50%);
filter: contrast(1.1);
  width: 130px;        /* 🔥 PALAKIHIN */
  max-height: 100px;

  object-fit: contain;
  opacity: 0.95;

  z-index: 5;          /* 🔥 nasa ibabaw */
  pointer-events: none;
}

/* NAME */
.payslip-signature-name {
  margin-top: 50px;   /* 🔥 bigyan space para may ilalim ang pirma */
  font-size: 13px;
  letter-spacing: 1px;
  z-index: 1;
  position: relative;
}

/* ROLE */
.payslip-signature-role {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* =========================================================
   EMPLOYEE EDIT TIMESHEET MODAL
========================================================= */

.employee-edit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.employee-edit-modal {
  width: min(1080px, 100%);
  max-height: 90vh;
  overflow: hidden;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 35px 90px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
}

.employee-edit-modal-head {
  padding: 24px 28px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(79,109,245,.16), transparent 28%),
    linear-gradient(135deg, #ffffff, #f8fbff);
}

.employee-edit-modal-head h3 {
  margin: 0 0 6px;
  font-size: 25px;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.employee-edit-modal-head p:last-child {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.employee-edit-modal-body {
  padding: 0 28px 24px;
  overflow-y: auto;
}

.edit-modal-topbar {
  padding: 22px 0 18px !important;
  margin: 0 !important;
  border-bottom: none !important;
}

.edit-modal-table-wrap {
  margin: 0 !important;
}

.edit-modal-summary {
  padding: 20px 0 0 !important;
}

.employee-edit-modal-actions {
  padding: 18px 28px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #ffffff;
}

.edit-hours-cell {
  font-weight: 900;
  color: #0f172a;
}

@media (max-width: 768px) {
  .employee-edit-modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .employee-edit-modal {
    max-height: 94vh;
    border-radius: 26px 26px 0 0;
  }

  .employee-edit-modal-head {
    padding: 20px;
  }

  .employee-edit-modal-body {
    padding: 0 20px 20px;
  }

  .employee-edit-modal-actions {
    padding: 16px 20px 20px;
    flex-direction: column;
  }

  .employee-edit-modal-actions .employee-btn {
    width: 100%;
  }
}

.payslip-signature {
  margin-top: 60px;
  display: flex;
  justify-content: flex-end;
}

.payslip-signature-box {
  width: 260px;
  text-align: center;
  position: relative; /* 🔥 para mag overlay */
}

/* 🔥 SIGNATURE IMAGE (ITO KEY) */
.payslip-signature img {
  position: absolute;
  top: -28px;          /* 🔥 aangat sa ibabaw ng name */
  left: 52%;
  transform: translateX(-50%);
filter: contrast(1.1);
  width: 130px;        /* 🔥 PALAKIHIN */
  max-height: 100px;

  object-fit: contain;
  opacity: 0.95;

  z-index: 5;          /* 🔥 nasa ibabaw */
  pointer-events: none;
}

/* NAME */
.payslip-signature-name {
  margin-top: 50px;   /* 🔥 bigyan space para may ilalim ang pirma */
  font-size: 13px;
  letter-spacing: 1px;
  z-index: 1;
  position: relative;
}

/* ROLE */
.payslip-signature-role {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.employee-history-card.disabled-paid {
  opacity: 1;
  filter: none;
  pointer-events: none;
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e5e7eb;
}

.employee-history-card.disabled-paid .employee-history-main {
  opacity: 0.45;
}

.employee-history-card.disabled-paid .employee-history-arrow {
  opacity: 0.25;
}

.employee-history-card.disabled-paid .employee-status-pill {
  opacity: 1;
  background: #dcfce7;
  color: #166534;
}

.employee-history-card.disabled-paid::after {
  content: none;
}

.employee-batch-pay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.employee-select-check {
  display: flex;
  align-items: center;
  padding-right: 10px;
}

.employee-select-check input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.employee-batch-periods {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.employee-batch-period {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.employee-batch-period span {
  color: #64748b;
  font-size: 13px;
}

.employee-timesheet-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.employee-timesheet-modal {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
}

.employee-timesheet-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 28px;
  border-bottom: 1px solid #e5e7eb;
}

.employee-timesheet-modal-body {
  padding: 24px 28px;
  overflow: auto;
}

.employee-timesheet-modal-actions {
  padding: 18px 28px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

.employee-timesheet-main-only {
  display: none !important;
}

.employee-staff-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.employee-staff-filter {
  border: 1px solid #dbe4f0;
  background: #fff;
  color: #64748b;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.employee-staff-filter.active {
  background: #4f6df5;
  color: #fff;
  border-color: #4f6df5;
  box-shadow: 0 10px 24px rgba(79, 109, 245, 0.22);
}

.employee-action-menu {
  min-width: 180px;
}

.employee-action-menu button {
  white-space: nowrap;
}

.shift-hours-premium {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.2;
}

.shift-hours-premium strong {
  font-size: 14px;
  color: #0f172a;
}

.shift-hours-premium small {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
}

/* ================================
   EMPLOYEE SECTION - MOBILE FINAL
   Paste sa pinakababa ng CSS
================================ */
@media (max-width: 768px) {

  #tab-employeeSection {
    padding: 10px 10px 24px !important;
    overflow-x: hidden;
  }

  .employee-shell {
    gap: 16px;
  }

  .employee-hero-card {
    padding: 20px 16px !important;
    border-radius: 24px !important;
  }

  .employee-hero-copy h2 {
    font-size: 24px !important;
    line-height: 1.1;
  }

  .employee-hero-copy p {
    font-size: 13px !important;
  }

  .employee-hero-user-card {
    width: 100%;
    min-width: 0;
    border-radius: 18px;
  }

  .employee-subtabs {
    display: flex !important;
    overflow-x: auto;
    grid-template-columns: none !important;
    gap: 8px;
    padding: 7px;
    border-radius: 18px;
    -webkit-overflow-scrolling: touch;
  }

  .employee-subtabs::-webkit-scrollbar {
    display: none;
  }

  .employee-subtab {
    flex: 0 0 auto;
    width: auto !important;
    min-height: 44px !important;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 13px;
  }

  .employee-card {
    padding: 16px !important;
    border-radius: 22px !important;
  }

  .employee-card-head,
  .employee-card-head.cleaner {
    gap: 12px;
    margin-bottom: 14px;
  }

  .employee-head-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    font-size: 21px;
  }

  .employee-card-head h3 {
    font-size: 19px !important;
  }

  .employee-card-head p {
    font-size: 13px !important;
  }

  .employee-form-topbar {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .employee-date-input-wrap input[type="date"],
  .employee-field input#timesheetEmployeeName,
  .employee-field input,
  .employee-field select {
    min-height: 48px !important;
    border-radius: 15px !important;
    font-size: 14px !important;
  }

  .employee-timesheet-wrap,
  .employee-manager-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
  }

  .employee-timesheet-table,
  .employee-manager-table {
    min-width: 650px;
  }

  .employee-summary-strip {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .employee-summary-mini {
    min-height: 64px;
    border-radius: 18px;
  }

  .employee-actions,
  .clean-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .employee-btn {
    width: 100%;
    min-height: 46px;
    border-radius: 15px;
  }

  .employee-staff-filter-row {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .employee-staff-filter-row::-webkit-scrollbar {
    display: none;
  }

  .employee-staff-filter {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 12px;
  }

  .employee-batch-pay-bar {
    position: sticky;
    top: 8px;
    z-index: 20;
    padding: 11px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 26px rgba(15,23,42,.12);
  }

  .employee-history-card,
  .employee-history-card.employee-manager-history-card {
    display: block !important;
    padding: 14px !important;
    border-radius: 20px !important;
  }

  .employee-history-card-main {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 10px;
  }

  .employee-history-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
  }

  .employee-history-top h4 {
    font-size: 15px !important;
    white-space: normal !important;
    line-height: 1.25;
  }

  .employee-history-meta {
    gap: 6px !important;
  }

  .employee-history-meta span {
    font-size: 12px;
    background: #f8fafc;
    padding: 6px 8px;
    border-radius: 999px;
  }

  .employee-history-meta span::after {
    display: none !important;
  }

  .employee-status-pill {
    min-height: 28px;
    font-size: 11px;
    padding: 0 9px;
  }

  .employee-dots-btn {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .employee-action-menu {
    right: 0;
    min-width: 190px;
    max-width: 88vw;
    border-radius: 16px;
    z-index: 200;
  }

  .employee-action-menu button {
    padding: 11px 12px;
    font-size: 13px;
  }

  /* IMPORTANT: Mark as Paid / Pay Selected scroll */
  .employee-paid-modal-overlay,
  .employee-history-modal-overlay,
  .employee-edit-modal-overlay {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .employee-paid-modal,
  .employee-history-modal,
  .employee-edit-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    border-radius: 26px 26px 18px 18px !important;
    padding: 16px !important;
  }

  .employee-paid-head,
  .employee-history-modal-head,
  .employee-edit-modal-head {
    position: sticky;
    top: -16px;
    z-index: 5;
    margin: -16px -16px 14px;
    padding: 16px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-radius: 26px 26px 0 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .employee-paid-summary-grid,
  .employee-paid-form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .employee-paid-summary-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .employee-batch-periods {
    max-height: 190px;
    overflow-y: auto;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .employee-batch-period {
    padding: 12px;
    border-radius: 16px;
  }

  .employee-paid-actions,
  .employee-edit-modal-actions {
    position: sticky;
    bottom: -16px;
    z-index: 10;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px -16px -16px;
    padding: 12px 16px 16px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid #e5e7eb;
  }

  .employee-paid-actions .employee-btn,
  .employee-edit-modal-actions .employee-btn {
    width: 100%;
    min-height: 46px;
  }

  #paidReceiptFile,
  #batchPaidReceiptFile {
    width: 100%;
    padding: 12px;
    background: #f8fafc;
  }
}

@media (max-width: 768px) {
  .employee-paid-modal {
    max-height: 88vh !important;
    overflow-y: auto !important;
  }
}

/* ===== PAYSLIP MOBILE AUTO ZOOM OUT ===== */
@media (max-width: 768px) {
  .employee-payslip-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    overflow: hidden !important;
    border-radius: 24px !important;
  }

  .employee-payslip-scroll {
    width: 100%;
    max-height: 82vh;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    padding: 10px;
  }

  #payslipPrintArea.employee-payslip {
    width: 794px;
    min-width: 794px;
    transform: scale(0.45);
    transform-origin: top left;
  }
}

@media (max-width: 768px) {
  .employee-payslip-scroll {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
  }
}

@media (max-width: 768px) {
  .employee-payslip-scroll {
    display: flex;
    justify-content: center;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    padding: 12px;
  }

  #payslipPrintArea.employee-payslip {
    width: 794px;
    min-width: 794px;
    transform-origin: top center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

.employee-payment-qr-box{
  margin-bottom:20px;
  text-align:center;
}

.employee-payment-qr-img{
  width:220px;
  border-radius:16px;
  border:1px solid #ddd;
}

.employee-payment-qr-preview{
  width:90px;
  height:90px;
  object-fit:cover;
  border-radius:16px;
  border:1px solid #ddd;
  cursor:pointer;
  transition:.2s;
}

.employee-payment-qr-preview:hover{
  transform:scale(1.05);
}

.payment-qr-preview-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.75);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:999999;
  padding:20px;
}

.payment-qr-preview-box{
  position:relative;
  background:#fff;
  border-radius:24px;
  padding:20px;
  max-width:420px;
  width:100%;
}

.payment-qr-preview-large{
  width:100%;
  border-radius:18px;
}

.payment-qr-close{
  position:absolute;
  top:10px;
  right:10px;
  width:38px;
  height:38px;
  border:none;
  border-radius:50%;
  background:#111827;
  color:#fff;
  cursor:pointer;
}
/* ADDITIVE: multiple shifts in the seven-day timesheet modal */
#employeeTimesheetRowsModal .employee-shift-row-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
#employeeTimesheetRowsModal .employee-shift-add,#employeeTimesheetRowsModal .employee-shift-remove{border:1px solid #cbd5e1;border-radius:10px;background:#eff6ff;color:#1d4ed8;padding:9px 11px;white-space:nowrap;cursor:pointer;font-weight:700}
#employeeTimesheetRowsModal .employee-shift-remove{background:#fff1f2;border-color:#fecdd3;color:#be123c;font-size:17px}
#employeeTimesheetEntryModal .employee-timesheet-table{min-width:960px}
#employeeTimesheetEntryModal .employee-timesheet-modal{max-width:min(1100px,96vw)}
@media(max-width:768px){#employeeTimesheetRowsModal .employee-shift-row-actions{flex-direction:column;align-items:stretch}}

/* New shift feedback: visible on desktop and mobile, without changing table layout */
#employeeTimesheetRowsModal tr.employee-shift-just-added td {
  animation: employeeShiftAdded 1.8s ease-out both;
}
@keyframes employeeShiftAdded {
  0% { background-color: #bfdbfe; box-shadow: inset 0 0 0 2px #3b82f6; }
  25% { background-color: #dbeafe; box-shadow: inset 0 0 0 2px #60a5fa; }
  100% { background-color: transparent; box-shadow: inset 0 0 0 0 transparent; }
}
#employeeTimesheetRowsModal tr.employee-shift-just-added .employee-shift-add {
  animation: employeeShiftButtonPulse .55s ease-out;
}
@keyframes employeeShiftButtonPulse {
  0% { transform: scale(.94); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #employeeTimesheetRowsModal tr.employee-shift-just-added td,
  #employeeTimesheetRowsModal tr.employee-shift-just-added .employee-shift-add { animation: none; }
}

/* Add/Remove shift controls and highlight in Edit Details modal */
#editTimesheetRows .employee-shift-row-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
#editTimesheetRows .employee-shift-add,#editTimesheetRows .employee-shift-remove{border:1px solid #cbd5e1;border-radius:10px;background:#eff6ff;color:#1d4ed8;padding:9px 11px;white-space:nowrap;cursor:pointer;font-weight:700}
#editTimesheetRows .employee-shift-remove{background:#fff1f2;border-color:#fecdd3;color:#be123c;font-size:17px}
#editTimesheetRows tr.employee-shift-just-added td{animation:employeeShiftAdded 1.8s ease-out both}
#editTimesheetRows tr.employee-shift-just-added .employee-shift-add{animation:employeeShiftButtonPulse .7s ease both}
@media(max-width:768px){#editTimesheetRows .employee-shift-row-actions{flex-direction:column;align-items:stretch}}
@media(prefers-reduced-motion:reduce){#editTimesheetRows tr.employee-shift-just-added td,#editTimesheetRows tr.employee-shift-just-added .employee-shift-add{animation:none}}

/* In Review: manager has locked this timesheet for checking */
.employee-status-pill.in-review { background:#ede9fe; color:#6d28d9; border:1px solid #ddd6fe; }


/* Salary tab: persistent paid-week date filter */
.employee-salary-filter { padding: 20px; margin-bottom: 18px; border: 1px solid #dbe2ea; border-radius: 22px; background: #fff; }
.employee-salary-filter-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.employee-salary-filter-heading strong { display:block; color:#0f172a; font-size:17px; margin-bottom:5px; }
.employee-salary-filter-heading small, .employee-salary-filter-note { display:block; color:#64748b; font-size:12px; }
.employee-salary-filter-count { white-space:nowrap; border-radius:999px; padding:7px 11px; background:#eff6ff; color:#1d4ed8; font-size:12px; font-weight:700; }
.employee-salary-filter-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto; align-items:end; gap:12px; }
.employee-salary-filter-controls label { display:flex; flex-direction:column; gap:7px; font-size:12px; font-weight:700; color:#475569; }
.employee-salary-filter-controls input { box-sizing:border-box; width:100%; min-width:0; height:45px; padding:0 12px; border-radius:12px; border:1px solid #cbd5e1; background:#fff; color:#0f172a; font:inherit; }
.employee-salary-filter-controls .employee-btn { min-height:45px; }
.employee-salary-filter-controls .employee-btn:disabled { opacity:.45; cursor:not-allowed; }
.employee-salary-filter-note { margin-top:12px; }
@media(max-width:768px) { .employee-salary-filter-heading { align-items:flex-start; flex-direction:column; } .employee-salary-filter-controls { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .employee-salary-filter-controls .employee-btn { width:100%; } }
@media(max-width:390px) { .employee-salary-filter-controls { grid-template-columns:1fr; } }

/* Batch review and salary staff filter */
.employee-batch-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:9px}
.employee-btn.review{background:#ede9fe;color:#6d28d9;border:1px solid #c4b5fd}
.employee-btn:disabled{opacity:.5;cursor:not-allowed;transform:none;box-shadow:none}
.employee-salary-filter-controls select{width:100%;min-height:45px;padding:0 12px;border:1px solid #dbe2ea;border-radius:12px;background:white;color:#0f172a}
@media(max-width:768px){.employee-batch-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.employee-batch-actions .employee-btn{width:100%;padding:0 8px}}


.maintenance-manager-panel{padding:20px;border:1px solid var(--border-color,#dce2e8);border-radius:14px;margin-bottom:20px;background:var(--card-bg,#fff)}.maintenance-head h3{margin:0 0 6px}.maintenance-head p{margin:0 0 14px;opacity:.75;font-size:13px}#maintenanceForm{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:12px;align-items:end}#maintenanceForm label{display:flex;flex-direction:column;font-size:13px;gap:6px}#maintenanceForm input{padding:10px;border:1px solid #cbd5e1;border-radius:8px;width:100%;box-sizing:border-box}#maintenanceScheduleList{margin-top:14px}.maintenance-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e5e7eb;padding:12px 0}.maintenance-item strong{font-size:13px}.maintenance-item small{display:block;margin-top:5px;opacity:.7}.maintenance-empty{font-size:13px;opacity:.7}