:root{
  --app-bg: #f6f7fb;
  --card-bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e7ecf3;
  --primary: #1677ff;
  --primary-weak: #e7f0ff;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --sidebar-w: 260px;
  --topbar-h: 72px;
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--text);
}

.layout{
  display: flex;
  min-height: 100vh;
  padding-top: var(--topbar-h);
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  width: calc(100vw - var(--sidebar-w));
  max-width: calc(100vw - var(--sidebar-w));
  min-width: 0;
  transition: margin-left 0.2s ease;
  padding: 22px 28px 32px;
  background: var(--app-bg);
}

/* Topbar (injected by script.js) */
.topbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  z-index: 60;
}
.topbar .brand{
  width: var(--sidebar-w);
  display: flex;
  align-items: center;
  gap: 0;
  padding-left: 6px;
  box-sizing: border-box;
}
.topbar .brand-logo{
  height: 34px;
  width: auto;
  max-width: 112px;
  object-fit: contain;
  display: block;
}
.topbar .brand-wordmark{
  border-radius: 0;
  box-shadow: none;
  filter: brightness(0) invert(1);
}
.topbar .brand-name{
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 15px;
}
.topbar .menu-btn{
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
}
.topbar .actions{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .icon-btn{
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #334155;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.topbar .icon-btn:hover{
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.topbar .icon-btn .dot{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid #fff;
}
.topbar .notif{ position: relative; }
.topbar .notif-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 70;
  max-height: 360px;
  overflow: auto;
}
.topbar .notif-menu[hidden]{ display: none; }
.topbar .notif-empty{
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}
.topbar .notif-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a;
}
.topbar .notif-item:hover{ background: #f8fafc; }
.topbar .notif-label{
  font-size: 13px;
  font-weight: 700;
}
.topbar .notif-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 0 6px;
  background: rgba(22, 119, 255, 0.12);
  color: var(--primary);
}
.topbar .user{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.topbar .avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1677ff, #3ddc97);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}
.topbar .user-meta{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.topbar .user-name{
  font-weight: 700;
  font-size: 13px;
}
.topbar .user-role{
  color: var(--muted);
  font-size: 12px;
}

/* Small screens: show burger + allow overlay sidebar (simple toggle) */
@media (max-width: 900px){
  .topbar .brand{ width: auto; padding-left: 0; }
  .topbar .menu-btn{ display: inline-flex; }
  .sidebar{
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }
  body.sidebar-open .sidebar{ transform: translateX(0); }
  .main-content{
    margin-left: 0;
    width: auto;
    max-width: none;
    padding: 18px 16px 28px;
  }
}

.shift-block select { min-width: 96px; }
.shift-block.block2 select { min-width: 96px; }
.unsplit-link { color:#be3b2a; text-decoration:none; }
.unsplit-link:hover { text-decoration:underline; }


.calendar-table th,
.calendar-table td {
  /* other table styles as needed */
  background: #fff;
}

.calendar-table th.sticky-col,
.calendar-table td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #e9f5ff; /* Or same as your th bg */
}

.calendar-table th.sticky-col-2,
.calendar-table td.sticky-col-2 {
  position: sticky;
  left: 130px; /* Adjust to your first column width */
  z-index: 2;
  background: #e9f5ff;
}

/* If header row, bump z-index more */
.calendar-table th.sticky-col {
  z-index: 3;
}
.calendar-table th.sticky-col-2 {
  z-index: 3;
}

/* Only for dashboard or employee list headings */
.main-content h2 {
  text-align: left;
  color: #333;
  font-size: 16px;
}

/* Only for the login page */
.login-card h2 {
  text-align: center;
  margin: 10px 0 6px;
  color: #222;
  font-size: 24px;
}

#departmentList li {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.employee-table-container {
  position: relative; 
  height: 81vh;            /* << FIX: set a fixed height */
  overflow-y: auto;
  background: #fff;
}

.employee-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;       /* NEW: no gaps that delay sticky */
  margin-top: 0;           /* CHANGED: was 10px */
  margin-bottom: 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.employee-table th,
.employee-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e3e3e3;
}

.employee-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #2c3e50;
  color: #fff;
  border-bottom: 2px solid #e3e3e3;
}


.form-container {
  background: white;
  max-width: 600px;
  margin: 30px auto;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.occupancy-container form > div {
  min-width: 160px;
}

@media (max-width: 900px) {
  .occupancy-container form {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

.action-menu a:last-child {
  color: red;
}

.switch {
  position: relative; display: inline-block; width: 44px; height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: #2cbd6e; transition: .3s;
}
.slider:before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 3px;
  background-color: #fff; transition: .3s;
}
.switch input:checked + .slider { background-color: #d73d2c; }
.switch input:checked + .slider:before { transform: translateX(20px); }


form label {
  font-weight: 600;
  margin-top: 15px;
  display: block;
  color: #333;
}

form input, form select {
  width: 95%;
  padding: 12px;
  margin-top: 5px;
  border: 1px solid #ccc;
  transition: border-color 0.2s ease-in-out;
}

form input:focus, form select:focus {
  border-color: #007BFF;
  outline: none;
}

form button {
  background-color: #007BFF;
  color: white;
  border: none;
  padding: 14px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

form button:hover {
  background-color: #0056b3;
}

.navbar {
  background: #333;
  color: white;
  padding: 10px 20px;
  display: flex;
  gap: 15px;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.navbar a:hover {
  text-decoration: underline;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.employee-card {
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.employee-card:hover {
  transform: translateY(-4px);
}

.employee-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #007BFF;
}

.employee-card p {
  margin: 5px 0;
  font-size: 14px;
  color: #333;
}

.employee-card p strong {
  color: #555;
}

.filter-bar {
  margin: 10px auto 0 auto; /* match the table's horizontal margin */
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
	padding-bottom: 10px;
}

.filter-bar input,
.filter-bar select {
  padding: 6px 10px; /* more compact padding */
  width: 100%;
  max-width: 200px; /* reduced max-width */
  border: 1px solid #ccc;
  font-size: 13px; /* slightly smaller font */
}

.employee-filter-bar {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(170px, 1fr)) auto;
  align-items: center;
  gap: 10px;
}

.employee-filter-bar input,
.employee-filter-bar select {
  max-width: none;
  width: 100%;
}

.employee-filter-bar .filter-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.employee-filter-bar .add-button,
.employee-filter-bar .add-button2 {
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 1380px) {
  .employee-filter-bar {
    display: flex;
    flex-wrap: wrap;
  }
  .employee-filter-bar input,
  .employee-filter-bar select {
    max-width: 210px;
  }
}

.dept-cards-section {
  margin: 6px 0 14px;
}

.dept-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

@media (max-width: 1280px) {
  .dept-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .dept-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .dept-cards-grid { grid-template-columns: 1fr; }
}

.dept-card {
  border: 0;
  border-radius: 8px;
  min-height: 82px;
  padding: 34px 16px;
  margin-bottom: 10px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.dept-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.26);
  filter: brightness(1.03);
}

.dept-card-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 0.95;
}

.dept-card-meta {
  font-size: 10px;
  font-weight: 600;
  opacity: .95;
}

.dept-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: calc(100% - 84px);
}

.dept-card-silhouette {
  position: absolute;
  right: 10px;
  width: 150px;
  height: 150px;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
  opacity: 0.24;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 640px) {
  .dept-card-content { max-width: calc(100% - 76px); }
  .dept-card-silhouette {
    width: 96px;
    height: 94px;
    right: 6px;
    background-size: contain;
    opacity: 0.28;
  }
}

.dept-cards-empty {
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
}

.dept-list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 10px;
}

.dept-back-btn {
  border: 1px solid #97b7db;
  background: #f5f9ff;
  color: #0f3f77;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.dept-back-btn:hover {
  background: #e9f2ff;
}

#departmentListLabel {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.employee-table th, .employee-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.employee-table th {
    background: #2c3e50;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 8px;
    text-align: left;
    border-right: 1px solid #e0e0e0;
}

.employee-table tr:hover {
  background-color: #f0f0f0;
}

.employee-table a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
}

.employee-table a:hover {
  color: #007bff;
  text-decoration: underline;
}

