* {
  box-sizing: border-box;
  margin: 1px;
  padding: 0px 0px;
}

html {
  overflow-x: clip; /* clip instead of hidden — hidden breaks position:sticky */
}

body {
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #e8edf4;
  padding: 0;
  margin: 0;
  transition: background 0.3s, color 0.3s;
  overflow-x: clip; /* clip instead of hidden — hidden breaks position:sticky */
}


/* Material Symbols (new icon font) */
.material-symbols-outlined{
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}
body.dark-mode {
  background: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .header,
body.dark-mode .date-nav-section,
body.dark-mode .controls,
body.dark-mode .search-wrap,
body.dark-mode .list {
  background: #1e293b;
  border-color: #334155;
}

/* Header is always dark; in dark mode just deepen it slightly */
body.dark-mode .header {
  background: #162032;
  border-bottom-color: #3b82f6;
}

/* Stat cards */
body.dark-mode .stat-card {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .stat-label {
  color: #64748b;
}
body.dark-mode .stat-card.present.kpi-active { background: #052e16; border-color: #059669; }
body.dark-mode .stat-card.absent.kpi-active  { background: #3b0a0a; border-color: #dc2626; }
body.dark-mode .stat-card.ot.kpi-active      { background: #2d1c00; border-color: #d97706; }
body.dark-mode .stat-card.extra.kpi-active   { background: #1e0a3c; border-color: #7c3aed; }

/* Search input */
body.dark-mode .search-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-mode .search-input::placeholder {
  color: #475569;
}
body.dark-mode .search-input:focus {
  border-color: #475569;
  background: #0f172a;
}

/* Filter pills */
body.dark-mode .filter-pill {
  background: transparent;
  border-color: #334155;
  color: #94a3b8;
}
body.dark-mode .filter-pill.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

body.dark-mode .header-btn {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(248,251,255,0.06);
  color: #94a3b8;
}
body.dark-mode .date-nav button,
body.dark-mode .absent-btn,
body.dark-mode .action-pill {
  border: 1px solid rgba(148,163,184,0.35);
  background: transparent;
  color: #64748b;
}
.absent-btn:active{ background: rgba(226,232,240,0.6); transform: scale(0.97); }
body.dark-mode .absent-btn,
body.dark-mode .action-pill { border-color: rgba(51,65,85,0.9); color:#cbd5e1; }
body.dark-mode .absent-btn:active,
body.dark-mode .action-pill:active { background: rgba(51,65,85,0.55); }
body.dark-mode .action-pill.state-absent { background: rgba(220,38,38,0.15); border-color:#7f1d1d; color:#fca5a5; }
body.dark-mode .action-pill.state-half   { background: rgba(234,88,12,0.15);  border-color:#7c2d12; color:#fdba74; }
body.dark-mode .action-pill.state-dayoff { background: rgba(37,99,235,0.15);  border-color:#1e3a8a; color:#93c5fd; }

body.dark-mode .list-row {
  border-color: #334155;
}
body.dark-mode .list-row.present { background: #1e293b; }
body.dark-mode .list-row.absent  { background: rgba(220,38,38,0.08); }
body.dark-mode .list-row.half-day{ background: rgba(234,88,12,0.08); }
body.dark-mode .list-row.dayoff  { background: rgba(37,99,235,0.08); }
body.dark-mode .list-row.extra   { background: rgba(124,58,237,0.08); }

/* Steppers */
body.dark-mode .stepper {
  background: #0f172a;
  border-color: #334155;
}
body.dark-mode .stepper-btn { color: #94a3b8; }
body.dark-mode .stepper-btn:active { background: rgba(51,65,85,0.55); }
body.dark-mode .stepper-value { color: #e2e8f0; }

/* Input labels (OVERTIME / EXTRA / NOTES) */
body.dark-mode .input-label { color: #64748b; }

/* Date nav buttons */
body.dark-mode .date-nav button {
  background: transparent;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .emp-name,
body.dark-mode .stat-value,
body.dark-mode .date-display,
body.dark-mode h1 {
  color: #e2e8f0;
}

body.dark-mode .modal-content {
  background: #1e293b;
  color: #e2e8f0;
}

body.dark-mode .settings-item {
  border-color: rgba(51,65,85,0.6);
}
body.dark-mode .settings-item:hover {
  background: rgba(51,65,85,0.35);
}

body[dir="rtl"] {
  direction: rtl;
}

.container {
  max-width: 100%;
  margin: 0;
  min-height: 100vh;
  padding-bottom: 20px;
}
.header {
  background: #ffffff;
  padding: 8px;
  margin-bottom: 0;
  border-bottom: 2.5px solid #3b82f6;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.header-side {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 80px;
}

.header-side-left {
  justify-content: flex-start;
}

.header-side-right {
  justify-content: flex-end;
}
.header h1 {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  text-align: center;
  flex: 1;
  letter-spacing: -0.01em;
}
.header-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.header-btn:active {
  background: #e2e8f0;
  transform: scale(0.95);
}

.header-btn .material-symbols-outlined {
  font-size: 22px;
}

/* Center the back arrow which has natural left padding */
.header-btn:first-child .material-symbols-outlined {
  margin-left: 3px;
}

.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.date-nav-section {
  background: white;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 63px;
  z-index: 40;
}

.date-nav button {
  width: 44px;
  height: 44px;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.date-nav button:active {
  background: #f8fafc;
  transform: scale(0.95);
}

.date-display {
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
  min-width: 140px;
  text-align: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin: 10px;
  padding-bottom: 5px;
}

.stat-card {
  background: white;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.stat-value {
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 3px;
}

.stat-label {
  font-size: 8px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card.present .stat-value { color: #059669; }
.stat-card.absent .stat-value { color: #dc2626; }
.stat-card.ot .stat-value { color: #d97706; }
.stat-card.extra .stat-value { color: #7c3aed; }

.stat-card:hover { border-color: #94a3b8; box-shadow: 0 2px 6px rgba(0,0,0,0.10); }

.stat-card.kpi-active { border-width: 2px; box-shadow: 0 2px 8px rgba(0,0,0,0.13); }
.stat-card.present.kpi-active  { border-color: #059669; background: #f0fdf4; }
.stat-card.absent.kpi-active   { border-color: #dc2626; background: #fef2f2; }
.stat-card.ot.kpi-active       { border-color: #d97706; background: #fffbeb; }
.stat-card.extra.kpi-active    { border-color: #7c3aed; background: #f5f3ff; }

.controls {
  background: white;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  position: sticky;
  top: 125px;
  z-index: 39;

  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.controls::-webkit-scrollbar { display: none; }

.filter-pill {
  padding: 8px 14px;
  background: white;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.filter-pill.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.filter-pill:active {
  transform: scale(0.98);
}

.search-wrap {
  padding: 8px 12px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 177px;
  z-index: 38;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 15px;
  background: #f8fafc;
  color: #0f172a;
}

.search-input:focus {
  outline: none;
  border-color: #cbd5e1;
  background: white;
}

.search-input::placeholder {
  color: #94a3b8;
}

.btn {
  padding: 4px 10px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  flex: 1;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  background: #415ba4;
  transform: scale(0.98);
}

.btn.secondary {
  background: #8aaccd;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.btn.is-selected{
  box-shadow: 0 0 0 2px rgba(37,99,235,0.28);
}
body.dark-mode .btn.is-selected{
  box-shadow: 0 0 0 2px rgba(56,189,248,0.28);
}

.btn.secondary:active {
  background: #e2e8f0;
}

.list {
  background: white;
  overflow: hidden;
}

.list-row {
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.list-row:last-child {
  border-bottom: none;
}

.list-row.present {
  background: #ffffff;
}

.list-row.absent {
  background: rgba(220, 38, 38, 0.05);
  border-left: 3px solid #dc2626;
  padding-left: 11px;
}

.list-row.half-day {
  background: rgba(234, 88, 12, 0.05);
  border-left: 3px solid #ea580c;
  padding-left: 11px;
}

.list-row.dayoff {
  background: rgba(37, 99, 235, 0.05);
  border-left: 3px solid #2563eb;
  padding-left: 11px;
}

.list-row.extra {
  background: rgba(124, 58, 237, 0.05);
  border-left: 3px solid #7c3aed;
  padding-left: 11px;
}

.list-row.has-ot {
  border-left: 3px solid #d97706;
  padding-left: 9px;
}

.row-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-left { flex: 1; min-width: 0; }

.row-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Pills sit together with no gap between them */
.pill-group {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 20px;
  flex-shrink: 0;
}

/* ── Action pills ── */
.action-pill {
  width: 36px;
  height: 36px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}
.action-pill .material-symbols-outlined { font-size: 22px; line-height: 1; }
.action-pill:active { background: #e2e8f0; transform: scale(0.95); }

/* Full absent = red */
.action-pill.state-absent {
  background: #fef2f2;
  border-color: #f87171;
  color: #dc2626;
}
/* Half day = orange */
.action-pill.state-half {
  background: #fff7ed;
  border-color: #fb923c;
  color: #ea580c;
}
/* Day-off = blue */
.action-pill.state-dayoff {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #2563eb;
}

/* Keep legacy .absent-btn working */
.absent-btn { width:32px; height:32px; border:1px solid #e2e8f0; background:#f8fafc; border-radius:6px; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#94a3b8; transition:all 0.15s; flex-shrink:0; }
.absent-btn:active { background:#e2e8f0; }
.list-row.absent .absent-btn { background:#fee2e2; border-color:#fecaca; color:#dc2626; }
.absent-btn .material-symbols-outlined { font-size: 22px; }

.emp-name {
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 2px;
}

.emp-status {
  font-size: 13px;
  font-weight: 300;
  color: #e6e9ed;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.7;
}

.status-dot.present { background: #059669; }
.status-dot.absent  { background: #dc2626; }
.status-dot.half    { background: #ea580c; }
.status-dot.dayoff  { background: #2563eb; }
.status-dot.extra   { background: #7c3aed; }

/* Day-off row tint — defined in list-row section above */

/* ── Section headers (collapsible) ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body.dark-mode .section-header {
  background: #1e293b;
  border-color: #334155;
}
.section-header-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #334155;
  flex: 1;
}
body.dark-mode .section-header-title { color: #94a3b8; }
.section-header-count {
  font-size: 12px;
  font-weight: 700;
  background: #cbd5e1;
  color: #334155;
  border-radius: 10px;
  padding: 2px 8px;
}
body.dark-mode .section-header-count { background: #334155; color: #94a3b8; }
.section-header-chevron {
  font-size: 18px;
  color: #94a3b8;
  transition: transform 0.2s;
}
.section-header.collapsed .section-header-chevron { transform: rotate(0deg); }
.section-body { }
.section-body .list-row:last-child { border-bottom: 1px solid #e2e8f0; }

.row-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 8px;
}

@media (max-width: 380px){
  .row-controls{ grid-template-columns: 1fr 1fr; }
  .row-controls .input-group.notes-col{ grid-column: 1 / -1; }
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.input-label {
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  height: 38px;
}

.stepper-btn {
  width: 36px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  -webkit-tap-highlight-color: transparent;
}

.stepper-btn:active {
  background: #e2e8f0;
}

.stepper-btn .material-symbols-outlined {
  font-size: 19px;
}

.stepper-value {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
}

.ot-badge {
  padding: 2px 3px;
  background: #fef3c7;
  color: #78350f;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #64748b;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background 0.15s;
}

.settings-item:hover {
  background: #f8fafc;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 400;
  color: #0f172a;
}

.settings-toggle {
  width: 42px;
  height: 22px;
  background: #e2e8f0;
  border-radius: 14px;
  position: relative;
  transition: background 0.2s;
}

.settings-toggle.active {
  background: #2563eb;
}

.toggle-switch {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 12px;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.settings-toggle.active .toggle-switch {
  transform: translateX(20px);
}

.employee-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.form-group input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 15px;
}

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

.form-actions button {
  flex: 1;
}


/* Lock banner (shown when payroll is paid for this month) */
.lock-banner{
  margin: 12px;
  padding: 12px 14px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 8px;
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.lock-banner[hidden]{ display:none !important; }
.lock-title{ font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.lock-sub{ font-size: 13px; color: #b45309; }

/* Simple toast */
.toast{
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 200;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  max-width: calc(100vw - 24px);
  display:none;
}
.toast.show{ display:block; }

/* Save dot */
/* Save indicator */
.save-dot{
  display:inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-left: 6px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse 1.5s ease-in-out infinite;
}
.save-dot.err{
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Month report conversion segments */
.conv-days,
.conv-ot{
  font-size: calc(1em - 2px);
  color: #d6a15c;

  cursor: pointer;
  user-select: none;
}

/* Clickable employee name */
.emp-name-btn{
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
body[dir="rtl"] .emp-name-btn{ text-align:right; }


/* --- Tweaks: compact header ... button + pinned settings menu --- */
.header-btn{
  width: 32px;
  height: 32px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 8px;
}
.header-btn:hover{
  background: rgba(148, 163, 184, 0.18);
}
body.dark-mode .header-btn:hover{
  background: rgba(148, 163, 184, 0.14);
}

/* Settings menu behaves like a pinned popover (not a centered modal) */
.settings-popover{
  background: transparent !important;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
}
.settings-popover .modal-content{
  width: min(220px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(2,6,23,0.12);
  border: 1px solid rgba(148,163,184,0.35);
  max-height: calc(100vh - 16px);
  overflow: auto;

  color: #0f172a;
}
body.dark-mode .settings-popover .modal-content{
  background: rgba(15,23,42,0.92);
  border-color: rgba(51,65,85,0.8);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  color: #e2e8f0;
}
body.dark-mode .settings-popover .settings-label { color: #e2e8f0; }
body.dark-mode .settings-popover .settings-label .material-symbols-outlined { color: #94a3b8; }
body.dark-mode .settings-popover .modal-title { color: #f1f5f9; }
body.dark-mode .settings-popover .close-btn { color: #94a3b8; }
.settings-popover .modal-header{
  padding: 0 0 6px 0;
  margin-bottom: 0px;
}
.settings-popover .modal-title{
  font-size: 15px;
  opacity: 0.9;
}
.settings-popover .modal-body{
  padding: 0;
}
.settings-popover .settings-item{
  padding: 10px 10px;
}
.settings-popover .close-btn{
  width: 28px;
  height: 28px;
  background: transparent;
}
.settings-popover .close-btn:hover{
  background: rgba(148, 163, 184, 0.18);
}


.row-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.row-top{ display:flex; align-items:center; gap:8px; }
.emp-name{ margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 60vw; }
.emp-status{ white-space:nowrap; }


/* --- Header Group pill (in top controls) --- */
.group-btn.group-pill{
  width: auto;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
}
.group-btn.group-pill .material-symbols-outlined{
  font-size: 18px;
}
.group-btn.group-pill .group-btn-text{
  font-size: 13px;
  font-weight: 600;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-btn.group-pill .group-btn-caret{
  opacity: .75;
}

/* --- KPI group pill (small, one-line KPIs preserved) --- */
.stats{ position: relative; }
.kpi-group-pill{
  position: absolute;
  top: -10px;
  right: 0;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: white;
  color: #0f172a;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kpi-group-pill .material-symbols-outlined{ font-size: 16px; }
.kpi-group-pill .kpi-group-text{
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* --- Groups --- */
.group-bar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin-bottom: 10px;
}
.group-btn{
  width: 100%;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  color: #0f172a;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.group-btn:active{ transform: scale(0.99); background:#ffffff; }
.group-btn .material-symbols-outlined{ font-size: 20px; color:#64748b; }
.group-btn-text{
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[dir="rtl"] .group-btn-text{ text-align:right; }
.group-btn-caret{ color:#94a3b8; font-weight: 900; }

.members-list{
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  max-height: 42vh;
  overflow: auto;
  padding: 6px;
}
.member-row{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 8px;
}
.member-row:hover{ background: rgba(148,163,184,0.16); }
.member-name{ font-weight: 600; color:#0f172a; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.member-sub{ font-size: 12px; color:#64748b; }

.modal-content select{
  padding: 8px 12px;
  border: 0px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  background: white;
}

body.dark-mode .group-btn{
  background: rgba(15,23,42,0.35);
  border-color: rgba(51,65,85,0.9);
  color:#e2e8f0;
}
body.dark-mode .group-btn .material-symbols-outlined{ color:#cbd5e1; }
body.dark-mode .members-list{
  background: rgba(15,23,42,0.35);
  border-color: rgba(51,65,85,0.9);
}
body.dark-mode .member-name{ color:#e2e8f0; }
body.dark-mode .modal-content select{
  background: rgba(15,23,42,0.35);
  color:#e2e8f0;
  border-color: rgba(51,65,85,0.9);
}


body.dark-mode .filter-pill.selected{
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

/* --- Attendance filter selected state (attendance filters only) --- */
.filter-pill.selected{
  background: transparent;
  color: #1e40af;
  border-color: #bfdbfe;
}

body.dark-mode .filter-pill.selected{
  background: transparent;
  border-color: #3b82f6;
  color: #93c5fd;
}

/* --- Groups pill (uses .active) --- */
.filter-pill.active{
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}

body.dark-mode .filter-pill.active{
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}


/* --- Dynamic group pills beside Section pill --- */
.groups-pills{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}
.groups-pills .filter-pill{
  padding: 7px 12px;
  gap: 5px;
}

/* Count badge inside section pills */
.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,0,0,0.10);
  color: inherit;
  line-height: 1;
}
.filter-pill.active .pill-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
body.dark-mode .pill-count {
  background: rgba(255,255,255,0.12);
}
body.dark-mode .filter-pill.active .pill-count {
  background: rgba(255,255,255,0.22);
}

/* --- Added (2026-02-17): modals + forms support --- */
.modal-content textarea{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #f8fafc;
  color: inherit;
  resize: vertical;
  min-height: 90px;
}
body.dark-mode .modal-content textarea{
  background: rgba(15,23,42,0.35);
  border-color: rgba(51,65,85,0.85);
}
.form-actions input[type="text"]{
  flex: 1;
  min-width: 0;
}
.form-actions input[type="text"]{
  padding: 12px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  background: #f8fafc;
}
body.dark-mode .form-actions input[type="text"]{
  background: rgba(15,23,42,0.35);
  border-color: rgba(51,65,85,0.85);
  color: #e2e8f0;
}


/* Notes inline (OT/Absence) + Notes column */
.stepper-with-note{
  display:flex;
  align-items:center;
  gap:6px;
}

.note-btn{
  width:36px;
  height:36px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:6px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  -webkit-tap-highlight-color: transparent;
  flex-shrink:0;
}
.note-btn:active{ background:#e2e8f0; transform: scale(0.97); }
.note-btn .material-symbols-outlined{ font-size: 18px; }

body.dark-mode .note-btn{
  border-color: rgba(51,65,85,0.9);
  background: transparent;
  color:#cbd5e1;
}
body.dark-mode .note-btn:active{ background: rgba(51,65,85,0.55); }

.note-pill{
  min-height: 34px;
  height: auto;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 500;
  color: #334155;
  width: 100%;
  text-align: left;
  line-height: 1.4;
  word-break: break-word;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Inline editable textarea variant */
.note-pill.note-pill-inline {
  display: block;
  resize: none;
  overflow: hidden;
  cursor: text;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  white-space: pre-wrap;
}
.note-pill.note-pill-inline:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148,163,184,0.2);
}
.note-pill.note-pill-inline:not(:disabled):hover {
  border-color: #94a3b8;
}

body.dark-mode .note-pill {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
body.dark-mode .note-pill.note-pill-inline:focus {
  border-color: #475569;
  box-shadow: 0 0 0 2px rgba(71,85,105,0.25);
}

/* Note long-press popover */
.note-popover {
  position: fixed;
  z-index: 9000;
  background: #1e293b;
  color: #f1f5f9;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  pointer-events: none;
  animation: note-pop-in 0.12s ease;
}
@keyframes note-pop-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
body.dark-mode .note-popover {
  background: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
}


/* ── Month Report Screen ── */
@keyframes spin { to { transform: rotate(360deg); } }

#reportScreen { display: none; }
#reportScreen.visible { display: flex !important; }

:root{
  --report-sticky-col: 76px; /* sticky Day column width */
}

.report-table {
  border-collapse: collapse;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-width: 100%;
}
.report-table th {
  background: #2d3f55;
  color: #e2e8f0;
  font-weight: 700;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 3;
}
.report-table th.col-name {
  text-align: left;
  min-width: 90px;
  left: 0;
  z-index: 4;
}
.report-table th.col-section {
  text-align: left;
  min-width: 90px;
}
.report-table th.col-summary {
  background: #243347;
  min-width: 52px;
}
.report-table td {
  padding: 6px 4px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.report-table td.col-name {
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
  padding-left: 8px;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
}
.report-table tr:nth-child(even) td.col-name { background: #f8fafc; }
.report-table td.col-section {
  text-align: left;
  color: #64748b;
  font-size: 11px;
  padding-left: 6px;
}
.report-table tr:nth-child(odd) { background: #ffffff; }
.report-table tr:nth-child(even) { background: #f8fafc; }

/* Day cells */
.day-cell { width: 26px; min-width: 26px; font-size: 11px; border-radius: 3px; }
.day-cell.present  { background: #dcfce7; color: #15803d; font-weight:600; }
.day-cell.absent   { background: #fee2e2; color: #dc2626; font-weight:700; }
.day-cell.halfday  { background: #fff7ed; color: #ea580c; font-weight:700; }
.day-cell.dayoff   { background: #eff6ff; color: #2563eb; font-weight:700; }
.day-cell.future   { background: transparent; color: #cbd5e1; }
.day-cell.weekend  { background: #f1f5f9; color: #94a3b8; }
.day-cell.ot       { outline: 2px solid #d97706; outline-offset: -2px; }

/* Summary cols */
.report-table td.col-summary {
  font-weight: 700;
  font-size: 12px;
  background: #f8fafc;
  border-left: 2px solid #e2e8f0;
}
td.sum-present { color: #15803d; }
td.sum-absent  { color: #dc2626; }
td.sum-half    { color: #ea580c; }
td.sum-dayoff  { color: #2563eb; }
td.sum-ot      { color: #d97706; }
td.sum-total   { color: #0f172a; font-weight: 700; border-top: 2px solid #cbd5e1; }
body.dark-mode td.sum-total { color: #f1f5f9; border-color: #475569; }

/* Total Days + Total OT rows: bright white text to stand out against dark bg */
.report-table tr.totals-row td.sum-total {
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.01em;
}

/* Totals row */
.report-table tr.totals-row td {
  background: #2d3f55;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 12px;
  border-top: 2px solid #3d5470;
}
.report-table tr.totals-row td.col-name { background: #243347; color: #f1f5f9; }

/* Total Days + Total OT rows: deeper blue bg, pure white text — must come AFTER base totals-row rules */
.report-table tr.totals-row-total td {
  background: #1e3a5f !important;
  color: #ffffff !important;
  border-top: 2px solid #4a7ab5 !important;
  font-size: 13px;
}
.report-table tr.totals-row-total td.col-day,
.report-table tr.totals-row-total td.col-name {
  background: #162e4a !important;
  color: #ffffff !important;
  font-size: 13px;
}

/* Inline emphasis inside summary totals */
.report-table .sum-orange{
  color: #d97706; /* same OT orange */
  font-weight: 900;
}
.report-table .sum-small{
  font-size: calc(1em - 2px);
}

body.dark-mode #reportScreen { background: #0f172a; }
body.dark-mode .report-table th { background: #2d3f55; color: #e2e8f0; }
body.dark-mode .report-table th.col-summary { background: #243347; }
body.dark-mode .report-table td { border-color: #334155; }
body.dark-mode .report-table td.col-name { background: #1e293b; color: #e2e8f0; }
body.dark-mode .report-table tr:nth-child(even) td.col-name { background: #263348; }
body.dark-mode .report-table tr:nth-child(odd) { background: #1e293b; }
body.dark-mode .report-table tr:nth-child(even) { background: #263348; }
body.dark-mode .report-table td.col-summary { background: #263348; }
body.dark-mode .report-table tr.totals-row td { background: #2d3f55; }
body.dark-mode .report-table tr.totals-row td.col-name { background: #243347; }

/* Section divider row in report */
.report-table tr.section-divider-row td {
  background: #334155;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 8px;
  border: none;
}
body.dark-mode .report-table tr.section-divider-row td {
  background: #0f172a;
  color: #64748b;
}

.report-table th.col-emp {
  min-width: 120px;
  font-size: 11px;
  white-space: nowrap;
  padding: 8px 10px;
}
/* ── Sheet View: first column (Day / label) ── */
/* Shared layout */
.report-table th.col-day,
.report-table td.col-day {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  width: var(--report-sticky-col);
  min-width: var(--report-sticky-col);
  max-width: var(--report-sticky-col);
  position: sticky;
  left: 0;
  z-index: 5;
}

/* Header "Day" cell: dark background, light text matching the rest of the header row */
.report-table th.col-day {
  background: #2d3f55 !important;
  color: #e2e8f0 !important;
  z-index: 6;
}

/* Body day cells: inherit row stripe, dark text */
.report-table td.col-day {
  background: inherit;
  color: #334155;
}

/* Totals row override */
.report-table tr.totals-row td.col-day { background: #2d3f55; color: #e2e8f0; }

/* Corner cells (label column in totals rows) must stick in BOTH axes:
   horizontally (left:0) AND vertically (bottom set by JS).
   Explicit left:0 ensures horizontal stickiness is never lost. */
.report-table tr.totals-row td.col-day,
.report-table tr.totals-row td.col-name {
  left: 0;
  background: #243347;
  color: #f1f5f9;
}

.report-table tr.weekend-row td { opacity: 0.45; }

/* Dark mode: keep sticky cell background consistent with row */
body.dark-mode .report-table td.col-day,
body.dark-mode .report-table th.col-day {
  background: inherit;
  color: #e2e8f0;
}

/* Extra days badge in status area */
.extra-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}
body.dark-mode .extra-badge {
  background: rgba(124,58,237,0.15);
  border-color: rgba(124,58,237,0.3);
  color: #a78bfa;
}

/* Day cell inline annotations */
.report-table td.day-cell {
  white-space: nowrap;
  font-size: 13px;
  padding: 4px 3px;
}

/* ── Report table scroll snapping (horizontal only) ── */
#reportGrid{
  scroll-snap-type: x mandatory;
  /* “inline-start” equals left in LTR, right in RTL */
  scroll-padding-inline-start: var(--report-sticky-col);
  -webkit-overflow-scrolling: touch;
}
#reportGrid .report-table th.col-emp,
#reportGrid .report-table td.day-cell,
#reportGrid .report-table td.col-summary{
  scroll-snap-align: start;
}

/* ── RTL: sticky day column switches from left to right ── */
body[dir="rtl"] .report-table td.col-day,
body[dir="rtl"] .report-table th.col-day {
  left: unset;
  right: 0;
}
body[dir="rtl"] .report-table td.col-name,
body[dir="rtl"] .report-table th.col-name {
  left: unset;
  right: 0;
}

/* ── RTL: flip chevron icons for date nav ── */
body[dir="rtl"] #prevDayBtn .material-symbols-outlined,
body[dir="rtl"] #nextDayBtn .material-symbols-outlined {
  transform: scaleX(-1);
}
body[dir="rtl"] #backBtn .material-symbols-outlined {
  transform: scaleX(-1);
}

/* RTL: day column text aligns right */
body[dir="rtl"] .report-table td.col-day,
body[dir="rtl"] .report-table th.col-day {
  text-align: right;
  padding-right: 8px;
}



/* ── Sheet (Month Report): sticky FIRST column for ALL rows (incl. bottom summary rows) ── */
/*
  NOTE: We intentionally target :first-child (not only .col-day/.col-name)
  so the bottom summary rows (Days / Extra Days / …) are covered too.
*/

/* Ensure "totals" row has a row-level background so sticky cells can inherit safely */
#reportGrid .report-table tr.totals-row{ background: #1e293b; color: #e2e8f0; }
body.dark-mode #reportGrid .report-table tr.totals-row{ background: #334155; color: #e2e8f0; }

#reportGrid .report-table tr > th:first-child,
#reportGrid .report-table tr > td:first-child{
  position: sticky;
  left: 0;
  z-index: 8;
  background-color: inherit;
  color: inherit;
}

/* Header corner cell stays above everything */
#reportGrid .report-table thead tr > th:first-child{ z-index: 12; }

/* RTL: sticky first column switches to the right edge */
body[dir="rtl"] #reportGrid .report-table tr > th:first-child,
body[dir="rtl"] #reportGrid .report-table tr > td:first-child{
  left: unset;
  right: 0;
}


/* ── Month Report quick editor popup ───────────────────────── */
.report-quick-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  z-index: 1000;
  display: none;
}
.report-quick-overlay.show{ display:block; }

.report-quick-card{
  position: fixed;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(2,6,23,0.20);
  padding: 12px;
  max-width: 420px;
}
.report-quick-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.report-quick-title{ min-width: 0; }
.report-quick-name{
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.report-quick-status{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 16px;
  color: #334155;
  font-weight: 600;
}

.report-quick-actions{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-shrink: 0;
}
.rq-icon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
}
.rq-icon:active{ transform: scale(0.98); }
.rq-icon .material-symbols-outlined{ font-size: 22px; color: #0f172a; }

.report-quick-pillwrap{
  margin: 6px 0 10px;
  display:flex;
  justify-content:flex-end;
}

.report-quick-grid{
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 10px;
  align-items: end;
}
.report-quick-grid .input-group{ margin:0; }

.report-quick-grid textarea{
  width: 100%;
  resize: none;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.report-quick-grid textarea:focus{
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,0.25);
}

@media (max-width: 520px){
  .report-quick-grid{
    grid-template-columns: 1fr 1fr;
  }
  .report-quick-grid .notes-col{
    grid-column: 1 / -1;
  }
  .report-quick-name{ max-width: 220px; }
}


/* Report quick editor: reuse main list row UI */
.report-quick-card .report-quick-rowhost .list-row{
  margin: 0;
  box-shadow: none;
  border: 1px solid rgba(148,163,184,0.35);
}
.report-quick-card .report-quick-rowhost .row-controls{
  margin-top: 10px;
}
.report-quick-card .report-quick-rowhost .emp-name{
  cursor: pointer;
}

/* ── Dark mode: report-quick-card ── */
body.dark-mode .report-quick-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}
body.dark-mode .report-quick-name { color: #f1f5f9; }
body.dark-mode .report-quick-status { color: #94a3b8; }
body.dark-mode .rq-icon {
  background: #0f172a;
  border-color: #334155;
}
body.dark-mode .rq-icon .material-symbols-outlined { color: #e2e8f0; }
body.dark-mode .report-quick-grid textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
body.dark-mode .report-quick-grid textarea:focus {
  border-color: #475569;
  box-shadow: 0 0 0 3px rgba(71,85,105,0.35);
}
body.dark-mode .report-quick-card .report-quick-rowhost .list-row {
  background: #1e293b;
  border-color: #334155;
}



/* ─────────────────────────────────────────────
   Month Report header: search morph (Sheet pattern)
   - Keeps same header height
   - Search filters employee columns (name/section)
   ───────────────────────────────────────────── */

.report-header{
  background:#fff;
  padding:12px 14px;
  border-bottom:1px solid #e2e8f0;
  display:flex;
  align-items:center;
  gap:10px;
  position:sticky;
  top:0;
  z-index:10;
  min-height:56px; /* stable height */
}

body.dark-mode .report-header{
  background:#1e293b;
  border-color:#334155;
}

.report-header-main,
.report-header-search{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.report-header-titles{ flex:1; min-width:0; }
.report-title{
  font-size:16px;
  font-weight:500;
  color:#0f172a;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.dark-mode .report-title{ color:#e2e8f0; }

.report-subtitle{
  font-size:12px;
  color:#64748b;
  margin-top:1px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.dark-mode .report-subtitle{ color:#94a3b8; }

.report-search-input{
  flex:1;
  min-width:0;
  height:36px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:8px;
  padding:0 12px;
  font-size:15px;
  outline:none;
  color:#0f172a;
}
.report-search-input:focus{
  background:#fff;
  border-color:#cbd5e1;
}
body.dark-mode .report-search-input{
  border-color:#334155;
  background:rgba(15,23,42,0.35);
  color:#e2e8f0;
}
body.dark-mode .report-search-input:focus{
  background:rgba(15,23,42,0.55);
  border-color:rgba(148,163,184,0.35);
}

.report-search-clear{ flex-shrink:0; }

#reportScreen.report-searching #reportHeaderMain{ display:none; }
#reportScreen:not(.report-searching) #reportHeaderSearch{ display:none; }

.report-menu{
  position:fixed;
  min-width:180px;
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,0.14);
  padding:6px;
  z-index:260;
  display:none;
}
body.dark-mode .report-menu{
  background:#1e293b;
  border-color:#334155;
}
.report-menu.show{ display:block; }
.report-menu-item{
  width:100%;
  border:none;
  background:transparent;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  color:#0f172a;
  -webkit-tap-highlight-color:transparent;
}
body.dark-mode .report-menu-item{ color:#e2e8f0; }
.report-menu-item:hover{ background:#f8fafc; }
body.dark-mode .report-menu-item:hover{ background:#0f172a; }
.report-menu-item:active{ transform:scale(0.99); }
.report-menu-item .material-symbols-outlined{ font-size:20px; color:#64748b; }
body.dark-mode .report-menu-item .material-symbols-outlined{ color:#94a3b8; }

/* Column hiding helper */
.report-col-hidden{ display:none !important; }


/* === Report View: Alternate Day Cell Backgrounds === */
.report-table tbody tr:nth-child(odd) td.day-cell {
    background-color: #fafafa;
}

.report-table tbody tr:nth-child(even) td.day-cell {
    background-color: #ffffff;
}



.month-report-table tbody tr td:not(:first-child) {
  background: #dcfce7;
}

.month-report-table tbody tr td:not(:first-child):nth-child(even) {
  background: #e0ede5;
}


/* Month Report: alternate day-row background for PRESENT cells only (skip summary totals rows) */
.report-table tbody tr:not(.totals-row):nth-child(odd) td.day-cell.present {
  background-color: #e0ede5 !important;
}


/* ── Manage Employees (bulk editor) ───────────────────────────────────────── */
/* Manage Employees modal — single-column layout */
.modal .manage-employees-modal{ padding:0; overflow:hidden; max-width:min(520px,calc(100vw - 32px)); width:min(520px,calc(100vw - 32px)); max-height:calc(100vh - 48px); display:flex; flex-direction:column; margin:auto 0; }
.manage-employees-modal .modal-header{ padding:16px 20px; border-bottom:1px solid #e2e8f0; margin-bottom:0; flex-shrink:0; }
.manage-employees-modal .modal-body{ padding:16px; overflow-y:auto; overflow-x:hidden; flex:1; min-height:0; display:flex; flex-direction:column; gap:10px; width:100%; box-sizing:border-box; }

/* me-search replaced by .me-searchbar compound component above */
.me-selection{ display:flex; gap:8px; align-items:center; }
.me-mini{ padding:5px 12px; border-radius:8px; border:1.25px solid #cbd5e1; background:#fff; cursor:pointer; font-size:11px; font-weight:400; color:#334155; transition:background 0.15s,border-color 0.15s; }
.me-mini:hover{ background:#f1f5f9; border-color:#94a3b8; }
body.dark-mode .me-mini{ background:transparent; border-color:#334155; color:#cbd5e1; }
body.dark-mode .me-mini:hover{ background:rgba(51,65,85,0.4); }
.me-count{ font-size:12px; color:#64748b; font-weight:600; margin-left:auto; }
.me-count.has-selection{ color:#2563eb; }
body.dark-mode .me-count{ color:#94a3b8; }
body.dark-mode .me-count.has-selection{ color:#60a5fa; }
/* Employee list — compact scrollable dropdown style */
.me-list{ border:1.5px solid #e2e8f0; border-radius:14px; overflow:auto; background:#fff; max-height:315px; height:315px; min-height:250px; flex:0 0 315px; }
body.dark-mode .me-list{ border-color:#334155; background:#1e293b; }
.me-row{ display:flex; gap:10px; align-items:center; padding:9px 12px; border-bottom:1px solid #f1f5f9; cursor:pointer; transition:background 0.12s; }
.me-row:last-child{ border-bottom:none; }
body.dark-mode .me-row{ border-color:#1e293b; }
.me-row:hover{ background:#f8fafc; }
body.dark-mode .me-row:hover{ background:rgba(51,65,85,0.4); }
.me-check{ width:17px; height:17px; accent-color:#2563eb; flex-shrink:0; cursor:pointer; }
.me-row-main{ flex:1; min-width:0; }
.me-row-name{ font-size:13px; font-weight:600; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.dark-mode .me-row-name{ color:#e2e8f0; }
.me-row-sub{ font-size:11px; color:#94a3b8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
/* Editor card */
.me-card{ border:1.5px solid #e2e8f0; border-radius:14px; background:#f8fafc; padding:14px; overflow:visible; width:100%; box-sizing:border-box; }
body.dark-mode .me-card{ border-color:#334155; background:#1e293b; }
.me-card-title{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:#475569; margin:0 0 12px; }
body.dark-mode .me-card-title{ color:#94a3b8; }
.me-muted{ font-size:12px; color:#64748b; line-height:1.5; }
body.dark-mode .me-muted{ color:#94a3b8; }
.me-field{ display:flex; flex-direction:column; gap:5px; margin-bottom:10px; }
.me-label{ font-size:10px; font-weight:700; color:#475569; text-transform:uppercase; letter-spacing:0.06em; }
body.dark-mode .me-label{ color:#94a3b8; }
.me-input{ width:100%; padding:10px 12px; border:1.5px solid #e2e8f0; border-radius:10px; font-size:14px; background:#fff; color:#0f172a; box-sizing:border-box; outline:none; max-width:100%; min-width:0; }
.me-input:focus{ border-color:#2563eb; }
body.dark-mode .me-input{ background:#0f172a; border-color:#334155; color:#e2e8f0; }
body.dark-mode .me-input:focus{ border-color:#3b82f6; }

/* Ensure Manage Employees dropdowns (Section/Admin) keep the same styling as inputs */
.manage-employees-modal select.me-input{
  padding:10px 12px;
  border:1.5px solid #e2e8f0;
  border-radius:10px;
  font-size:12px;
  background:#fff;
  color:#0f172a;
  box-sizing:border-box;
}
body.dark-mode .manage-employees-modal select.me-input{
  background:#1f2b47;
  border-color:#334155;
  color:#e2e8f0;
  color-scheme: dark;
}
.me-dows{ display:grid; grid-template-columns:repeat(7,1fr); gap:5px; width:100%; box-sizing:border-box; }
.me-dow{ padding:9px 0; border:1.5px solid #cbd5e1; background:#fff; border-radius:8px; cursor:pointer; font-weight:600; font-size:10px; color:#475569; text-align:center; transition:background 0.12s,border-color 0.12s,color 0.12s; margin:0 !important; box-sizing:border-box; }
.me-dow:hover{ border-color:#2563eb; color:#2563eb; }
.me-dow.active{ background:#2563eb; border-color:#2563eb; color:#fff; }
body.dark-mode .me-dow{ background:#0f172a; border-color:#334155; color:#94a3b8; }
body.dark-mode .me-dow:hover{ border-color:#3b82f6; color:#3b82f6; }
body.dark-mode .me-dow.active{ background:#3b82f6; border-color:#3b82f6; color:#fff; }
.me-actions{ display:flex; gap:8px; margin-top:10px; }
.me-actions .btn{ flex:1; font-size:11px; padding:4px 4px; }
.me-divider{ height:1px; background:#e2e8f0; margin:12px 0; }


/* ── Divider after first 3 calculated fields (bulk Manage Employees) ── */
.manage-employees-modal .me-card > .me-field:nth-child(4){
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.manage-employees-modal .me-card > .me-field:nth-child(4)::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  background:#e2e8f0;
}
body.dark-mode .manage-employees-modal .me-card > .me-field:nth-child(4)::after{
  background:#334155;
}
body.dark-mode .me-divider{ background:#334155; }
/* Section filter pills above employee list */
/* ── Unified search + section filter bar ── */
.me-searchbar{
  display:flex; align-items:center; gap:0;
  width:100%; box-sizing:border-box;
  border:1.5px solid #e2e8f0; border-radius:8px;
  background:#fff; overflow:hidden;
  transition:border-color 0.15s, box-shadow 0.15s;
  min-height:35px;
}
.me-searchbar:focus-within{
  border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,0.1);
}
body.dark-mode .me-searchbar{
  background:#0f172a; border-color:#334155;
}
body.dark-mode .me-searchbar:focus-within{
  border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,0.12);
}
.me-searchbar-icon{
  flex-shrink:0; padding:0 10px 0 14px;
  font-size:20px; color:#94a3b8; pointer-events:none; line-height:1;
  display:flex; align-items:center;
  height:34px;
}
.me-searchbar-input{
  flex:1; min-width:0;
  border:none; background:transparent; outline:none;
  font-size:13px;
  color:#0f172a;
  height:34px;
  line-height:34px;
  padding:0 8px 0 0;
  appearance:none; -webkit-appearance:none;
}
/* Prevent WebKit search field UI from changing height when it gets a value */
.me-searchbar-input::-webkit-search-decoration,
.me-searchbar-input::-webkit-search-cancel-button,
.me-searchbar-input::-webkit-search-results-button,
.me-searchbar-input::-webkit-search-results-decoration{
  -webkit-appearance:none;
}
body.dark-mode .me-searchbar-input{ color:#e2e8f0; }
.me-searchbar-input::placeholder{ color:#94a3b8; }
/* Separator line between search text and section select */
.me-searchbar-sep{
  width:1px; align-self:stretch; background:#e2e8f0; flex-shrink:0; margin:8px 2px;
}
body.dark-mode .me-searchbar-sep{ background:#334155; }
/* Section <select> inside the bar */
.me-searchbar-sec{
  flex-shrink:0; max-width:140px; padding:0 10px 0 8px;
  border:none; background:transparent; font-size:12px; font-weight:600;
  color:#475569; cursor:pointer; outline:none; align-self:stretch;
  appearance:auto; -webkit-appearance:auto;
}
body.dark-mode .me-searchbar-sec{
  /* Make the Section <select> render as a true dark control (not a light dropdown) */
  color:#e2e8f0;
  background:#0f172a;
  color-scheme: dark;
}
body.dark-mode .me-searchbar-sec option{
  background:#0f172a;
  color:#e2e8f0;
}
/* Section group headers inside the employee list — sticky, clean */
.me-list-section-hdr{
  display:flex; align-items:center; justify-content:space-between;
  padding:6px 12px 5px; font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:0.07em; color:#64748b; background:#f8fafc;
  border-bottom:1px solid #f1f5f9; position:sticky; top:0; z-index:1;
}
.me-list-section-hdr--muted .me-list-section-name{ color:#94a3b8; }
.me-list-section-name{ flex:1; }
.me-list-section-count{
  flex-shrink:0; font-size:10px; font-weight:700;
  background:#e2e8f0; color:#64748b;
  border-radius:20px; padding:1px 7px; margin-left:6px;
}
body.dark-mode .me-list-section-hdr{
  background:#0a1120; border-color:#1e293b; color:#475569;
}
body.dark-mode .me-list-section-count{ background:#1e293b; color:#475569; }
/* Empty state */
.me-list-empty{
  padding:24px 12px; text-align:center; font-size:13px;
  color:#94a3b8; font-style:italic;
}
/* Section dropdown row */
.me-section-row{ display:flex; gap:6px; align-items:center; }
.me-section-row .me-section-select{ flex:1; }
.me-icon-btn{
  flex-shrink:0; width:30px; height:30px; border-radius:5px;
  border:1.5px solid #e2e8f0; background:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:#475569; transition:background 0.12s, border-color 0.12s, color 0.12s;
}
.me-icon-btn .material-symbols-outlined{ font-size:18px; }
.me-icon-btn:hover{ background:#f1f5f9; border-color:#94a3b8; color:#0f172a; }
.me-icon-btn-add{ border-color:#2563eb; color:#2563eb; }
.me-icon-btn-add:hover{ background:#eff6ff; }
.me-icon-btn-ok{ border-color:#16a34a; color:#16a34a; }
.me-icon-btn-ok:hover{ background:#f0fdf4; }
body.dark-mode .me-icon-btn{ background:#0f172a; border-color:#334155; color:#94a3b8; }
body.dark-mode .me-icon-btn:hover{ background:#1e293b; border-color:#475569; color:#e2e8f0; }
body.dark-mode .me-icon-btn-add{ border-color:#3b82f6; color:#3b82f6; }
body.dark-mode .me-icon-btn-add:hover{ background:rgba(59,130,246,0.1); }
body.dark-mode .me-icon-btn-ok{ border-color:#22c55e; color:#22c55e; }
body.dark-mode .me-icon-btn-ok:hover{ background:rgba(34,197,94,0.1); }
/* Inline rename row */
.me-section-rename{ display:flex; gap:6px; align-items:center; margin-top:6px; }
.me-section-rename .me-input{ flex:1; }
/* manage-employees dark-mode modal header bg */
body.dark-mode .manage-employees-modal .modal-header{ background:#1e293b; border-bottom:1px solid #334155; }
body.dark-mode .manage-employees-modal .modal-body{ background:#192238; }


/* ── Manage Employees: show former toggle + row menu ───────────────── */
.me-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 2px 6px 2px;
  color:#334155;
  font-size: 13px;
  font-weight: 600;
  user-select:none;
}
.me-toggle input{
  width: 18px;
  height: 18px;
}
body.dark-mode .me-toggle{
  color:#cbd5e1;
}

.me-row{
  position: relative;
}
.me-row-menu-btn{
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  flex-shrink:0;
  -webkit-tap-highlight-color: transparent;
}
.me-row-menu-btn:active{
  background:#e2e8f0;
  transform: scale(0.98);
}
body.dark-mode .me-row-menu-btn{
  border-color: rgba(51,65,85,0.9);
  background: transparent;
  color:#cbd5e1;
}
body.dark-mode .me-row-menu-btn:active{
  background: rgba(51,65,85,0.55);
}

.me-status-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.45);
  color: #475569;
  background: rgba(148,163,184,0.10);
  margin-top: 6px;
}
body.dark-mode .me-status-badge{
  border-color: rgba(148,163,184,0.30);
  background: rgba(148,163,184,0.10);
  color:#cbd5e1;
}

.me-row-menu{
  position: fixed;
  z-index: 1200;
  min-width: 210px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(2,6,23,0.20);
  overflow: hidden;
  display:none;
}
body.dark-mode .me-row-menu{
  background: #0f172a;
  border-color: rgba(51,65,85,0.85);
  color:#e2e8f0;
}
.me-row-menu.show{ display:block; }
.me-row-menu button{
  width:100%;
  padding: 12px 12px;
  border: none;
  background: transparent;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  font-size: 14px;
  color: inherit;
  text-align:left;
}
.me-row-menu button:hover{
  background: rgba(2,6,23,0.04);
}
body.dark-mode .me-row-menu button:hover{
  background: rgba(148,163,184,0.12);
}
.me-row-menu .danger{
  color: #dc2626;
}
body.dark-mode .me-row-menu .danger{
  color: #fca5a5;
}
.me-row-menu-sep{
  height: 1px;
  background: rgba(148,163,184,0.35);
}
body.dark-mode .me-row-menu-sep{
  background: rgba(148,163,184,0.22);
}


/* ── Edit Employee (single employee editor) ─────────────────────────────── */
.modal .edit-employee-modal{ padding:0; overflow:hidden; max-width:min(520px,calc(100vw - 32px)); }
.edit-employee-modal{ width:min(520px,calc(100vw - 32px)); max-height:min(92vh,820px); overflow:hidden; display:flex; flex-direction:column; }
.edit-employee-modal .modal-header{ padding:16px 20px; border-bottom:1px solid #e2e8f0; margin-bottom:0; flex-shrink:0; }
.edit-employee-modal .modal-body{ padding:16px; overflow-y:auto; overflow-x:hidden; flex:1; display:flex; flex-direction:column; gap:12px; min-height:0; width:100%; box-sizing:border-box; }

body.dark-mode .edit-employee-modal .modal-header{ background:#1e293b; border-bottom:1px solid #334155; }
body.dark-mode .edit-employee-modal .modal-body{ background:#192238; }

.ee-top{ display:flex; flex-direction:column; gap:8px; }
.ee-name{
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
body.dark-mode .ee-name{ color:#f1f5f9; }

.ee-badges{ display:flex; gap:8px; flex-wrap:wrap; }
.ee-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.45);
  color: #475569;
  background: rgba(148,163,184,0.10);
}
.ee-badge.ee-id{
  font-weight: 700;
  opacity: .85;
}
.ee-badge.ee-audit{
  font-weight: 700;
  opacity: .85;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.2px;
}
body.dark-mode .ee-badge.ee-audit{
  border-color: rgba(148,163,184,0.35);
  background: rgba(148,163,184,0.08);
}
body.dark-mode .ee-badge{
  border-color: rgba(148,163,184,0.30);
  background: rgba(148,163,184,0.10);
  color:#cbd5e1;
}

.ee-card{
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
body.dark-mode .ee-card{
  background: #0f172a;
  border-color: rgba(51,65,85,0.85);
}

.ee-card-title{
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}
body.dark-mode .ee-card-title{ color:#e2e8f0; }

.ee-field{ display:flex; flex-direction:column; gap:6px; margin-top:10px; width:100%; box-sizing:border-box; }
.ee-field.ee-field-inline{ flex-direction:row; align-items:center; gap:10px; }
.ee-field.ee-field-inline .ee-label{ min-width:54px; flex-shrink:0; margin:0; }
.ee-field.ee-field-inline .ee-input{ flex:1; min-width:0; }


/* ── Divider after first 3 calculated fields (Section/Admin/Weekly off) in Edit Employee ── */
.edit-employee-modal .ee-card > .ee-field:nth-child(4){
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.edit-employee-modal .ee-card > .ee-field:nth-child(4)::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  background:#e2e8f0;
}
body.dark-mode .edit-employee-modal .ee-card > .ee-field:nth-child(4)::after{
  background:#334155;
}
.ee-label{ font-size: 12px; font-weight: 800; color:#64748b; }
body.dark-mode .ee-label{ color:#94a3b8; }

.ee-input{
  padding: 12px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
  color: inherit;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
body.dark-mode .ee-input{
  background: rgba(15,23,42,0.35);
  border-color: rgba(51,65,85,0.85);
  color:#e2e8f0;
}


/* Ensure <select> variants of ee-input (Section/Admin) render correctly in dark mode */
body.dark-mode select.ee-input{
  background: #1f2b47;
  border-color: rgba(51,65,85,0.85);
  color: #e2e8f0;
  color-scheme: dark;
}
body.dark-mode select.ee-input option{
  background: #0f172a;
  color: #e2e8f0;
}

/* Groups modal dropdowns (Section/Group) */
#sectionSelect,
#groupSelect{
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
}
body.dark-mode #sectionSelect,
body.dark-mode #groupSelect{
  background: #1f2b47;
  border-color: #334155;
  color: #e2e8f0;
  color-scheme: dark;
}
body.dark-mode #sectionSelect option,
body.dark-mode #groupSelect option{
  background: #0f172a;
  color: #e2e8f0;
}

.ee-dows{ display:flex; flex-wrap:nowrap; gap:4px; margin-top:4px; width:100%; box-sizing:border-box; overflow:hidden; }
.ee-dow{
  flex:1;
  min-width:0;
  height: 34px;
  padding: 0 2px;
  margin: 0 !important;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor:pointer;
  font-weight: 800;
  font-size: 11px;
  color:#334155;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  box-sizing: border-box;
}
.ee-dow.on{
  background: #dcfce7;
  border-color: #86efac;
  color:#15803d;
}
.ee-dow:active{ transform: scale(0.98); }
body.dark-mode .ee-dow{
  background: transparent;
  border-color: rgba(51,65,85,0.9);
  color:#cbd5e1;
}
body.dark-mode .ee-dow.on{
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.45);
  color:#86efac;
}

.ee-actions{ display:flex; gap:10px; margin-top:12px; }
.ee-actions .btn{ flex:1; }

.ee-muted{
  font-size: 12px;
  color:#64748b;
  line-height: 1.5;
}
body.dark-mode .ee-muted{ color:#94a3b8; }

.ee-card-danger{ border-color: rgba(239,68,68,0.20); }
body.dark-mode .ee-card-danger{ border-color: rgba(239,68,68,0.18); }

/* Employment status pills */
.ee-status-pills{
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.ee-status-pill{
  flex: 1;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.45);
  background: transparent;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ee-status-pill:hover{ background: rgba(148,163,184,0.12); }
.ee-status-pill:active{ transform: scale(0.97); }
.ee-status-pill.is-selected{
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.40);
  color: #dc2626;
  box-shadow: none;
}
.ee-status-pill.is-active{
  background: rgba(5,150,105,0.10);
  border-color: rgba(5,150,105,0.40);
  color: #059669;
  box-shadow: none;
}
body.dark-mode .ee-status-pill{
  border-color: rgba(148,163,184,0.30);
  color: #94a3b8;
}
body.dark-mode .ee-status-pill:hover{ background: rgba(148,163,184,0.10); }
body.dark-mode .ee-status-pill.is-selected{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.40);
  color: #fca5a5;
}
body.dark-mode .ee-status-pill.is-active{
  background: rgba(5,150,105,0.12);
  border-color: rgba(5,150,105,0.40);
  color: #6ee7b7;
}

.btn.danger{
  background: transparent;
  color: #dc2626;
  border: 2px solid #dc2626;
}
.btn.danger:hover{ background: rgba(220,38,38,0.06); }
.btn.danger:active{ transform: scale(0.99); background: rgba(220,38,38,0.10); }
body.dark-mode .btn.danger{
  background: transparent;
  color: #f87171;
  border-color: #ef4444;
}
body.dark-mode .btn.danger:hover{ background: rgba(239,68,68,0.10); }

/* ─────────────────────────────
   Header ORG pill (old UI style)
   - Replaces muted #orgNameTop
   ───────────────────────────── */
.hdr-acc-dot{
  width: 33px;
  height: 33px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  /* Default fallback color; JS may override per-org */
  background: #9ec5ff;
  color: rgba(15, 23, 42, 0.95);

  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
}

.hdr-acc-dot:active{
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(0,0,0,0.22);
}

body.dark-mode .hdr-acc-dot{
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

/* Slightly more "pill-like" when selected */
.hdr-acc-dot.is-selected{
  outline: 2px solid rgba(59,130,246,0.40);
  outline-offset: 0px;
}

body.dark-mode .hdr-acc-dot.is-selected{
  outline-color: rgba(56,189,248,0.35);
}

/* Divider after the first 3 "fields" (Section, Admin, Weekly off) in Edit Employee
   Use a pseudo-element (more reliable than border-bottom with flex/overflow layouts) */
.edit-employee-modal .ee-card > .ee-field:nth-child(4)::after{
  content: "";
  display: block;
  height: 1px;
  background: #e2e8f0;
  margin-top: 14px;  /* space from Weekly off controls */
}

body.dark-mode .edit-employee-modal .ee-card > .ee-field:nth-child(4)::after{
  background: #334155;
}


/* Bulk edit field toggle checkboxes */
.me-label-toggle{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}
.me-label-toggle input[type="checkbox"]{
  width: 13px;
  height: 13px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}

/* Defaults card tab pills */
.me-tabs{
  display: flex;
  gap: 5px;
  margin-bottom: 2px;
}
.me-tab{
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.me-tab:hover{ background: rgba(148,163,184,0.10); }
.me-tab.active{
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
body.dark-mode .me-tab{
  border-color: #334155;
  color: #94a3b8;
}
body.dark-mode .me-tab:hover{ background: rgba(148,163,184,0.10); }
body.dark-mode .me-tab.active{
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

/* Dark mode native date picker */
body.dark-mode input[type="date"]{
  color-scheme: dark;
  background: #0f172a;
  color: #e2e8f0;
  border: 1.5px solid #334155;
  border-radius: 10px;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
}
