:root {
  --navy: #252B75;
  --navy-dark: #16194A;
  --royal-blue: #2E3192;
  --teal: #0284C7;
  --sky-blue: #38BDF8;
  --sky-light: #F0F9FF;
  --gold: #D97706;
  --green: #16A34A;
  --red: #DC2626;
  --gray-bg: #F4F7FB;
  --gray-line: #DCE5EE;
  --text: #1E293B;
  --text-muted: #64748B;
  --white: #FFFFFF;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(37,43,117,0.08), 0 1px 2px rgba(37,43,117,0.05);
}

* { box-sizing: border-box; }

.sp-balance-tables {
  width: 100%;
}

.sp-balance-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sp-balance-box .sp-table-wrap,
.sp-announcements-list {
  flex: 1;
}

.sp-announcements-list {
  min-height: 260px;
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.sp-announcement-item {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  border-left: 3px solid transparent;
  cursor: pointer;
  animation: spAnnouncementEnter 220ms ease both;
}

.sp-announcement-item:last-child { border-bottom: 0; }
.sp-announcement-item:hover { background: #f8fafc; }
.sp-announcement-item.is-unread { background: #fff7ed; border-left-color: #f97316; }
.sp-announcement-item.is-read { background: #fff; border-left-color: #cbd5e1; }
.sp-announcement-item.is-expanded { background: #f8fafc; }
.sp-announcement-details { display: none; }
.sp-announcement-item.is-expanded .sp-announcement-details { display: block; }
.sp-announcement-title { font-weight: 800; color: var(--navy-dark); font-size: 13px; }
.sp-announcement-message { margin-top: 4px; color: #475569; font-size: 12px; line-height: 1.45; white-space: pre-wrap; }
.sp-announcement-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: #64748b; font-size: 10.5px; }
.sp-announcement-badge { border-radius: 999px; padding: 2px 7px; font-weight: 800; }
.sp-announcement-badge.unread { background: #fed7aa; color: #9a3412; }
.sp-announcement-badge.read { background: #dcfce7; color: #166534; }
.sp-announcement-empty { padding: 24px 12px; color: var(--text-muted); text-align: center; font-size: 12px; }

.sp-announcements-list.is-auto-scrolling {
  scroll-behavior: auto;
}

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

.sp-summary-table tbody tr,
.sp-leave-table tbody tr {
  transition: background-color 140ms ease;
}

.sp-summary-table tbody tr:hover,
.sp-leave-table tbody tr:hover {
  background: #f8fafc;
}

.sp-leave-label {
  border-left-width: 4px !important;
}

.sp-leave-cl { border-left-color: #ea580c !important; }
.sp-leave-el { border-left-color: #16a34a !important; }
.sp-leave-al { border-left-color: #db2777 !important; }
.sp-leave-off { border-left-color: #7c3aed !important; }
.sp-leave-od { border-left-color: #0284c7 !important; }
.sp-leave-ml { border-left-color: #d97706 !important; }

.sp-balance-value {
  color: var(--text-muted);
  font-weight: 700 !important;
}

.sp-balance-value.sp-value-active {
  font-weight: 800 !important;
}

.sp-accent-cl.sp-value-active { color: #ea580c; }
.sp-accent-el.sp-value-active { color: #16a34a; }
.sp-accent-al.sp-value-active { color: #db2777; }
.sp-accent-off.sp-value-active { color: #7c3aed; }
.sp-accent-od.sp-value-active { color: #0284c7; }
.sp-accent-ml.sp-value-active { color: #d97706; }

.sp-summary-value.sp-summary-alert { color: #dc2626; }
.sp-summary-value.sp-summary-good { color: #059669; }
.sp-summary-value.sp-summary-warn { color: #d97706; }

@media (max-width: 760px) {
  .sp-balance-tables {
    grid-template-columns: 1fr !important;
  }

  .sp-balance-tables > div,
  .sp-balance-tables table {
    width: 100% !important;
  }
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--gray-bg);
  color: var(--text);
  font-size: 14px;
}

h1, h2, h3 { margin: 0 0 8px 0; font-weight: 700; color: var(--navy-dark); }
h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--royal-blue); margin-top: 4px; }
.muted { color: var(--text-muted); }

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16194A 0%, #252B75 50%, #0284C7 100%);
  padding: 20px;
}
.login-card {
  background: var(--white);
  border-radius: 14px;
  padding: 38px 34px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 25px 60px rgba(22,25,74,0.4);
  border-top: 4px solid var(--sky-blue);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: 0 auto 12px auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(37,43,117,0.2));
}
.login-brand h1 {
  font-size: 18px;
  color: var(--navy-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}
.login-crest {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px auto;
}
.login-hint { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 18px; }

form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
input, select {
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid var(--gray-line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
}
input:focus, select:focus {
  outline: 2px solid var(--royal-blue);
  outline-offset: 1px;
  border-color: var(--royal-blue);
}

.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.btn-primary { background: linear-gradient(135deg, #252B75 0%, #2E3192 100%); color: var(--white); box-shadow: 0 2px 4px rgba(37,43,117,0.25); }
.btn-primary:hover { background: linear-gradient(135deg, #16194A 0%, #252B75 100%); transform: translateY(-1px); }
.btn-secondary { background: var(--white); border: 1px solid var(--gray-line); color: var(--text); }
.btn-secondary:hover { border-color: var(--royal-blue); color: var(--royal-blue); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.error-text { color: var(--red); font-size: 12px; margin-bottom: 10px; }

/* ---------- App Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px;
  background: linear-gradient(180deg, #16194A 0%, #1B1E4B 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding: 0 6px; }
.sidebar-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.brand-crest {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--gold); color: var(--navy-dark);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-name { font-weight: 700; font-size: 13px; line-height: 1.3; color: #fff; }
.brand-sub { font-size: 11px; color: var(--sky-blue); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
  text-align: left;
  background: none;
  border: none;
  color: #CBD5E1;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.nav-item:hover { background: rgba(56,189,248,0.1); color: var(--white); }
.nav-item.active {
  background: linear-gradient(90deg, #2E3192 0%, #0284C7 100%);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(2,132,199,0.35);
  border-left: 3px solid var(--sky-blue);
}

/* Sidebar Navigation Dropdown / Group */
.nav-group {
  display: flex;
  flex-direction: column;
  margin: 3px 0;
}
.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #CBD5E1;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  user-select: none;
}
.nav-group-toggle:hover {
  background: rgba(56,189,248,0.12);
  color: var(--white);
}
.nav-group.has-active .nav-group-toggle {
  color: #38BDF8;
  background: rgba(56,189,248,0.08);
}
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-group-arrow {
  font-size: 11px;
  transition: transform 0.25s ease;
  color: #94A3B8;
  font-weight: bold;
}
.nav-group.open .nav-group-arrow {
  transform: rotate(180deg);
}
.nav-group-items {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 8px;
  margin-left: 12px;
  margin-top: 3px;
  margin-bottom: 4px;
  border-left: 2px solid rgba(56, 189, 248, 0.3);
}
.nav-group.open .nav-group-items {
  display: flex;
}
.nav-sub-item {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  border-radius: 4px;
  text-align: left;
}
.nav-sub-item:hover {
  color: #FFFFFF;
  background: rgba(56, 189, 248, 0.15);
}
.nav-sub-item.active {
  background: linear-gradient(90deg, #2E3192 0%, #0284C7 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(2,132,199,0.3);
  border-left: 3px solid var(--sky-blue) !important;
}

.main-area {
  flex: 1;
  padding: 24px 30px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; width: 100%; }
.topbar-user { font-size: 13px; color: var(--text-muted); font-weight: 600; }

.view { display: none; width: 100%; }
.view.active { display: block; width: 100%; }

.controls-row { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 18px; flex-wrap: wrap; width: 100%; }
.controls-row label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.controls-row input, .controls-row select { min-width: 160px; }

.banner {
  background: #FFF6E5; border: 1px solid var(--gold); color: #7A5A12;
  padding: 8px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px;
  width: 100%;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 22px;
  width: 100%;
  box-sizing: border-box;
}

.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 18px; align-items: start; width: 100%; }
.inline-form { display: flex; gap: 10px; margin-bottom: 12px; width: 100%; }
.inline-form input { width: auto; flex: 1; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 6px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.checkbox-label input { width: auto; margin: 0; }

.working-days { grid-column: 1/-1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 4px; }
.working-days > span { font-weight: 700; font-size: 12px; color: var(--text-muted); text-transform: uppercase; }
.working-days label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; text-transform: none; font-size: 13px; }
.working-days input { width: auto; margin: 0; }

.table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; background: var(--navy); color: var(--white);
  padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap;
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--gray-line); white-space: nowrap; }
.data-table tbody tr:hover { background: #F7FAFB; }
.data-table input[type=time], .data-table select { min-width: 90px; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.tag-green { background: #E4F5EB; color: var(--green); }
.tag-red { background: #FBE9E7; color: var(--red); }
.tag-gold { background: #FBF0DA; color: #8A6417; }
.tag-gray { background: #EDEFF0; color: var(--text-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 24px; }
.dept-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 24px; }

/* Decent & Professional Dashboard Category Stat Card */
.dash-stat-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 16px 18px;
  border: 1px solid #cbd5e1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Decent & Professional Dashboard Department Card */
.dash-dept-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dash-dept-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.07);
  border-color: #94a3b8;
}

.dash-dept-card.card-clinical {
  border-top: 3px solid #0369a1;
  background: #ffffff;
}

.dash-dept-card.card-non-clinical {
  border-top: 3px solid #475569;
  background: #ffffff;
}

.dash-dept-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--navy-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-clickable-count {
  border-radius: 4px;
  padding: 2px 4px;
  margin-left: -4px;
  margin-right: -4px;
  transition: background 0.15s ease;
}
.dash-clickable-count:hover {
  background: #f1f5f9;
}

/* Decent & Subtle Metric Pills in Dashboard Cards */
.dash-metric-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  margin-top: 4px;
}
.dash-drill-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: all 0.15s ease;
  user-select: none;
}
.dash-drill-pill:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-1px);
}
.dash-drill-pill b {
  font-weight: 800;
}
.dash-drill-pill.pill-active-alert {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.dash-drill-pill.pill-active-alert:hover {
  background: #b91c1c;
  color: #ffffff;
  border-color: #b91c1c;
}

/* Filter Pill Buttons */
.dash-pill-btn {
  border: none;
  background: transparent;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dash-pill-btn:hover {
  color: var(--navy-dark);
}
.dash-pill-btn.active {
  background: var(--navy-dark);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.tr-clinical {
  background: #f8fafc;
}
.tr-clinical:hover {
  background: #f0f9ff !important;
}
.tr-non-clinical:hover {
  background: #f8fafc !important;
}

.chip-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li {
  background: var(--gray-bg); border: 1px solid var(--gray-line); border-radius: 20px;
  padding: 5px 12px; font-size: 12px; display: flex; align-items: center; gap: 8px;
}
.chip-list button { background: none; border: none; color: var(--red); cursor: pointer; font-weight: 800; font-size: 13px; }

.summary-row { margin-top: 14px; font-size: 13px; color: var(--text-muted); display: flex; gap: 18px; flex-wrap: wrap; }
.summary-row b { color: var(--navy-dark); }

/* ---------- Working Day Setup ---------- */
.breadcrumb-bar {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb-bar strong {
  color: var(--navy-dark);
  font-size: 15px;
}
.working-days-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}
.filter-card {
  position: sticky;
  top: 20px;
}
.calendar-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-line);
}
.working-days-table th {
  background: #647178;
}
.working-days-table input, .working-days-table select {
  padding: 6px 8px;
  font-size: 13px;
  margin: 0;
}
.working-days-table tr.row-weekly-off {
  background: #FFFDF5;
}
.working-days-table tr.row-holiday {
  background: #FFF5F5;
}

/* ---------- Attendance Matrix Report ---------- */
.report-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 18px;
}
.control-field .field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.date-range-field input[type="date"] {
  min-width: 120px;
  margin: 0;
  padding: 6px 8px;
}
.dept-report-block {
  margin-bottom: 24px;
}
.dept-report-title {
  background: #fff;
  border-left: 4px solid var(--teal);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.matrix-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 270px);
  min-height: 380px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  background: #fff;
  margin-top: 6px;
  position: relative;
}
.matrix-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 10px;
}
.matrix-table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.matrix-table-wrap::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
.matrix-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.matrix-top-scroll-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  height: 12px;
  margin-top: 10px;
  margin-bottom: 2px;
  background: #f1f5f9;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}
.matrix-top-scroll-wrap::-webkit-scrollbar {
  height: 10px;
}
.matrix-top-scroll-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.matrix-top-scroll-wrap::-webkit-scrollbar-thumb {
  background: #0284c7;
  border-radius: 4px;
}
.matrix-top-scroll-wrap::-webkit-scrollbar-thumb:hover {
  background: #0369a1;
}
.matrix-top-scroll-inner {
  height: 1px;
}

.matrix-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  background: #fff;
  white-space: nowrap;
}
.matrix-report-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.matrix-report-table th.th-fixed:nth-child(1),
.matrix-report-table td.td-fixed:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #ffffff;
}
.matrix-report-table th.th-fixed:nth-child(2),
.matrix-report-table td.td-fixed:nth-child(2) {
  position: sticky;
  left: 32px;
  z-index: 5;
  background: #ffffff;
}
.matrix-report-table th.th-fixed:nth-child(3),
.matrix-report-table td.td-fixed:nth-child(3) {
  position: sticky;
  left: 107px;
  z-index: 5;
  background: #ffffff;
  border-right: 2px solid #cbd5e1 !important;
}
.matrix-report-table thead th.th-fixed:nth-child(1),
.matrix-report-table thead th.th-fixed:nth-child(2),
.matrix-report-table thead th.th-fixed:nth-child(3) {
  z-index: 20 !important;
  background: #f1f5f9 !important;
}
.matrix-report-table tbody tr:hover td.td-fixed {
  background: #f8fafc !important;
}
.matrix-report-table th {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 4px 2px;
  font-weight: 700;
  font-size: 10px;
  text-align: center;
  height: 36px;
  box-sizing: border-box;
}
.matrix-report-table th.th-fixed {
  text-align: left;
  padding: 5px 8px;
}
.matrix-report-table th.th-sun,
.matrix-report-table th.th-holiday {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  border: 1px solid #fda4af !important;
  font-weight: 800;
}
.th-date-main {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}
.th-date-sub {
  font-size: 7.5px;
  font-weight: 700;
  color: #64748b;
  margin-top: 1px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.th-sub-holiday {
  color: #9f1239 !important;
  font-weight: 800;
}
.matrix-report-table th.th-totals {
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 800;
  font-size: 10px;
  padding: 5px 2px;
}
.matrix-report-table td {
  border: 1px solid #cbd5e1;
  padding: 2px 2px;
  text-align: center;
  font-size: 11px;
  height: 38px;
  box-sizing: border-box;
  vertical-align: middle;
}
.matrix-report-table td.td-fixed {
  text-align: left;
  padding: 2px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.matrix-report-table td.td-total {
  font-weight: 700;
  background: #f8fafc;
  padding: 2px 2px;
}
.matrix-report-table tbody tr:hover {
  background: #f8fafc;
}
.matrix-report-table td.td-sun,
.matrix-report-table td.m-cell-h,
.m-cell-h {
  background: #fff1f2 !important;
  color: #be123c !important;
  border: 1px solid #fecdd3 !important;
  font-weight: 800;
}
.matrix-holiday-worked-cell {
  background: #fff1f2 !important;
  color: #be123c !important;
  position: relative;
}
.matrix-holiday-worked-cell::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  background: #16a34a;
  border-radius: 50%;
}
.m-cell-x {
  color: #15803d;
  font-weight: 700;
}
.m-cell-a {
  color: #dc2626;
  font-weight: 700;
}
.m-cell-cl {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 700;
}
.m-cell-el {
  background: #faf5ff !important;
  color: #7e22ce !important;
  font-weight: 700;
}
.m-cell-od {
  background: #fff7ed !important;
  color: #c2410c !important;
  font-weight: 700;
}
.m-cell-off {
  background: #fdf2f8 !important;
  color: #9d174d !important;
  font-weight: 700;
}
.m-cell-ml {
  background: #ecfeff !important;
  color: #0e7490 !important;
  font-weight: 700;
}

/* ---------- Individual Calendar ---------- */
.cal-month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 6px;
}
.cal-info-card {
  padding: 16px 20px;
}
.cal-staff-header {
  background: #f1f5f9;
  border-left: 4px solid var(--teal);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-dark);
  border-radius: 0 4px 4px 0;
  margin-bottom: 14px;
}

/* Calendar Summary Stat Cards */
.cal-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.cal-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 3px solid #64748b;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.cal-stat-num {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy-dark);
  line-height: 1.1;
}
.cal-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.cal-stat-card.stat-p { border-top-color: #16a34a; }
.cal-stat-card.stat-p .cal-stat-num { color: #15803d; }
.cal-stat-card.stat-l { border-top-color: #2563eb; }
.cal-stat-card.stat-l .cal-stat-num { color: #1d4ed8; }
.cal-stat-card.stat-a { border-top-color: #dc2626; }
.cal-stat-card.stat-a .cal-stat-num { color: #b91c1c; }
.cal-stat-card.stat-lt { border-top-color: #d97706; }
.cal-stat-card.stat-lt .cal-stat-num { color: #b45309; }
.cal-stat-card.stat-pm { border-top-color: #0d9488; }
.cal-stat-card.stat-pm .cal-stat-num { color: #0f766e; }

/* Calendar Table */
.individual-calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}
.individual-calendar-table th {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
}
.individual-calendar-table th.cal-th-sun {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  font-weight: 800;
}
.individual-calendar-table td {
  border: 1px solid #cbd5e1;
  height: 90px;
  vertical-align: top;
  padding: 6px 8px;
  background: #fff;
  position: relative;
  font-size: 11px;
}
.individual-calendar-table td:hover {
  background: #f8fafc;
}
.individual-calendar-table td.cal-holiday-cell {
  background: #fff1f2 !important;
}
.cal-cell-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 2px;
}
.cal-day-num {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.2;
}

.cal-center-symbol-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3px 0 3px;
}
.cal-center-symbol {
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  min-width: 32px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.cal-center-symbol.sym-x { background: #dcfce7; color: #15803d; border: 1px solid #86efac; font-size: 18px; }
.cal-center-symbol.sym-h { background: #ffe4e6; color: #e11d48; border: 1px solid #fca5a5; font-size: 18px; }
.cal-center-symbol.sym-a { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; font-size: 19px; }
.cal-center-symbol.sym-cl, .cal-center-symbol.sym-l { background: #dbeafe; color: #1d4ed8; border: 1.5px solid #93c5fd; font-size: 18px; }
.cal-center-symbol.sym-el { background: #f3e8ff; color: #7e22ce; border: 1.5px solid #d8b4fe; font-size: 17px; }
.cal-center-symbol.sym-od { background: #ffedd5; color: #c2410c; border: 1.5px solid #fdba74; font-size: 17px; }

.cal-symbol {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.cal-symbol.sym-x { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.cal-symbol.sym-h { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.cal-symbol.sym-a { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.cal-symbol.sym-cl { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.cal-symbol.sym-el { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.cal-symbol.sym-od { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }

.cal-holiday-label {
  font-size: 10.5px;
  color: #be123c;
  font-weight: 700;
  margin-top: 2px;
  text-align: center;
}
.cal-punch-log {
  font-size: 10.5px;
  color: #334155;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1px;
  text-align: center;
}
.cal-note-text {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  margin-top: 1px;
  text-align: center;
}

.m-cell-cl {
  background: #E8F4F8 !important;
  color: #1B4F72 !important;
  font-weight: 700;
}
.m-cell-el {
  background: #F4ECF7 !important;
  color: #512E5F !important;
  font-weight: 700;
}
.m-cell-od {
  background: #FEF5E7 !important;
  color: #7E5109 !important;
  font-weight: 700;
}
.m-cell-off {
  background: #FDF2F8 !important;
  color: #9D174D !important;
  font-weight: 700;
}
.m-cell-ml {
  background: #ECFEFF !important;
  color: #0E7490 !important;
  font-weight: 700;
}

/* Weekly Off Matrix Table */
.wo-matrix-table th.th-sunday {
  background: #F9D5D5 !important;
  color: #8C2A2A !important;
}
.wo-matrix-table td.wo-checked-cell {
  background: #FDE8E8 !important;
}
.wo-matrix-table input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  display: block;
}

/* Leave Badges */
.cal-leave-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.cal-leave-strip .leave-badge {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.leave-badge span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.leave-badge strong {
  font-size: 13px;
  white-space: nowrap;
}
.badge-cl { border-left: 4px solid #2563eb !important; }
.badge-cl strong { color: #1d4ed8; }
.badge-el { border-left: 4px solid #7c3aed !important; }
.badge-el strong { color: #6d28d9; }
.badge-ml { border-left: 4px solid #0891b2 !important; }
.badge-ml strong { color: #0e7490; }
.badge-al { border-left: 4px solid #db2777 !important; }
.badge-al strong { color: #be185d; }
.badge-od { border-left: 4px solid #ea580c !important; }
.badge-od strong { color: #c2410c; }
.badge-comp-off { border-left: 4px solid #16a34a !important; }
.badge-comp-off strong { color: #15803d; }

.toast {
  position: fixed; top: 20px; right: 20px; z-index: 999;
  background: var(--navy-dark); color: var(--white); padding: 12px 18px; border-radius: 6px;
  font-size: 13px; box-shadow: var(--shadow);
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

/* ---------- Daily Attendance ---------- */
.daily-att-card {
  padding: 16px 20px;
}
.daily-att-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-line);
}
.daily-att-controls .control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.daily-att-controls .control-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
}
.daily-date-input {
  width: 150px;
  margin: 0;
  padding: 6px 10px;
}
.category-radio-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--navy-dark);
  text-transform: none;
  user-select: none;
  white-space: nowrap;
}
.radio-option input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--royal-blue);
}
.btn-go {
  background: linear-gradient(135deg, #252B75 0%, #0284C7 100%);
  color: #fff;
  padding: 7px 22px;
  border-radius: 6px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(37,43,117,0.2);
  transition: all 0.15s ease;
}
.btn-go:hover {
  background: linear-gradient(135deg, #16194A 0%, #252B75 100%);
  transform: translateY(-1px);
}
.right-actions {
  margin-left: auto;
}
.btn-print {
  background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
  color: #fff;
  padding: 7px 22px;
  border-radius: 6px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(217,119,6,0.2);
  transition: all 0.15s ease;
}
.btn-print:hover {
  background: linear-gradient(135deg, #B45309 0%, #D97706 100%);
  transform: translateY(-1px);
}

/* Daily Attendance Table */
.daily-table-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.daily-attendance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
}
.daily-attendance-table th {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-align: left;
}
.daily-attendance-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 8px;
  color: #1e293b;
  font-size: 12px;
}
.daily-attendance-table tbody tr:hover:not(.dept-group-row) {
  background: #f8fafc;
  cursor: pointer;
}
.daily-attendance-table tr.dept-group-row td {
  background: #f0f9ff;
  font-weight: 700;
  color: #0369a1;
  padding: 7px 10px;
  font-size: 12px;
  border-top: 2px solid #bae6fd;
  border-bottom: 2px solid #bae6fd;
  cursor: default;
}

/* Status cell highlights */
.cell-no-fp {
  background: #F9A38F !important;
  color: #5B190E !important;
  font-weight: 600;
  text-align: center;
}
.cell-permission {
  background: #F9E79F !important;
  color: #6E5306 !important;
  font-weight: 600;
  text-align: center;
}
.cell-present {
  background: #FFFFFF;
  color: #1E4620;
  text-align: center;
}
.cell-leave {
  background: #E0F2FE !important;
  color: #0369A1 !important;
  font-weight: 700;
  text-align: center;
}
.cell-holiday {
  background: #FFE4E6 !important;
  color: #BE123C !important;
  font-weight: 700;
  text-align: center;
}
.cell-neutral {
  text-align: center;
  color: var(--text-muted);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-card {
  background: #fff;
  border-radius: 8px;
  padding: 24px 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Print Specifics */
.print-only-header {
  display: none;
}
@media print {
  .no-print, .sidebar, .topbar {
    display: none !important;
  }
  .app-shell {
    display: block !important;
  }
  .main-area {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .card, .daily-att-card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
  .print-only-header {
    display: block;
    text-align: center;
    margin-bottom: 14px;
  }
  .print-only-header h2 {
    font-size: 18px;
    margin: 0;
  }
  .print-only-header h3 {
    font-size: 14px;
    color: #444;
    margin: 2px 0 6px 0;
  }
  .print-meta {
    font-size: 12px;
    color: #666;
  }
  .daily-attendance-table {
    font-size: 10px !important;
  }
  .daily-attendance-table th, .daily-attendance-table td {
    padding: 4px 6px !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Print Styles for Individual Calendar */
  .individual-calendar-table {
    width: 100% !important;
    table-layout: fixed !important;
    page-break-inside: avoid;
  }
  .individual-calendar-table th, .individual-calendar-table td {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .individual-calendar-table td {
    height: 70px !important;
    padding: 4px 6px !important;
  }
  .cal-summary-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    margin-bottom: 8px !important;
  }
  .cal-stat-card {
    padding: 6px 4px !important;
    border: 1px solid #cbd5e1 !important;
  }
  .cal-stat-num {
    font-size: 15px !important;
  }
  .cal-leave-strip {
    grid-template-columns: repeat(3, 1fr) !important;
    margin-bottom: 10px !important;
  }

  /* Print Styles for LOP Report Table */
  #lopTable {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 11px !important;
    margin-top: 10px !important;
  }
  #lopTable th {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
    padding: 6px 5px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  #lopTable td, #lateTable td {
    border: 1px solid #333333 !important;
    padding: 5px 6px !important;
    color: #000000 !important;
    font-size: 11px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  #lopTable tbody tr:nth-child(even), #lateTable tbody tr:nth-child(even) {
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  #lateTable {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 11px !important;
    margin-top: 10px !important;
  }
  #lateTable th {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
    padding: 6px 5px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .college-print-logo {
    display: inline-block !important;
    width: 55px !important;
    height: 55px !important;
    object-fit: contain !important;
  }
  .lop-table-header-block, .late-table-header-block {
    background: #ffffff !important;
    border: none !important;
    padding: 6px 0 !important;
    margin-bottom: 6px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
  }
  .lop-table-header-block h4, .late-table-header-block h4 {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #000000 !important;
    margin: 0 !important;
  }
  .lop-table-header-block .muted, .late-table-header-block .muted {
    font-size: 11px !important;
    color: #333333 !important;
  }
  .print-signatures-block {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 50px !important;
    page-break-inside: avoid !important;
  }
}

/* Master Setup Tabs */
.master-tab-bar .master-tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  background: #f0f4f8;
  color: var(--navy-dark);
  border: 1px solid var(--gray-line);
  cursor: pointer;
  transition: all 0.15s ease;
}
.master-tab-bar .master-tab-btn:hover {
  background: #e2eaf2;
}
.master-tab-bar .master-tab-btn.active {
  background: var(--navy-dark) !important;
  color: #fff !important;
  border-color: var(--navy-dark) !important;
}

.master-tab-panel {
  display: none !important;
}
.master-tab-panel.active {
  display: block !important;
}

@media (max-width: 900px) {
  .working-days-layout { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
  .main-area { padding: 18px; }
}

/* Biometric Badges & Status */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
}
.status-online {
  background: #E8F8F5;
  color: #0E6251;
  border: 1px solid #A3E4D7;
}
.status-offline {
  background: #FDEDEC;
  color: #78281F;
  border: 1px solid #F5B7B1;
}
.status-syncing {
  background: #FEF9E7;
  color: #7D6608;
  border: 1px solid #F9E79F;
}
.dot-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-online { background: #2ECC71; box-shadow: 0 0 6px #2ECC71; }
.dot-offline { background: #E74C3C; }
.dot-syncing { background: #F39C12; animation: pulse 1s infinite alternate; }

@keyframes pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.punch-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.punch-in { background: #E8F8F5; color: #16A085; }
.punch-out { background: #FEF9E7; color: #D68910; }
.punch-auto { background: #EBF5FB; color: #2980B9; }

.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 40, 49, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  padding: 24px 26px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Small Form Elements in Data Tables */
.form-input-sm {
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #1e293b;
  box-sizing: border-box;
}
.form-input-sm:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(11, 114, 133, 0.15);
}

.form-select-sm {
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
  box-sizing: border-box;
}
.form-select-sm:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(11, 114, 133, 0.15);
}

/* Manual Attendance Table */
.manual-att-table th {
  background: #1B4F72;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.manual-att-table td {
  padding: 6px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}
.manual-att-table tr:hover td {
  background: #f8fafc;
}

/* Available Leaves Table */
.avail-leave-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.avail-leave-table td {
  padding: 6px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}
.avail-leave-table tr:hover td {
  background: #fcfdfe;
}

/* EL-CL Setting & Pending Report Tables */
.avail-leave-table th,
.report-pending-table th {
  background: #1B4F72 !important;
  color: #ffffff !important;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  padding: 10px 8px;
  border: 1px solid #154360 !important;
  text-align: center;
}
.report-pending-table td {
  padding: 8px 10px;
  vertical-align: middle;
  font-size: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.report-pending-table tr:hover td {
  background: #f8fafc;
}

/* Attendance Report Details Table */
.details-report-table th {
  background: #1e293b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  padding: 8px 10px;
}
.details-report-table td {
  padding: 6px 10px;
  vertical-align: middle;
  font-size: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.details-report-table tr:hover td {
  background: #f1f5f9;
}

/* Matrix In & Out Cells */
.matrix-inout-table th {
  height: 34px;
}
.matrix-inout-table td {
  height: 52px;
  vertical-align: middle;
  padding: 2px 2px;
}
.matrix-inout-table .matrix-vertical-holiday {
  max-height: 46px;
  font-size: 8.5px;
  letter-spacing: 0.3px;
}
.cell-inout-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1px 0;
  gap: 1px;
}
.cell-inout-sym {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.cell-inout-time {
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

/* Print Styles for Pending Report, Attendance Report & Details Report */
@media print {
  #view-leave-pending-report .report-pending-table th,
  #view-report .matrix-report-table th,
  #view-report-details .matrix-report-table th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #view-leave-pending-report .report-pending-table td,
  #view-report .matrix-report-table td,
  #view-report-details .matrix-report-table td {
    border: 1px solid #cbd5e1 !important;
    font-size: 9px !important;
    padding: 2px 2px !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .matrix-vertical-holiday {
    writing-mode: vertical-rl !important;
    transform: rotate(180deg) !important;
    font-size: 8px !important;
    color: #be123c !important;
  }
  #view-leave-pending-report .stat-grid,
  #view-report .stat-grid,
  #view-report-details .stat-grid {
    display: none !important;
  }
}

/* ---------- Staff Portal Badges & Styles ---------- */
.tag-blue { background: #e0f2fe; color: #0369a1; }
.tag-orange { background: #ffedd5; color: #c2410c; }
.tag-purple { background: #ede9fe; color: #6d28d9; }
.tag-cyan { background: #cffafe; color: #0891b2; }
.tag-yellow { background: #fef9c3; color: #a16207; }

.sp-nav-pill {
  transition: all 0.2s ease;
  font-weight: 700 !important;
  border-radius: 6px !important;
}

.sp-nav-pill.active {
  background: var(--navy) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(37, 43, 117, 0.25);
}

.staff-profile-header h2 {
  color: #fff !important;
}

@media (max-width: 768px) {
  .staff-profile-header {
    padding: 14px !important;
  }
  .staff-month-filter {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    justify-content: space-between;
  }
  #spTabContent-leave-apply > div {
    grid-template-columns: 1fr !important;
  }
}

/* Print styles for Staffs Leave Details */
@media print {
  #view-staff-leave-details #sldRegisterTable {
    width: 100% !important;
    border: 2px solid #000 !important;
  }
  #view-staff-leave-details #sldRegisterTable th,
  #view-staff-leave-details #sldRegisterTable td {
    border: 1px solid #000 !important;
    color: #000 !important;
    font-size: 11px !important;
    padding: 6px 4px !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #view-staff-leave-details #sldPrintableArea {
    border: none !important;
    padding: 0 !important;
  }
}