/* --- Employee Preview Modal: card-style layout --- */

#previewModal .modal-content {
  max-height: 90vh;
  overflow-y: auto;
  max-width: 760px;
  width: calc(100% - 32px);
  margin: 4% auto;
  padding: 22px 24px 20px;
  border-radius: 8px;
  background: radial-gradient(circle at top left, #e0f2fe 0, #f9fafb 40%, #eef2ff 100%);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.28);
}

/* Tiny title above the card */
#previewModal .preview-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b7280;
	margin-bottom: 20px;
}

/* Main card */
.preview-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 14px 14px 16px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(229, 231, 235, 0.8);
}

/* Header: avatar + name + status */
.preview-header {
  display: flex;
  gap: 26px;
  align-items: center;
  padding: 8px 6px 14px;
  border-bottom: 1px dashed #e5e7eb;
}

.preview-avatar-wrap {
  flex-shrink: 0;
}

.preview-avatar {
  width: 92px;
  height: 92px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.preview-header-text {
  flex: 1;
  min-width: 0;
}

.preview-name {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.preview-meta-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.4;
  background: #e5e7eb;
  color: #374151;
  white-space: nowrap;
}

.preview-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#previewModal .status-badge {
  border-radius: 999px;
  font-size: 11px;
  padding: 4px 11px;
}

.preview-email {
  font-size: 12px;
  color: #2563eb;
  background: #dbeafe;
  padding: 4px 10px;
  border-radius: 999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Body: two-column layout */
.preview-body {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
}

.preview-column {
  min-width: 0;
}

/* Sections */
#previewModal .preview-section {
  margin-bottom: 10px;
  padding: 10px 11px 9px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

#previewModal .preview-section h4 {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

/* Fields (label/value rows) */
.preview-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 13px;
}

.preview-label {
  color: #6b7280;
  min-width: 110px;
}

.preview-value {
  color: #111827;
  text-align: right;
  flex: 1;
  word-break: break-word;
}

/* Status history list (edit + preview) */
#statusHistory,
#previewStatusHistory {
  list-style: none;
  padding-left: 0;
  margin: 4px 0 0;
}

/* Compact History pill inside the preview modal */
#previewModal .preview-section:last-of-type {
  padding: 6px 8px;      /* smaller padding */
  margin-bottom: 4px;
  border-radius: 10px;
}

#previewStatusHistory .status-history-item {
  margin-bottom: 2px;
  padding-left: 0.9rem;  /* smaller bullet indent */
  line-height: 1.25;
}

#previewStatusHistory .status-history-label {
  font-size: 12px;       /* smaller text */
}

#previewStatusHistory .status-history-dates {
  font-size: 11px;
}


.status-history-item {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.status-history-item::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.3em;
  font-size: 0.8rem;
  color: #555;
}

.status-history-label {
  display: block;
  font-weight: 500;
}

.status-history-dates {
  display: block;
  font-size: 0.85em;
  color: #666;
  margin-top: 1px;
}

/* Responsive: stack columns on narrow screens */
@media (max-width: 720px) {
  .preview-body {
    grid-template-columns: 1fr;
  }
  .preview-header {
    align-items: flex-start;
  }
  .preview-value {
    text-align: left;
  }
}

.add-button {
  padding: 10px 20px;
  font-size: 15px;
  border: none;
  background-color: #387087;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-button2 {
  padding: 10px 20px;
  font-size: 15px;
  border: none;
  background-color: #38874D;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-button3 {
  padding: 10px 20px;
  font-size: 15px;
  border: none;
  background-color: #87B300;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-button:hover {
  background-color: #0056b3;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 30px 40px;
  width: 100%;
  max-width: 800px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}



.close {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}


form.modal-form {
  display: grid;
  grid-template-columns: 3fr 3fr;
  gap: 10px 10px;
}

form.modal-form label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
  display: block;
}

form.modal-form input,
form.modal-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  margin-top: 5px;
}

form.modal-form .full-width {
  grid-column: 1 / -1;
}

form.modal-form button {
  grid-column: 2 / -1;
  justify-self: end;
  padding: 10px 20px;
  background-color: #007bff;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

form.modal-form button:hover {
  background-color: #0056b3;
}

/* Don't stretch checkboxes/radios */
form.modal-form input[type="checkbox"],
form.modal-form input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0;
  border: 0;
}


.section-label {
  font-size: 1.1em;
  font-weight: bold;
  color: #1064ea;
  margin-top: 18px;
  margin-bottom: 8px;
  grid-column: 1 / -1;
  letter-spacing: 0.5px;
}


.sidebar {
  width: var(--sidebar-w);
  background: #f1f5f9;
  color: var(--text);
  padding: 14px 12px 18px;
  flex-shrink: 0;
  height: calc(100vh - var(--topbar-h));
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.04);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.sidebar .sidebar-section-title{
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.14em;
  padding: 10px 12px 8px;
  text-transform: uppercase;
}

.sidebar-nav,
.sidebar-nav ul,
.sidebar-nav li{
  list-style: none !important;
  padding: 0;
  margin: 0;
}

.sidebar-nav{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a,
.sidebar-nav li.has-children > .submenu-toggle{
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: #334155;
  font: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-nav .sidebar-icon{
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex: 0 0 auto;
}
.sidebar-nav .sidebar-icon svg{
  width: 18px;
  height: 18px;
}

.sidebar-nav a:hover,
.sidebar-nav li.has-children > .submenu-toggle:hover{
  background: #e2e8f0;
  border-color: var(--border);
}

.sidebar-nav li.active > a,
.sidebar-nav li.active > .submenu-toggle{
  background: var(--primary-weak);
  border-color: #cfe3ff;
  color: var(--primary);
  box-shadow: 0 10px 22px rgba(22, 119, 255, 0.12);
}
.sidebar-nav li.active .sidebar-icon{
  color: var(--primary);
}

.sidebar-nav li.has-children .chevron{
  margin-left: auto;
  color: #94a3b8;
  transition: transform 0.18s ease;
}
.sidebar-nav li.has-children.open .chevron{ transform: rotate(90deg); }

.sidebar-subnav{
  display: none;
  margin: 2px 0 8px;
}
.sidebar-nav li.has-children.open > .sidebar-subnav{ display: block; }
.sidebar-subnav a{
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px 8px 42px;
  color: #475569;
}
.sidebar-subnav li.active > a{
  background: #eef2ff;
  border-color: #dbeafe;
  color: var(--primary);
}

.sidebar .sidebar-tooltip{ display: none !important; }

.sidebar-footer{
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.sidebar .menu-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 0 6px;
  background: rgba(22, 119, 255, 0.12);
  color: var(--primary);
  margin-left: auto;
}




.employee-table td:last-child {
  text-align: right;
  position: relative;
}

.three-dots {
  cursor: pointer;
  font-size: 18px;
  padding: 4px 10px;
  display: inline-block;
}


.action-menu {
  display: none;
  position: absolute;
  right: 10px;
  top: 28px;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 10;
}

.action-menu a {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.action-menu a:hover {
  background-color: #f0f0f0;
}

/* Login 2025 Style */
.login-body{
  position: relative;
  min-height: 100vh;
  margin: 0;

  /* center the card */
  display: flex;
  justify-content: center;
  align-items: center;

  /* fallback if video doesn't load */
  background: #000;
}

/* full-screen background video */
#loginBg{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;           /* behind everything */
  pointer-events: none;  /* clicks go through */
  filter: brightness(.2); /* dim so form is readable */
}

/* soft veil over video */
.login-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  z-index: -1;
}

/* make sure the card sits above */
.login-card{ position: relative; z-index: 0; }

.login-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid transparent;
  padding: 40px 35px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.20);
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
  color: #fff;
  transition: 
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Flowing gradient border */
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(
    120deg,
    #60aaff, #00ffe7, #42e695, #8a64ff, #ff64f9, #60aaff
  );
  background-size: 300% 300%;
  background-position: 0% 50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-card:hover::before {
  opacity: 1;
  animation: flowing-border 2.7s linear infinite;
}

@keyframes flowing-border {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Masking for border only effect */
.login-card::before {
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  /* Chrome/Safari/WebKit */
  box-sizing: border-box;
}

/* Glass sweep highlight effect (optional) */
.login-card::after {
  content: "";
  pointer-events: none;
  position: absolute;
  top: -60%;
  left: -60%;
  width: 120%;
  height: 120%;
  background: linear-gradient(120deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 60%);
  opacity: 0;
  transform: skewY(-12deg) translateY(0);
  transition: opacity 0.5s, transform 0.9s cubic-bezier(.55,1.45,.3,1.1);
  z-index: 3;
}

.login-card:hover {
  transform: translateY(-12px) scale(1.010);
  box-shadow: 0 16px 48px 4px rgba(70, 195, 255, 0.13), 0 1.5px 24px 2px #00ffe766;
}

.login-card:hover::after {
  opacity: 1;
  transform: skewY(-12deg) translateY(60px);
}


.login-subtitle {
  margin-bottom: 20px;
  font-size: 14px;
  color: #fff;
}

.login-card input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1.5px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.23);
  box-shadow: 0 2px 16px rgba(90,180,255,0.03);
  font-size: 16px;
  color: #202040;
  font-weight: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    border-color 0.3s cubic-bezier(.57,1.45,.3,1.1),
    box-shadow 0.3s cubic-bezier(.57,1.45,.3,1.1),
    background 0.2s;
}

.login-card input:focus {
  border-color: #00ffe7;
  box-shadow: 0 0 0 2px #00ffe773, 0 2px 18px 0 rgba(85,240,255,0.10);
  outline: none;
  background: rgba(255,255,255,0.38);
}

/* Placeholder styling for inputs */
.login-card input::placeholder {
  color: #fff;
  opacity: 0.85;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* Button styles */
.login-card button {
  width: 100%;
  padding: 13px;
  background: linear-gradient(90deg, #00ffe7 0%, #60aaff 100%);
  color: #202040;
  font-weight: 700;
  border: none;
  font-size: 17px;
  letter-spacing: 1px;
  box-shadow: 0 2px 14px 0 rgba(0,255,231,0.09);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: 
    background 0.2s, 
    color 0.2s,
    transform 0.18s cubic-bezier(.57,1.45,.3,1.1),
    box-shadow 0.18s cubic-bezier(.57,1.45,.3,1.1);
}

.login-card button:hover,
.login-card button:focus {
  background: linear-gradient(90deg, #60aaff 0%, #00ffe7 100%);
  color: #111132;
  box-shadow: 0 8px 32px 0 #00ffe799, 0 0px 8px 0 #60aaff55;
  transform: translateY(-2px) scale(1.03);
}

/* Animated button glow effect */
.login-card button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 0 24px 8px #00ffe766;
  z-index: -1;
}

.login-card button:hover::after,
.login-card button:focus::after {
  opacity: 0.85;
}

/* Error styling */
.login-error {
  display: none;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 87, 87, 0.85);
  background: rgba(65, 0, 0, 0.62);
  color: #ffd9d9;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.35px;
  line-height: 1.4;
  text-align: center;
  white-space: pre-line;
  text-shadow: none;
  box-shadow: 0 0 0 1px rgba(255, 32, 32, 0.25), 0 8px 24px rgba(0, 0, 0, 0.28);
}

.login-error.show {
  display: block;
  animation: shake 0.28s ease;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  75% { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card .login-extra {
  opacity: 0;
  pointer-events: none;
  transform: translateY(60px) scale(0.98);
  transition: 
    opacity 0.65s cubic-bezier(.57,1.45,.3,1.1),
    transform 0.8s cubic-bezier(.57,1.45,.3,1.1);
  will-change: opacity, transform;
  height: 0;
  overflow: hidden;
}


.login-card:hover .login-extra,
.login-card:focus-within .login-extra {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  height: auto;
  overflow: visible;
}

.login-card .login-logo {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
  transition:
    color 0.3s,
    filter 0.3s,
    transform 0.65s cubic-bezier(.57,1.45,.3,1.1),
    margin-bottom 0.65s cubic-bezier(.57,1.45,.3,1.1);
  z-index: 10;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Optionally, you can make the logo pop up slightly on hover too */
.login-card:hover .login-logo,
.login-card:focus-within .login-logo {
  filter: drop-shadow(0 2px 8px #60aaffcc);
  color: #00ffe7;
  transform: translateY(-16px) scale(1.12);
  margin-bottom: 16px;
}

.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.password-wrapper input {
  width: 100%;
  padding: 12px 44px 12px 12px; /* left | right */
  border: 1px solid #ccc;
  font-size: 15px;
  box-sizing: border-box;
  display: block;
}

.password-wrapper input:focus {
  border-color: #007bff;
  outline: none;
}

.toggle-pass {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #666;
  line-height: 1;
  height: 20px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}


*, *::before, *::after {
  box-sizing: border-box;
}

.status-badge {
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
  text-align: center;
  transition: all 0.2s ease;
  color: white;
}

.status-regular {
  background-color: #28a745;
  color: #fff;
  font-weight: bold;	
}

.status-project-based {
  background-color: #3557D7;
  color: #fff;
  padding: 4px 8px;
  font-weight: bold;	
}

.status-onboarding {
  background-color: #ffc107;
  color: #fff;
}

.status-Probationary {
  background-color: #fd7e14;
  color: #fff;
  padding: 4px 8px;
  font-weight: bold;
}


.status-inactive {
  background-color: #dc3545; /* Red */
}

.status-default {
  background-color: #6c757d; /* Fallback gray */
}

.delete-button {
  margin-top: 5px;
  background-color: #dc3545;
  color: white;
  font-weight: bold;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
}

.delete-button:hover {
  background-color: #c82333;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}


.form-actions button {
  padding: 10px 20px;
}



.sort-icon {
  margin-left: 6px;
  vertical-align: middle;
  fill: none;
  stroke: #aaa;
  stroke-width: 1.5;
  transition: transform 0.3s ease, stroke 0.3s ease;
}

.sort-icon .arrow-up,
.sort-icon .arrow-down {
  opacity: 0.3;
  transition: opacity 0.2s ease;
}

th:hover .sort-icon {
  stroke: #007bff;
}

.sort-asc .arrow-up {
  opacity: 1;
}

.sort-desc .arrow-down {
  opacity: 1;
}

.sort-asc .arrow-down,
.sort-desc .arrow-up {
  opacity: 0.1;
}

.action-btn {
  margin-right: 5px;
  padding: 6px 14px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.edit-btn {
  background: #2176bd;
  color: white;
}

.edit-btn:hover {
  background: #155085;
}

.delete-btn {
  background: #eb4444;
  color: white;
}

.delete-btn:hover {
  background: #af2828;
}


@media (max-width: 480px) {
  .login-card {
    padding: 30px 20px;
  }

  .login-card h2 {
    font-size: 20px;
  }
}


.tab-switch {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
  gap: 12px;   /* <-- add space between the buttons */
  overflow: visible;  /* Let the gap be visible */
  background: none;   /* Remove background so gap shows */
  box-shadow: none;   /* Optional: Remove shadow */
}


.tab-btn {
  flex: 1 1 50%;
  padding: 13px 0;
  background: linear-gradient(90deg, #00ffe7 0%, #60aaff 100%);
  border: none;
  color: #222;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.7px;
  box-shadow: 0 2px 10px 0 #60aaff33;
}

.tab-btn:not(.active) {
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

.tab-btn.active {
  background: linear-gradient(90deg, #00ffe7 0%, #60aaff 100%);
  color: #222;
  font-weight: 700;
  box-shadow: 0 2px 10px 0 #60aaff33;
  z-index: 2;
}


/* Hide everything except logo by default */
.login-card .card-extra {
  opacity: 0;
  pointer-events: none;
  transform: translateY(45px) scale(0.98);
  transition:
    opacity 0.55s cubic-bezier(.57,1.45,.3,1.1),
    transform 0.8s cubic-bezier(.57,1.45,.3,1.1);
  will-change: opacity, transform;
  height: 0;
  overflow: hidden;
}

.login-card:hover .card-extra,
.login-card:focus-within .card-extra {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  height: auto;
  overflow: visible;
}

/* (Optional, for even smoother animation) */
.tab-switch, .login-extra, #register-section {
  transition: opacity 0.4s cubic-bezier(.57,1.45,.3,1.1),
              transform 0.7s cubic-bezier(.57,1.45,.3,1.1);
}


/* Make department select look like custom input */
#reg-department {
  background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 22px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1.5px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.23);
  box-shadow: 0 2px 16px rgba(90,180,255,0.03);
  font-size: 16px;
  color: #202040;
  font-weight: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  appearance: none;      /* Remove native arrow */
  -webkit-appearance: none;
  transition:
    border-color 0.3s cubic-bezier(.57,1.45,.3,1.1),
    box-shadow 0.3s cubic-bezier(.57,1.45,.3,1.1),
    background 0.2s;
  outline: none;
  position: relative;
  z-index: 1;
}

#reg-department:focus {
  border-color: #00ffe7;
  box-shadow: 0 0 0 2px #00ffe773, 0 2px 18px 0 rgba(85,240,255,0.10);
  background: rgba(255,255,255,0.38);
}

#reg-department option {
  color: #202040;
  background: #fff;
  font-size: 16px;
}


.finger-hands {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin: 20px 0;
}
.hand {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.finger-tip {
  width: 48px;
  height: 48px;
  background: #f1f3f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: background 0.2s, box-shadow 0.2s;
  margin: 0 3px;
  border: 2px solid #b0b3bb;
}
.finger-tip.enrolled {
  background: #e8f5e9;
  border-color: #2196F3;
}
.finger-tip:hover {
  background: #e3f2fd;
  box-shadow: 0 2px 10px #2196f311;
}
.finger-label {
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 10px;
  color: #555;
  font-weight: 600;
  pointer-events: none;
}
.finger-tip-label {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 18px;
  color: #2196F3;
  pointer-events: none;
}
.finger-tip.enrolled .finger-tip-label {
  color: #43A047;
}
.finger-thumb {
  width: 22px; height: 22px; margin-top:2px;
  background: #fff; box-shadow: 0 1px 3px #2196f322;
  display: block;
}

.fingerprint-hands-row {
  margin: 0 0 15px 0;
}
.svg-finger path {
  transition: fill 0.2s, fill-opacity 0.2s;
}
.svg-finger:hover path {
  fill-opacity: 0.45;
  filter: drop-shadow(0 2px 8px #2196F366);
}
.svg-finger image {
  pointer-events: none;
}

#hands-svg .finger-hotspot {
  cursor: pointer;
  transition: fill 0.2s;
}

.finger-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}
.finger-pill {
  padding: 6px 10px;
  border: 1px solid #b0b3bb;
  font-size: 12px;
  background: #f7f8fa;
  line-height: 1;
}
.finger-pill.matched {
  background: #e8f5e9;
  border-color: #2e7d32;
  color: #2e7d32;
  font-weight: 600;
}
.finger-pill-row{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.bio-icon-btn{
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  background: #ffffff;
  color: #c62828;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .02s ease;
}
.bio-icon-btn svg{ pointer-events:none; }
.bio-icon-btn:hover{
  background:#fff1f1;
  border-color:#ef9a9a;
}
.bio-icon-btn:active{ transform: translateY(1px); }
.bio-icon-btn[disabled]{ opacity:.55; cursor:not-allowed; }
.muted { color:#777; font-size:12px; }

/* push elements to the right inside the filter bar */
.filter-bar { display: flex; align-items: center;flex-wrap: wrap; }
.filter-bar .push-right { margin-left: auto; }

/* Employees page: responsive filter row */
.filter-bar.employee-filter-bar{
  display: grid !important;
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(145px, 0.9fr)) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.filter-bar.employee-filter-bar input[type="text"],
.filter-bar.employee-filter-bar select{
  width: 100%;
  max-width: none;
  min-width: 0;
}
.filter-bar.employee-filter-bar .filter-btn-group{
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.filter-bar.employee-filter-bar .add-button,
.filter-bar.employee-filter-bar .add-button2{
  margin: 0;
  white-space: nowrap;
}

.filter-bar.employee-filter-bar .employee-toolbar-icon {
  --toolbar-base: linear-gradient(180deg, #eff6ff 0%, #c7d2fe 55%, #818cf8 100%);
  --toolbar-accent: #4338ca;
  --toolbar-glow: rgba(99, 102, 241, 0.35);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.98) 0 20%, rgba(255,255,255,0.15) 35%, rgba(255,255,255,0) 52%),
    linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 44%),
    var(--toolbar-base);
  color: var(--toolbar-accent);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow:
    0 16px 20px -14px var(--toolbar-glow),
    0 10px 18px rgba(15, 23, 42, 0.2),
    inset 0 2px 0 rgba(255,255,255,0.95),
    inset 0 -4px 9px rgba(30, 58, 138, 0.22);
  transform: translateY(0);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.filter-bar.employee-filter-bar .employee-toolbar-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.04));
  opacity: .85;
  pointer-events: none;
}

.filter-bar.employee-filter-bar .employee-toolbar-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  filter: blur(6px);
  z-index: -1;
}

.filter-bar.employee-filter-bar .employee-toolbar-icon:hover {
  transform: translateY(-2px);
}

.filter-bar.employee-filter-bar .employee-toolbar-icon:active {
  transform: translateY(1px);
}

.filter-bar.employee-filter-bar .employee-toolbar-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 48px;
  height: 30px;
  padding: 0 4px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.18));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -3px 6px rgba(30, 58, 138, 0.16);
  z-index: 1;
}

.filter-bar.employee-filter-bar .employee-toolbar-face svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 2px 1px rgba(255,255,255,0.55));
}

.filter-bar.employee-filter-bar .employee-toolbar-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1;
}

.filter-bar.employee-filter-bar .employee-toolbar-add {
  --toolbar-base: linear-gradient(180deg, #eff6ff 0%, #c7d2fe 55%, #818cf8 100%);
  --toolbar-accent: #4338ca;
  --toolbar-glow: rgba(99, 102, 241, 0.35);
}

.filter-bar.employee-filter-bar .employee-toolbar-resigned {
  --toolbar-base: linear-gradient(180deg, #fff7ed 0%, #fed7aa 55%, #fb923c 100%);
  --toolbar-accent: #c2410c;
  --toolbar-glow: rgba(249, 115, 22, 0.35);
}

/* Employees page: table must stay usable on smaller screens */
.employee-table-container{
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.employee-table-container .employee-table{
  min-width: 1080px;
}

@media (max-width: 1200px){
  .filter-bar.employee-filter-bar{
    grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(130px, 1fr)) auto;
  }
}

@media (max-width: 1024px){
  .filter-bar.employee-filter-bar{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-bar.employee-filter-bar .filter-btn-group{
    grid-column: 1 / -1;
    justify-self: start;
    flex-wrap: wrap;
  }
  .employee-table-container{
    height: 72vh;
  }
  .employee-table-container .employee-table{
    min-width: 980px;
  }
  .employee-table-container .employee-table th,
  .employee-table-container .employee-table td{
    padding: 10px 12px;
  }
}

@media (max-width: 700px){
  .filter-bar.employee-filter-bar{
    grid-template-columns: 1fr;
  }
  .filter-bar.employee-filter-bar .filter-btn-group{
    width: 100%;
    justify-content: flex-start;
  }
  .employee-table-container{
    height: 68vh;
  }
  .employee-table-container .employee-table{
    min-width: 900px;
  }
  .employee-table-container .employee-table th,
  .employee-table-container .employee-table td{
    padding: 9px 10px;
    font-size: 12px;
  }
}

/* fingerprint badge in the Actions column */
.fp-indicator{display:none;margin-right:8px;vertical-align:middle}
.fp-indicator.has-fp{display:inline-flex;align-items:center}
.fp-indicator img{width:18px;height:18px;display:block}
.face-indicator{display:none;margin-right:8px;vertical-align:middle}
.face-indicator.has-face{display:inline-flex;align-items:center}
.face-indicator img{width:18px;height:18px;display:block}

.status-badge.status-oncall { background:#e8f1ff; color:#2a62ff; }

/* Center the login card again */
.login-body {
  display: flex;                 /* ensure flex is on */
  justify-content: center;       /* center horizontally */
  align-items: center !important;/* center vertically (override previous flex-start) */
  min-height: 100dvh;
  padding: 20px;
}

/* Prefer small-viewport units when available */
@supports (height: 100svh) {
  .login-body { min-height: 100svh; }
}

/* When the keyboard opens (focus inside), let the layout shift up a bit so fields aren't hidden */
@media (max-width: 600px) {
  .login-body:focus-within {
    align-items: flex-start !important;
    padding-top: 16px;
  }
}

/* On touch devices, there is no hover — always show the form content */
@media (hover: none) {
  .login-card .card-extra,
  .login-card .login-extra {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Reduce the dramatic hover transforms on touch to avoid jank */
  .login-card:hover { transform: none; box-shadow: 0 8px 32px rgba(0,0,0,0.20); }
  .login-card:hover::after { opacity: 0; transform: none; }
  .login-card:hover .login-logo { transform: none; margin-bottom: 10px; }
}

/* Slightly narrower on small phones, softer padding */
@media (max-width: 600px) {
  .login-card {
    max-width: 440px;
    padding: 28px 22px;
    border-radius: 14px;
  }

  .login-card .login-logo {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .tab-switch {
    gap: 8px;
  }

  .tab-btn {
    font-size: 16px;
    padding: 11px 0;
  }

  .login-card input,
  #reg-department {
    padding: 12px 14px;
    font-size: 16px; /* >=16px prevents iOS zoom on focus */
    margin-bottom: 14px;
  }

  .login-card button {
    padding: 12px;
    font-size: 16px;
  }

  .password-wrapper input {
    padding-right: 48px; /* keep space for eye icon */
  }

  .toggle-pass {
    right: 10px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
}

/* Stack the two tab buttons vertically on very narrow screens */
@media (max-width: 380px) {
  .tab-switch {
    flex-direction: column;
  }
  .tab-btn { flex: 1 1 auto; }
}

/* Improve background readability on small devices */
@media (max-width: 480px) {
  .login-body {
    background-attachment: scroll; /* avoid jitter when keyboard opens */
    background-position: center top;
  }
  .login-card {
    background: rgba(255,255,255,0.18);
  }
}

/* Forgot Password modal: full-screen sheet on phones */
@media (max-width: 600px) {
  #forgotPasswordModal > div {
    width: 100%;
    max-width: none;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
  }
  #forgotPasswordModal h3 { font-size: 18px; margin-bottom: 10px; }
  #forgotPasswordModal input { font-size: 16px; padding: 12px; }
  #forgotPasswordModal button { padding: 12px; font-size: 16px; }
}

/* Hide the native checkbox without breaking label click/focus */
.anim-check {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Visual checkbox box */
.anim-box{
  width: 20px;
  height: 20px;
  display: inline-block;
  position: relative;
  border: 2px solid #b8c9ff;
  border-radius: 4px;               /* square-ish checkbox */
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

/* center the check inside the 20×20 box */
.anim-box::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:8px;                 /* check “arm” size */
  height:12px;
  border-right:3px solid #fff;
  border-bottom:3px solid #fff;
  /* center, then rotate; scale(0) keeps it hidden until checked */
  transform: translate(-50%, -55%) rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform .22s ease-out .08s;
}

/* optional ripple when checking */
.anim-box::before{
  content:"";
  position:absolute; inset:-6px;
  border-radius:8px;
  background: radial-gradient(circle, rgba(65,199,114,.28) 0%, rgba(65,199,114,0) 70%);
  opacity:0; transform: scale(.2);
  transition: opacity .25s, transform .25s;
}

/* checked state */
.anim-check:checked + .anim-check-label .anim-box{
  background:#41c772;
  border-color:#41c772;
  transform: scale(1.02);
}
.anim-check:checked + .anim-check-label .anim-box::after{
  transform: translate(-50%, -55%) rotate(45deg) scale(1);
}
.anim-check:checked + .anim-check-label .anim-box::before{
  opacity:1; transform: scale(1.1);
}

/* focus ring for accessibility */
.anim-check:focus + .anim-check-label .anim-box{
  box-shadow: 0 0 0 3px rgba(106,164,255,.35);
}

/* keep text aligned to the right of the box */
.anim-check-label{ display:inline-flex; align-items:center; gap:10px; }

/* Incentive dot (animated pulse) */
.inc-dot {
  display:inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 50%;
  background: #21bb6f;
  position: relative;
  box-shadow: 0 0 0 0 rgba(33,187,111,0.7);   /* glow */
  animation: incPulse 2s ease-out infinite;
}

/* expanding ripple */
.inc-dot::after {
  content: "";
  position: absolute;
  inset: 0;                     /* start same size as the dot */
  border-radius: 50%;
  background: rgba(33,187,111,0.55);
  animation: incRipple 2s ease-out infinite;
}

/* Keyframes */
@keyframes incPulse {
  0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(33,187,111,0.7); }
  50%  { transform: scale(1.15); box-shadow: 0 0 8px 2px rgba(33,187,111,0.55); }
  100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(33,187,111,0.0); }
}

@keyframes incRipple {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(2.2); opacity: 0;   }
  100% { transform: scale(2.2); opacity: 0;   }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .inc-dot,
  .inc-dot::after {
    animation: none;
    box-shadow: none;
  }
}

/* avatar base */
.emp-photo-cell { text-align:center; }
.emp-avatar{
  display:inline-block;              /* helpful for some browsers */
  width:44px; height:44px;
  border-radius:50%;
  object-fit:cover;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  will-change: box-shadow;
}

/* pulse (always includes the base shadow) */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   var(--ring), 0 1px 2px rgba(0,0,0,.12); }
  60%  { box-shadow: 0 0 0 12px rgba(0,0,0,0), 0 1px 2px rgba(0,0,0,.12); }
  100% { box-shadow: 0 0 0 0   rgba(0,0,0,0), 0 1px 2px rgba(0,0,0,.12); }
}

/* gender rings + pulsing */
.emp-avatar.sex-male{
  --ring: rgba(0, 17, 255,.85);
  border-color:#0011ff;
  animation: pulse 3s ease-out infinite;
}
.emp-avatar.sex-female{
  --ring: rgba(255, 0, 255,.45);
  border-color:#ff00ff;
  animation: pulse 3s ease-out infinite;
}
.emp-avatar.sex-unk{
  --ring: rgba(203,213,224,.35);
  border-color:#b5b5b5;
  animation: pulse 3s ease-out infinite;
}



.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #1f2937;         /* subtle neutral bg */
  color: #fff;               /* icon color */
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .02s;
}

.icon-btn svg { pointer-events: none; }

.icon-btn:hover { background: #dae4f6; }
.icon-btn:active { transform: translateY(1px); }

/* Brand accents to match old blue/red buttons */
.icon-edit { color: #fff; }
.icon-edit:hover { background: #0b63ce; }

.icon-delete { color: #fff; }
.icon-delete:hover { background: #d02323; }

/* keep the tiny green incentive dot you already had */
.inc-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #2ecc71; display: inline-block;
}

/* fingerprint indicator keeps working */
.fp-indicator.has-fp img {
  width: 18px; height: 18px; vertical-align: middle; opacity: .9;
}
.face-indicator.has-face img {
  width: 18px; height: 18px; vertical-align: middle; opacity: .9;
}

/* Employment Status row */
.status-row{
  display: flex;
  align-items: flex-end;   /* bottom-align with the select */
  gap: 18px;
  margin-top: -6px;
  margin-bottom: 8px;
}

.status-col select{ width: 250px; }

/* Toggle group to the right of the select */
.status-toggle{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.status-toggle .switch{ margin: 0 6px; }
.status-toggle .label-active{ font-size: 15px; color: #21bb6f; }
.status-toggle .label-resigned{ font-size: 15px; color: #e16955; }

/* Optional: wrap on very small screens */
@media (max-width: 520px){
  .status-row{ flex-wrap: wrap; align-items: center; }
}

/* Date of Resignation: hidden by default */
#resignedDateContainer { display: none; }

/* When the form is in "resigned" state, show it */
.is-resigned #resignedDateContainer { display: block; }

/* Evaluation dot (amber pulse) */
.eval-dot{
  display:inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 50%;
  background:#ffb020;             /* amber */
  position: relative;
  box-shadow: 0 0 0 0 rgba(255,176,32,0.6);
  animation: evalPulse 2s ease-out infinite;
}
.eval-dot.overdue { background:#e24d4d; }  /* overdue = red */

@keyframes evalPulse {
  0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255,176,32,0.6); }
  50%  { transform: scale(1.15); box-shadow: 0 0 8px 2px rgba(255,176,32,0.45); }
  100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255,176,32,0.0); }
}

.actions-cell .eval-icon-wrap { display:inline-flex; align-items:center; margin-right:6px; }
.actions-cell .eval-icon { color:#ffb020; /* due (amber) */ }
.actions-cell .eval-icon.overdue { color:#e24d4d; /* overdue (red) */ }
.actions-cell .eval-icon { filter: drop-shadow(0 0 2px rgba(0,0,0,.08)); }
.actions-cell .eval-icon-wrap:hover .eval-icon { transform: translateY(-1px); }



/* Profile image chip + remove icon */
.avatar-wrap{
  position: relative;
  display: inline-block;
  margin-top: 6px;
  align-items: center;
}
.avatar-img{
  display: block;
  width: 70px; height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;           /* click to re-upload */
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  align-items: center;
}
.avatar-remove{
  position: absolute;
  top: -6px; right: -6px;
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 0;
  background: #e74c3c;       /* red pill */
  color: #fff;
  display: none;             /* shown when an image exists / hover */
  align-items: center; justify-content: center;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.avatar-wrap:hover .avatar-remove{ display: flex; }

/* Always show the icon on touch devices (no hover) */
@media (hover: none){
  .avatar-remove{ display: flex; }
}
/* Reset and restyle the floating remove button */
#profileImageContainer .avatar-remove{
  all: unset;                 /* wipe inherited .btn/.icon-btn styles */
  position: absolute;
  top: -6px; right: -6px;
  width: 22px; height: 22px;
  display: flex;              /* ensure the SVG lays out */
  align-items: center; justify-content: center;
  border-radius: 999px;
  background: #e74c3c !important;  /* red */
  color: #fff !important;           /* currentColor for the SVG stroke */
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 2;                 /* keep it above the image */
}

/* Keep the icon visible regardless of global svg rules */
#profileImageContainer .avatar-remove svg{
  width: 14px; height: 14px; display: block;
}
#profileImageContainer .avatar-remove svg path{
  stroke: #fff !important;
  fill: none;
}

/* Show on hover (desktop) */
#profileImageContainer .avatar-wrap:hover .avatar-remove{ display: flex; }

/* Always show on touch devices */
@media (hover: none){
  #profileImageContainer .avatar-remove{ display: flex; }
}

#profileImageContainer {
  grid-column: 1 / -1; 
  text-align: center;   /* centers label + contents */
}

#profileImageContainer .avatar-wrap {
  display: inline-block;
  margin-top: 6px;
}
#oncallInactiveWrap {
  margin-left: auto;         /* push to the right */
  display: flex;
  align-items: center;
}
#oncallInactiveWrap .inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===== History Panel (Employment Status History) ===== */
#statusHistoryWrap.history-panel{
  margin-top: 8px !important;
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(229,231,235,0.9);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

#statusHistoryWrap .history-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 10px;
}

#statusHistoryWrap .history-title{
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #6b7280;
}

/* Grid layout for inputs */
#statusHistoryWrap .history-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#statusHistoryWrap .history-field{
  grid-column: 1 / -1;
}

/* Put dates side-by-side on wider screens */
@media (min-width: 520px){
  #statusHistoryWrap .history-field:nth-child(3),
  #statusHistoryWrap .history-field:nth-child(4){
    grid-column: span 1;
  }
}

/* Controls override your global form styles */
#statusHistoryWrap .history-control{
  width: 100% !important;
  padding: 10px 12px !important;
  margin-top: 0 !important;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .06s ease;
}

#statusHistoryWrap .history-control:focus{
  border-color: #60aaff;
  box-shadow: 0 0 0 3px rgba(96,170,255,0.22);
}

/* Add button */
#statusHistoryWrap .history-actions{
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
}

#statusHistoryWrap .history-add-btn{
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background: linear-gradient(90deg, #00ffe7 0%, #60aaff 100%);
  color: #1f2937;
  box-shadow: 0 8px 18px rgba(96,170,255,0.18);
  transition: transform .08s ease, filter .18s ease, box-shadow .18s ease;
}

#statusHistoryWrap .history-add-btn:hover{
  filter: brightness(0.98);
  box-shadow: 0 10px 22px rgba(96,170,255,0.22);
}

#statusHistoryWrap .history-add-btn:active{
  transform: translateY(1px);
}

/* History list (timeline cards) */
#statusHistoryWrap .history-list{
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

/* If your JS uses these classes, this will apply immediately */
#statusHistoryWrap .status-history-item{
  margin: 0;
  padding: 10px 12px 9px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  position: relative;
}

/* Left accent bar */
#statusHistoryWrap .status-history-item::before{
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: #60aaff;
  opacity: 0.85;
}

/* Indent content to clear the accent bar */
#statusHistoryWrap .status-history-label,
#statusHistoryWrap .status-history-dates{
  padding-left: 10px;
  display:block;
}

#statusHistoryWrap .status-history-label{
  font-weight: 700;
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
}

#statusHistoryWrap .status-history-dates{
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}


/* =========================
   Employee Form 2025 (scoped)
   ========================= */
#employeeForm.form-2025{
  --bg: rgba(255,255,255,0.94);
  --panel: rgba(255,255,255,0.92);
  --border: rgba(229,231,235,0.95);
  --muted: #6b7280;
  --text: #111827;
  --focus: rgba(96,170,255,0.24);
  --focusBorder: #60aaff;
  --radius: 14px;
  --radiusSm: 12px;

  width: 100%;
  padding: 4px 2px 0;
}

/* Make the modal content look like a 2025 sheet (scoped to modal) */
.modal.show .modal-content:has(#employeeForm.form-2025),
.modal-content:has(#employeeForm.form-2025){
  border-radius: 16px;
  background: radial-gradient(circle at top left, #e0f2fe 0, #f9fafb 42%, #eef2ff 100%);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.26);
}

/* Grid spacing refinement */
#employeeForm.form-2025.modal-form{
  gap: 12px 12px; /* slightly airier */
}

/* Field containers */
#employeeForm.form-2025 > div:not(.section-label):not(.section-label-2025):not(.form-actions):not(#profileImageContainer):not(#statusHistoryWrap):not(#fingerprintSection){
  padding: 10px 12px 12px;
  border-radius: var(--radiusSm);
  background: var(--panel);
  border: 1px solid var(--border);
}

/* Labels */
#employeeForm.form-2025 label{
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Inputs/selects (scoped; overrides your global form styles) */
#employeeForm.form-2025 input[type="text"],
#employeeForm.form-2025 input[type="email"],
#employeeForm.form-2025 input[type="number"],
#employeeForm.form-2025 input[type="date"],
#employeeForm.form-2025 select{
  width: 100% !important;
  margin: 0 !important;
  padding: 11px 12px !important;
  border-radius: 12px;
  border: 1px solid rgba(209,213,219,0.95);
  background: rgba(255,255,255,0.96);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: border-color .18s ease, box-shadow .18s ease, transform .06s ease, background .18s ease;
}

/* Focus */
#employeeForm.form-2025 input:focus,
#employeeForm.form-2025 select:focus{
  border-color: var(--focusBorder);
  box-shadow: 0 0 0 4px var(--focus), 0 6px 14px rgba(15, 23, 42, 0.06);
  background: #fff;
}

/* Placeholder */
#employeeForm.form-2025 input::placeholder{
  color: #9ca3af;
  font-weight: 500;
}

/* Select arrow: cleaner */
#employeeForm.form-2025 select{
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 52%,
    calc(100% - 11px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px !important;
}

/* Full-width section headers */
#employeeForm.form-2025 .section-label,
#employeeForm.form-2025 .section-label-2025{
  grid-column: 1 / -1;
  margin: 14px 0 4px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(229,231,235,0.9);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f172a;
}

/* Confirmation message */
#employeeForm.form-2025 #confirmation{
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.20);
  color: #14532d !important;
}

/* Profile image area: make it card-like */
#employeeForm.form-2025 #profileImageContainer{
  grid-column: 1 / -1;
  padding: 12px 12px 10px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
}

/* Avatar preview bigger + modern */
#employeeForm.form-2025 .avatar-img{
  width: 84px;
  height: 84px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(229,231,235,0.8);
}

/* Status row card */
#employeeForm.form-2025 .status-row{
  padding: 12px 12px 10px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  margin-top: 6px;
  margin-bottom: 6px;
}

/* Resigned date card */
#employeeForm.form-2025 #resignedDateContainer{
  padding: 10px 12px 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
}

/* Incentive row: make it a neat chip row */
#employeeForm.form-2025 .incentive-row{
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(229,231,235,0.9);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Action bar: sticky-style footer inside modal */
#employeeForm.form-2025 .form-actions{
  position: sticky;
  bottom: -1px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(229,231,235,0.95);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
}

/* Primary submit */
#employeeForm.form-2025 #employeeActionButton{
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #00ffe7 0%, #60aaff 100%);
  color: #0f172a;
  box-shadow: 0 10px 22px rgba(96,170,255,0.18);
  transition: transform .08s ease, box-shadow .18s ease, filter .18s ease;
}
#employeeForm.form-2025 #employeeActionButton:hover{
  filter: brightness(0.99);
  box-shadow: 0 12px 26px rgba(96,170,255,0.22);
}
#employeeForm.form-2025 #employeeActionButton:active{ transform: translateY(1px); }

/* Delete button: modern destructive */
#employeeForm.form-2025 #deleteEmployeeBtn{
  border: 1px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.10);
  color: #991b1b;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  transition: background .18s ease, transform .08s ease, box-shadow .18s ease;
}
#employeeForm.form-2025 #deleteEmployeeBtn:hover{
  background: rgba(239,68,68,0.14);
  box-shadow: 0 10px 20px rgba(239,68,68,0.12);
}
#employeeForm.form-2025 #deleteEmployeeBtn:active{ transform: translateY(1px); }

/* On-call inactive checkbox area: align and compact */
#employeeForm.form-2025 #oncallInactiveWrap{
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
}
#employeeForm.form-2025 #oncallInactiveWrap .inline{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(229,231,235,0.95);
  background: rgba(255,255,255,0.70);
}

/* Mobile: single column, keep cards */
@media (max-width: 720px){
  #employeeForm.form-2025.modal-form{ grid-template-columns: 1fr; }
  #employeeForm.form-2025 .form-actions{ flex-wrap: wrap; gap: 10px; }
  #employeeForm.form-2025 #oncallInactiveWrap{ margin-left: 0; width: 100%; }
  #employeeForm.form-2025 #oncallInactiveWrap .inline{ width: 100%; justify-content: space-between; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  #employeeForm.form-2025 *{ transition: none !important; }
}

.incentive-start-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.incentive-start-row select {
  flex: 1;
  min-width: 180px;
}

/* Salary history refinements */
.history-subtitle{
  display:block;
  margin-top:2px;
  color:#666;
  font-size:12px;
  font-weight:500;
}

.field-hint{
  display:block;
  margin-bottom:6px;
  font-size:10px;
  color:#888;
}

.salary-grid{
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 900px){
  .salary-grid{
    grid-template-columns: 1fr 1fr;
  }
  .salary-grid .history-actions{
    grid-column: span 2;
  }
}

/* Salary history list rows */
#salaryHistory.history-list li{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid #eee;
  border-radius:10px;
  margin:8px 0;
  background:#fff;
}

#salaryHistory .sal-left{
  display:flex;
  flex-direction:column;
  gap:3px;
}

#salaryHistory .sal-date{
  font-weight:700;
  color:#222;
  font-size:13px;
}

#salaryHistory .sal-meta{
  color:#555;
  font-size:12px;
}

#salaryHistory .sal-right{
  text-align:right;
  min-width:220px;
}

#salaryHistory .sal-amount{
  font-weight:800;
  font-size:13px;
  color:#111;
}

#salaryHistory .sal-old{
  color:#777;
  font-size:12px;
}


/* Fingerprints + Face Capture row */
.bio-capture-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

@media (max-width: 720px){
  .bio-capture-row{
    grid-template-columns: 1fr;
  }
}

/* Card wrapper (matches your 2025 form feel) */
.bio-card{
  padding: 10px 12px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(229,231,235,0.95);
}

.face-cam-wrap{
  margin-top: 6px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.7);
  min-height: 380px;            /* enough to hold 340px frame + padding */
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  align-items: center;
}


/* Face media should ALWAYS use the same frame */
#faceVideo,
#facePreview{
  width: 340px;          /* fixed frame width */
  height: 340px;         /* fixed frame height (square) */
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  object-fit: cover;     /* keep same crop behavior */
  object-position: center; /* keep subject centered */
  display: block;
}

.face-hint{
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.face-actions{
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.face-actions button{
  padding: 10px 14px;
  font-size: 14px;
}
#faceDeleteBtn{
  width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 0;
}

/* Mirror selfie preview */
#faceVideo.mirror {
  transform: scaleX(-1);
}

/* === Biometric gallery + icon visibility fixes === */
.face-gallery{
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}
.face-thumb{
  position: relative;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.face-thumb img{
  width: 100%;
  height: 86px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.face-actions .bio-icon-btn,
#registeredFingerList .bio-icon-btn,
.face-thumb .bio-icon-btn{
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid #ef9a9a !important;
  border-radius: 8px;
  background: #fff !important;
  color: #b91c1c !important;
}
.face-actions .bio-icon-btn svg,
#registeredFingerList .bio-icon-btn svg,
.face-thumb .bio-icon-btn svg{
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor !important;
  fill: none;
}
.face-actions .bio-icon-btn:hover,
#registeredFingerList .bio-icon-btn:hover,
.face-thumb .bio-icon-btn:hover{
  background: #fff1f1 !important;
  border-color: #ef9a9a !important;
}
.face-thumb-delete{
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
}

/* Hide legacy global face delete (gallery is per-image delete now) */
#faceDeleteBtn{
  display: none !important;
}

/* === Darker topbar + sidebar === */
.topbar{
  background: #1f2937;
  border-bottom: 1px solid #334155;
  color: #e2e8f0;
}
.topbar .brand-name,
.topbar .user-name{
  color: #f8fafc;
}
.topbar .user-role{
  color: #cbd5e1;
}
.topbar .menu-btn,
.topbar .icon-btn,
.topbar .user{
  background: #273449;
  border-color: #3b4b64;
  color: #e2e8f0;
}
.topbar .icon-btn:hover,
.topbar .menu-btn:hover{
  background: #31415c;
  box-shadow: none;
}
.topbar .icon-btn .dot{
  border-color: #273449;
}

.sidebar{
  background: #111827;
  color: #dbe4ef;
  border-right: 1px solid #243145;
  box-shadow: 10px 0 30px rgba(2, 6, 23, 0.45);
}
.sidebar .sidebar-section-title{
  color: #7f90aa;
}
.sidebar-nav a,
.sidebar-nav li.has-children > .submenu-toggle{
  color: #d2dceb;
}
.sidebar-nav .sidebar-icon{
  color: #94a3b8;
}
.sidebar-nav a:hover,
.sidebar-nav li.has-children > .submenu-toggle:hover{
  background: #1f2a3d;
  border-color: #2f3f5b;
}
.sidebar-nav li.active > a,
.sidebar-nav li.active > .submenu-toggle{
  background: rgba(22, 119, 255, 0.22);
  border-color: #4f7ec2;
  color: #cfe3ff;
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.2);
}
.sidebar-nav li.active .sidebar-icon{
  color: #cfe3ff;
}
.sidebar-subnav a{
  color: #b8c7dd;
}
.sidebar-subnav li.active > a{
  background: #1f3559;
  border-color: #3f6ca6;
  color: #dbeafe;
}
.sidebar-footer{
  border-top: 1px dashed #2f3f5b;
}

/* =========================
   Modern Auth (index.php)
   ========================= */
body.login-body.modern-auth {
  min-height: 100vh;
  margin: 0;
  padding: clamp(16px, 3vw, 34px);
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  background: #ececf0;
  position: relative;
  overflow: hidden;
}

body.login-body.modern-auth #loginBg {
  display: none;
}

body.login-body.modern-auth .login-overlay {
  display: none;
}

body.login-body.modern-auth::before,
body.login-body.modern-auth::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #1f2937;
  z-index: 0;
}

body.login-body.modern-auth::before {
  width: 420px;
  height: 420px;
  top: -250px;
  left: -160px;
}

body.login-body.modern-auth::after {
  width: 360px;
  height: 360px;
  bottom: -235px;
  right: -110px;
  background: #111827;
}

body.login-body.modern-auth .auth-shell {
  position: relative;
  z-index: 2;
  width: min(1240px, 100%);
  display: grid;
  grid-template-columns: minmax(360px, 46%) minmax(440px, 54%);
  min-height: min(88vh, 690px);
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(18, 26, 43, 0.18);
}

body.login-body.modern-auth .auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: clamp(20px, 2.4vw, 34px);
}

body.login-body.modern-auth .login-card {
  width: 100%;
  max-width: 450px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: #25324a;
  transform: none !important;
  animation: none;
}

body.login-body.modern-auth .login-card::before,
body.login-body.modern-auth .login-card::after {
  content: none !important;
  display: none !important;
}


body.login-body.modern-auth .auth-welcome {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #8e97a8;
  text-align: center;
}

body.login-body.modern-auth .login-logo {
  display: flex;
  justify-content: center;
  margin: -10px 0 -6px;
  transition: none !important;
}

body.login-body.modern-auth .auth-mini-logo {
  width: min(320px, 92%);
  height: auto;
  object-fit: contain;
}

body.login-body.modern-auth .auth-helper {
  margin: 20px 0 20px;
  text-align: center;
  color: #95a0b3;
  font-size: 13px;
  line-height: 1.5;
}

body.login-body.modern-auth .login-logo,
body.login-body.modern-auth .login-logo *,
body.login-body.modern-auth .login-card:hover .login-logo,
body.login-body.modern-auth .login-card:focus-within .login-logo,
body.login-body.modern-auth .login-card:hover .login-logo *,
body.login-body.modern-auth .login-card:focus-within .login-logo * {
  filter: none !important;
  color: inherit !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

body.login-body.modern-auth .card-extra,
body.login-body.modern-auth .login-extra {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  height: auto !important;
  overflow: visible !important;
}

body.login-body.modern-auth .tab-switch {
  gap: 8px;
  margin-bottom: 16px;
}

body.login-body.modern-auth .tab-btn {
  border-radius: 10px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #e0e6ef;
  background: #f1f4f9;
  color: #45536f;
  box-shadow: none;
  letter-spacing: 0.02em;
}

body.login-body.modern-auth .tab-btn.active {
  border-color: #3f6ca6;
  color: #ffffff;
  background: linear-gradient(90deg, #1f2f49 0%, #273b59 100%);
  box-shadow: 0 9px 20px rgba(31, 47, 73, 0.34);
}

body.login-body.modern-auth .login-card input,
body.login-body.modern-auth #reg-department {
  width: 100%;
  margin-bottom: 12px;
  border-radius: 999px;
  border: 1px solid #dbe2ec;
  padding: 11px 42px 11px 16px;
  background: #ffffff;
  color: #22314e;
  font-size: 14px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.login-body.modern-auth #reg-department {
  border-radius: 12px;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2392A0B6' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px 8px;
}

body.login-body.modern-auth .login-card input::placeholder {
  color: #9ba8bc;
}

body.login-body.modern-auth .login-card input:focus,
body.login-body.modern-auth #reg-department:focus {
  border-color: #3f6ca6;
  box-shadow: 0 0 0 3px rgba(63, 108, 166, 0.19);
  background: #ffffff;
}

body.login-body.modern-auth .password-wrapper {
  margin-bottom: 12px;
}

body.login-body.modern-auth .password-wrapper input {
  margin-bottom: 0;
}

body.login-body.modern-auth .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

body.login-body.modern-auth .form-row .form-col input,
body.login-body.modern-auth .form-row .form-col .password-wrapper {
  margin-bottom: 0;
}

body.login-body.modern-auth .toggle-pass {
  color: #a3afc2;
  font-size: 15px;
  right: 14px;
}

body.login-body.modern-auth .login-card button {
  width: 100%;
  margin-top: 2px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f2f49 0%, #273b59 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(31, 47, 73, 0.33);
}

body.login-body.modern-auth .login-card button:hover,
body.login-body.modern-auth .login-card button:focus {
  background: linear-gradient(90deg, #243a5b 0%, #2c466d 100%);
  box-shadow: 0 13px 23px rgba(31, 47, 73, 0.36);
  transform: translateY(-1px);
}

body.login-body.modern-auth .auth-links-row {
  margin-top: 12px;
  text-align: right;
}

body.login-body.modern-auth .auth-forgot-link {
  color: #8c98aa;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

body.login-body.modern-auth .auth-forgot-link:hover {
  color: #2a5f9f;
  text-decoration: underline;
}

body.login-body.modern-auth .social-auth {
  margin-top: 16px;
  text-align: center;
}

body.login-body.modern-auth .social-label {
  display: inline-block;
  margin-bottom: 10px;
  color: #9ca8ba;
  font-size: 12px;
  font-weight: 600;
}

body.login-body.modern-auth .social-list {
  display: flex;
  justify-content: center;
  gap: 10px;
}

body.login-body.modern-auth .social-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #e2e7f0;
  background: #ffffff;
  color: #8f9bb0;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.login-body.modern-auth .login-subtitle {
  margin: 0 0 10px;
  text-align: center;
  color: #7a879b;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.login-body.modern-auth .login-error {
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid rgba(220, 53, 69, 0.32);
  background: #ffe8eb;
  color: #b72135;
  box-shadow: none;
  font-size: 13px;
}

body.login-body.modern-auth .auth-brand-panel {
  position: relative;
  background:
    linear-gradient(160deg, rgba(17, 24, 39, 0.86), rgba(31, 41, 55, 0.90)),
    url("../images/SRI01029-HDR.jpg") center center / cover no-repeat;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: clamp(20px, 3vw, 36px);
}

body.login-body.modern-auth .auth-brand-overlay {
  width: min(480px, 100%);
  text-align: center;
  color: #eef4ff;
}

body.login-body.modern-auth .auth-brand-logo {
  width: min(290px);
  height: auto;
  margin: -10px auto -6px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

body.login-body.modern-auth .auth-brand-title {
  display: none;
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

body.login-body.modern-auth .auth-brand-subtitle {
  margin: 8px 0 0;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.6;
  color: rgba(226, 236, 255, 0.92);
}

@media (max-width: 1024px) {
  body.login-body.modern-auth .auth-shell {
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    min-height: 620px;
  }

  body.login-body.modern-auth .auth-form-panel {
    padding: 20px 16px;
  }
}

@media (max-width: 860px) {
  body.login-body.modern-auth {
    padding: 12px;
  }

  body.login-body.modern-auth::before {
    width: 280px;
    height: 280px;
    top: -180px;
    left: -120px;
  }

  body.login-body.modern-auth::after {
    width: 220px;
    height: 220px;
    bottom: -140px;
    right: -80px;
  }

  body.login-body.modern-auth .auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    max-width: 560px;
  }

  body.login-body.modern-auth .auth-brand-panel {
    display: none;
  }

  body.login-body.modern-auth .auth-form-panel {
    padding: 18px 16px 20px;
  }

  body.login-body.modern-auth .auth-brand-logo {
    width: min(220px, 80%);
    margin: -8px auto -6px;
  }

  body.login-body.modern-auth .auth-brand-title {
    font-size: 28px;
  }

  body.login-body.modern-auth .login-logo {
    margin: -8px 0 -6px;
  }

  body.login-body.modern-auth .social-auth {
    display: none;
  }

  body.login-body.modern-auth .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }
}
