:root {
  --primary: #0f62fe;
  --primary-hover: #0353e9;
  --primary-subtle: #edf5ff;
  --primary-light: #d0e2ff;
  --success: #198038;
  --success-subtle: #defbe6;
  --warning: #f1c21b;
  --warning-subtle: #fef7db;
  --danger: #da1e28;
  --danger-subtle: #fff1f1;
  --neutral-100: #f4f7fb;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  --white: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(15,23,42,0.08);
  --shadow-lg: 0 12px 28px rgba(15,23,42,0.12);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   APP SHELL & LEFT VERTICAL SIDEBAR (Matching Image 2)
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.app-sidebar {
  width: 68px;
  min-width: 68px;
  background-color: #1e293b; /* Dark Navy Slate matching Image 2 */
  border-right: 1px solid #334155;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 150;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.app-sidebar.expanded {
  width: 230px;
  min-width: 230px;
}

/* Sidebar Top */
.sidebar-top {
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #334155;
  min-height: 64px;
}

.sidebar-brand-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f62fe 0%, #0043ce 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 10px rgba(15, 98, 254, 0.35);
  margin: 0 auto;
}

.app-sidebar.expanded .sidebar-brand-icon {
  margin: 0;
}

.sidebar-brand-text {
  display: none;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.app-sidebar.expanded .sidebar-brand-text {
  display: flex;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.sidebar-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* Sidebar Nav Items */
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  outline: none;
}

.sidebar-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: inherit;
}

.sidebar-label {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
}

.app-sidebar.expanded .sidebar-item {
  width: calc(100% - 16px);
  height: 44px;
  margin: 0 8px;
  padding: 0 14px;
  justify-content: flex-start;
  gap: 12px;
}

.app-sidebar.expanded .sidebar-label {
  display: inline-block;
}

/* Hover & Active States */
.sidebar-item:hover {
  background-color: #334155;
  color: #ffffff;
}

.sidebar-item.active {
  background-color: #0f62fe;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 98, 254, 0.4);
}

.app-sidebar:not(.expanded) .sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background-color: #60a5fa;
}

/* Floating Tooltip in Collapsed Mode (Exact match to Image 2) */
.sidebar-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background-color: #0f172a;
  border: 1px solid #475569;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  z-index: 9999;
}

.sidebar-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  margin-top: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: transparent #475569 transparent transparent;
}

.app-sidebar:not(.expanded) .sidebar-item:hover .sidebar-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.app-sidebar.expanded .sidebar-tooltip {
  display: none !important;
}

/* Sidebar Bottom */
.sidebar-bottom {
  padding: 14px 0;
  border-top: 1px solid #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sidebar-collapse-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
}

.sidebar-collapse-btn:hover {
  background-color: #334155;
  color: #ffffff;
}

.app-sidebar.expanded .collapse-icon {
  transform: rotate(180deg);
}

/* Main Wrapper Layout */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--neutral-100);
}

/* Header */
.app-header {
  height: 64px;
  background-color: var(--white);
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--neutral-900);
  line-height: 1.2;
}

.brand-text p {
  font-size: 11px;
  color: var(--neutral-500);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background-color: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  color: var(--neutral-700);
  transition: var(--transition);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--neutral-400);
}

.status-pill.connected {
  background-color: var(--success-subtle);
  border-color: #a7f0ba;
  color: var(--success);
}
.status-pill.connected .status-dot {
  background-color: var(--success);
  box-shadow: 0 0 0 3px rgba(25, 128, 56, 0.2);
}

.btn-icon {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-700);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-icon:hover {
  background-color: var(--neutral-100);
  border-color: var(--neutral-300);
  color: var(--neutral-900);
}

/* Main Layout */
.app-container {
  max-width: 1440px;
  width: 100%;
  margin: 20px auto;
  padding: 0 24px;
  flex: 1;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

.page-intro {
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--neutral-900);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--neutral-500);
  margin-top: 4px;
}

/* Info Banner */
.info-banner {
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--neutral-800);
}

.info-banner strong {
  color: #0043ce;
}

/* Environment Status Badges & Switcher */
.env-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.env-status-test {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.env-status-live {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.env-switcher-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.env-switcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.env-switcher-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.env-active-indicator {
  font-size: 11px;
  font-weight: 700;
  color: #0f62fe;
}

.env-toggle-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.env-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background-color: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.env-tab-btn:hover {
  border-color: #94a3b8;
}

.env-tab-btn.active {
  border-color: #0f62fe;
  background-color: #edf5ff;
  box-shadow: 0 0 0 1px #0f62fe;
}

.env-tab-icon {
  font-size: 20px;
}

.env-tab-info {
  display: flex;
  flex-direction: column;
}

.env-tab-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.env-tab-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.env-active-checkbox-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.env-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.env-notice-box {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12px;
  color: #1e40af;
  margin-bottom: 18px;
  line-height: 1.5;
}

.env-notice-box strong {
  display: block;
  margin-bottom: 4px;
  color: #1e3a8a;
}

.env-notice-box ul {
  margin: 4px 0 0 18px;
  padding: 0;
}

.env-notice-box li {
  margin-bottom: 3px;
}

/* Grid Layout */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

/* Card Styles */
.card {
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--neutral-200);
}

.card-step {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-subtle);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-900);
}

.card-desc {
  font-size: 12px;
  color: var(--neutral-500);
}

/* Form Controls */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control {
  width: 100%;
  height: 44px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 14px;
  color: var(--neutral-900);
  background-color: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-hint {
  font-size: 11px;
  color: var(--neutral-500);
  margin-top: 5px;
}

/* Quick Date Chips */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip-btn {
  background-color: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--neutral-600);
  cursor: pointer;
  transition: var(--transition);
}

.chip-btn:hover {
  background-color: var(--primary-subtle);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* Employee Profile Box */
.employee-box {
  background-color: #fafbfc;
  border: 1px dashed var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 14px;
}

.employee-card-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--neutral-500);
  font-size: 13px;
}

.emp-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.emp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0043ce 0%, #001d6c 100%);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.emp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.emp-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-900);
}

.emp-info p {
  font-size: 12px;
  color: var(--neutral-500);
}

.emp-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
  background-color: var(--success-subtle);
  color: var(--success);
}

.emp-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--neutral-200);
}

.meta-item .meta-label {
  font-size: 11px;
  color: var(--neutral-500);
  margin-bottom: 2px;
}

.meta-item .meta-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800);
  word-break: break-all;
}

.schedule-badge {
  display: inline-block;
  background-color: var(--primary-subtle);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: monospace;
}

/* Diff */
.diff-container {
  background-color: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 18px 0;
  font-size: 12px;
}

.diff-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--neutral-500);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.diff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.diff-arrow {
  color: var(--neutral-400);
  font-weight: 700;
}

.btn-primary {
  width: 100%;
  height: 48px;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(15, 98, 254, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.alert-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: none;
  animation: fadeIn 0.2s ease-in;
}

.alert-success {
  background-color: var(--success-subtle);
  border: 1px solid #a7f0ba;
  color: #0e6027;
}

.alert-error {
  background-color: var(--danger-subtle);
  border: 1px solid #ffd7d9;
  color: #a2191f;
}

/* Audit Log Table */
.audit-section {
  margin-top: 28px;
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 14px;
}

.audit-table th {
  text-align: left;
  padding: 10px 14px;
  background-color: var(--neutral-100);
  color: var(--neutral-600);
  font-weight: 600;
  border-bottom: 1px solid var(--neutral-200);
}

.audit-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--neutral-200);
  color: var(--neutral-800);
}

.audit-empty {
  text-align: center;
  color: var(--neutral-500);
  padding: 20px;
}

/* ==================================================== */
/* TIMESHEET VIEW (MATCHING USER PDF FORMAT)           */
/* ==================================================== */

.timesheet-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ts-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ts-search-input {
  width: 200px;
  height: 40px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 13px;
}

.ts-sheet-paper {
  background-color: var(--white);
  border: 1px solid var(--neutral-300);
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

/* Dark top bar matching PDF */
.ts-header-bar {
  background-color: #1e293b;
  color: var(--white);
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ts-banner-main-title {
  font-weight: 700;
  color: #ffffff;
  display: inline-block;
}

.ts-header-branding {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.5px;
  margin-left: auto;
  white-space: nowrap;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0.95;
}

/* Employee Details Section matching PDF */
.ts-emp-header {
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1.3fr 1.1fr 1fr;
  gap: 20px;
  border-bottom: 1px solid #e2e8f0;
  background-color: #fafbfc;
}

.ts-emp-left {
  display: flex;
  gap: 14px;
  align-items: center;
}

.ts-emp-avatar {
  width: 60px;
  height: 70px;
  border-radius: 5px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.ts-emp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ts-emp-avatar svg {
  width: 40px;
  height: 40px;
  color: #3b82f6;
}

.ts-emp-meta .ts-emp-id {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.ts-emp-meta .ts-emp-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.2px;
  margin: 1px 0;
}

.ts-emp-meta .ts-emp-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.3px;
}

.ts-emp-meta .ts-emp-contact {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.ts-role-col h4,
.ts-shift-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}

.ts-role-col p,
.ts-shift-col p {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.4;
  margin: 0;
  word-break: break-word;
}

#tsEmpShift {
  font-weight: 600;
  color: #1e293b;
}

/* Timesheet Table */
.ts-table-wrapper {
  overflow-x: auto;
}

.ts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: center;
  table-layout: fixed;
}

#viewTimesheet .ts-table th:nth-child(1), #viewTimesheet .ts-table td:nth-child(1) { width: 18%; }
#viewTimesheet .ts-table th:nth-child(2), #viewTimesheet .ts-table td:nth-child(2) { width: 13%; }
#viewTimesheet .ts-table th:nth-child(3), #viewTimesheet .ts-table td:nth-child(3) { width: 15%; }
#viewTimesheet .ts-table th:nth-child(4), #viewTimesheet .ts-table td:nth-child(4) { width: 15%; }
#viewTimesheet .ts-table th:nth-child(5), #viewTimesheet .ts-table td:nth-child(5) { width: 13%; }
#viewTimesheet .ts-table th:nth-child(6), #viewTimesheet .ts-table td:nth-child(6) { width: 13%; }
#viewTimesheet .ts-table th:nth-child(7), #viewTimesheet .ts-table td:nth-child(7) { width: 13%; }

.ts-table thead th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  white-space: nowrap;
}

.ts-table tbody td {
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 12px;
  height: 28px;
  vertical-align: middle;
  line-height: 1.25;
}

.ts-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.ts-table tbody tr:hover {
  background-color: #f1f5f9;
}

/* Date column */
.ts-date-col {
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Status Badges */
.ts-badge {
  display: inline-block;
  padding: 2.5px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.ts-badge-off {
  background-color: #64748b;
  color: var(--white);
}

.ts-badge-present {
  background-color: #22c55e;
  color: var(--white);
}

.ts-badge-today {
  background-color: #0ea5e9;
  color: var(--white);
}

.ts-badge-absent {
  background-color: #ef4444;
  color: var(--white);
}

.ts-badge-leave {
  background-color: #f59e0b;
  color: var(--white);
}

/* Punch time formatting in coral/red like PDF */
.ts-punch {
  color: #dc2626;
  font-weight: 600;
  letter-spacing: 0.1px;
  font-size: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ts-hours {
  font-weight: 700;
  color: #0f172a;
  font-size: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Table Footer Row */
.ts-table tfoot td {
  background-color: #f8fafc;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  font-weight: 700;
  font-size: 12.5px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ts-total-label {
  text-align: right;
  padding-right: 16px !important;
  color: #0f172a;
}

.ts-total-value {
  color: #0f172a;
  font-weight: 800;
  font-size: 13.5px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  background-color: var(--neutral-100);
  border-top: 1px solid var(--neutral-200);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.test-result-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  display: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Department Worksheet Styles */
.dept-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.dept-kpi-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.dept-kpi-label {
  font-size: 11.5px;
  color: var(--neutral-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.dept-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--neutral-900);
}

.dept-kpi-val.kpi-green { color: #198038; }
.dept-kpi-val.kpi-gray { color: #4b5563; }
.dept-kpi-val.kpi-blue { color: #0f62fe; }

.dept-avatar-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  display: block;
  margin: 0 auto;
}

.dept-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  color: #94a3b8;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
}

.dept-emp-cell {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.dept-emp-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 12.5px;
}

.dept-emp-title {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.leaves-mol-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 2px;
  width: fit-content;
  line-height: 1.2;
}

.leaves-mol-lbl {
  color: #64748b;
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: 0.2px;
}

.dept-schedule-code {
  font-family: monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  word-break: break-all;
}

.dept-sheet-paper .ts-table-wrapper {
  overflow: visible;
}

/* Department Attendance Worksheet Table */
.dept-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: center;
  table-layout: auto;
  background-color: #ffffff;
}

.dept-table thead th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 6px 4px;
  border: 1px solid #e2e8f0;
  font-size: 11.5px;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
}

.dept-table tbody td {
  padding: 6px 6px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 12px;
  vertical-align: middle;
  line-height: 1.25;
}

.dept-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.dept-table tbody tr:hover {
  background-color: #f1f5f9;
}

.dept-table tfoot td {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  background-color: #f1f5f9;
  font-weight: 700;
}

/* Department Table Column Widths (Screen) */
.dept-table .col-dept-photo          { width: 44px; text-align: center; }
.dept-table .col-dept-id             { width: 75px; text-align: center; }
.dept-table .col-dept-name           { min-width: 175px; text-align: left; }
.dept-table .col-dept-sched          { width: 165px; text-align: left; }
.dept-table .col-dept-status         { width: 85px; text-align: center; }
.dept-table .col-dept-punch          { width: 90px; text-align: center; }
.dept-table .col-dept-day-hrs        { width: 90px; text-align: center; }
.dept-table .col-dept-month-hrs      { width: 95px; text-align: center; }

/* Range Mode Specific Column Widths (Screen) */
.dept-table .col-dept-shift-type     { width: 85px; text-align: center; }
.dept-table .col-dept-days-worked    { width: 95px; text-align: center; }
.dept-table .col-dept-days-off       { width: 85px; text-align: center; }
.dept-table .col-dept-period-hrs     { width: 85px; text-align: center; }
.dept-table .col-dept-holiday-hrs    { width: 85px; text-align: center; }
.dept-table .col-dept-required-hrs   { width: 90px; text-align: center; }
.dept-table .col-dept-timesheet-hrs  { width: 95px; text-align: center; }
.dept-table .col-dept-total-hrs      { width: 95px; text-align: center; }
.dept-table .col-dept-short-hrs      { width: 85px; text-align: center; }
.dept-table .col-dept-action         { width: 70px; text-align: center; }

/* Mode Toggles */
.only-in-range {
  display: none !important;
}

.only-in-single-day {
  display: table-cell !important;
}

.dept-range-mode .only-in-single-day {
  display: none !important;
}

.dept-range-mode .only-in-range {
  display: table-cell !important;
}

/* Hide Department Period Total footer in Range Mode per user request */
.dept-range-mode tfoot {
  display: none !important;
}

/* Department Month Hours Highlighting */
.dept-month-hours-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.dept-month-hours-val {
  font-weight: 800;
  font-size: 12px;
  color: #7c3aed;
  font-family: inherit;
  background-color: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 1.5px 6px;
  border-radius: 4px;
  display: inline-block;
}

.dept-month-hours-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

/* Action Dropdown Menu matching Image 1 */
.dept-action-menu-wrap {
  position: relative;
  display: inline-block;
}

.dept-gear-dropdown-btn {
  background-color: #00a88f; /* Teal color matching Image 1 */
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  outline: none;
}

.dept-gear-dropdown-btn:hover {
  background-color: #008f7a;
  box-shadow: 0 2px 6px rgba(0, 168, 143, 0.35);
  transform: translateY(-1px);
}

.dept-gear-dropdown-btn:active {
  transform: translateY(0);
}

.dept-gear-icon {
  width: 14px;
  height: 14px;
}

.dept-caret-icon {
  width: 9px;
  height: 9px;
  transition: transform 0.15s ease;
}

.dept-action-menu-wrap.open .dept-caret-icon {
  transform: rotate(180deg);
}

/* Dropdown Menu Popover */
.dept-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  min-width: 210px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 6px;
  z-index: 1000;
  text-align: left;
  animation: deptMenuFadeIn 0.15s ease;
}

.dept-dropdown-menu.dropup {
  top: auto;
  bottom: calc(100% + 5px);
}

.dept-dropdown-menu.show {
  display: block;
}

@keyframes deptMenuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dept-dropdown-item {
  width: 100%;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: left;
  white-space: nowrap;
}

.dept-dropdown-item:hover {
  background-color: #f1f5f9;
  color: #0f62fe;
}

.dept-dropdown-item svg {
  width: 15px;
  height: 15px;
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.dept-dropdown-item:hover svg {
  color: #0f62fe;
}

.dept-dropdown-divider {
  height: 1px;
  background-color: #e2e8f0;
  margin: 4px 0;
}

.month-hours-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.month-hours-val {
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  font-family: monospace;
}

.month-hours-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}

footer {
  text-align: center;
  color: var(--neutral-500);
  font-size: 12px;
  padding: 24px 20px;
  border-top: 1px solid var(--neutral-200);
  background-color: var(--white);
  margin-top: auto;
}

/* Print Styling - Beautifully proportioned to fill an A4 Page properly */
@page {
  size: A4 portrait;
  margin: 6mm 8mm 15mm 8mm;

  @bottom-left {
    content: "Printed on: Live SAP • PeopleHub By Spine";
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 7.5pt;
    font-weight: 500;
    color: #64748b;
    vertical-align: top;
    padding-top: 3mm;
  }

  @bottom-right {
    content: counter(page) " / " counter(pages);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 7.5pt;
    font-weight: 600;
    color: #64748b;
    vertical-align: top;
    padding-top: 3mm;
  }
}

@page dept_landscape {
  size: A4 landscape;
  margin: 6mm 8mm 15mm 8mm;

  @bottom-left {
    content: "Printed on: Live SAP • PeopleHub By Spine";
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 7.5pt;
    font-weight: 500;
    color: #64748b;
    vertical-align: top;
    padding-top: 3mm;
  }

  @bottom-right {
    content: counter(page) " / " counter(pages);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 7.5pt;
    font-weight: 600;
    color: #64748b;
    vertical-align: top;
    padding-top: 3mm;
  }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #ffffff !important;
    font-size: 9pt !important;
    line-height: 1.2 !important;
    overflow: visible !important;
  }

  /* Universal Print Rule: Remove background colors from ALL badges, pills, and tags */
  .ts-badge,
  .ts-badge-present,
  .ts-badge-absent,
  .ts-badge-off,
  .ts-badge-today,
  .ts-badge-leave,
  .badge,
  .badge-success,
  .badge-error,
  .badge-warning,
  .badge-info,
  .schedule-badge,
  .emp-status-badge,
  .slip-badge-empid,
  .wf-type-pill,
  .wf-stage-pill,
  .wf-approver-tag,
  .wf-badge-newhire,
  .badge-new-hire,
  .leave-status-approved,
  .leave-status-pending,
  .leave-status-rejected,
  .leave-status-cancelled,
  .leave-status-default,
  .badge-approved,
  .badge-leave-annual,
  .badge-leave-sick,
  .badge-leave-unpaid,
  .badge-leave-short,
  .badge-leave-maternity,
  .badge-leave-default,
  .leaves-mol-badge,
  .wf-age-pill,
  .ts-missing-punch,
  [class*="type-"],
  [class*="stage-pill-"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .app-sidebar,
  .app-header,
  .nav-tabs,
  .info-banner,
  .timesheet-controls-bar,
  .dept-kpi-bar,
  footer,
  .btn-icon,
  .modal-overlay,
  .hide-on-print,
  #viewSchedule {
    display: none !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  .view-section:not(.active) {
    display: none !important;
  }

  .app-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #viewTimesheet.active,
  #viewDeptWorksheet.active,
  #viewWorkflows.active,
  #viewLeaves.active {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ts-sheet-paper {
    border: 1px solid #64748b !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.printing-dept-worksheet,
  #viewDeptWorksheet {
    page: dept_landscape;
  }

  .dept-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 8pt !important;
    table-layout: fixed !important;
    display: table !important;
  }

  .dept-table thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    padding: 4px 2px !important;
    font-size: 7.8pt !important;
    font-weight: 700 !important;
    border: 1px solid #94a3b8 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: normal !important;
    vertical-align: middle !important;
  }

  .dept-table tbody tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    height: 28px !important;
  }

  .dept-table tbody td {
    padding: 3px 3px !important;
    font-size: 8pt !important;
    line-height: 1.15 !important;
    border: 1px solid #cbd5e1 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
  }

  .dept-table tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
  }

  /* 11 Columns in Print for Single Day Mode (sum = 100%) */
  .dept-table .col-dept-photo          { width: 5.5% !important; text-align: center !important; vertical-align: middle !important; padding: 2px !important; }
  .dept-table .col-dept-id             { width: 6.5% !important; text-align: center !important; }
  .dept-table .col-dept-name           { width: 17% !important; text-align: left !important; }
  .dept-table .col-dept-sched          { width: 15% !important; text-align: left !important; }
  .dept-table .col-dept-status         { width: 6% !important; text-align: center !important; }
  .dept-table .col-dept-punch          { width: 8% !important; text-align: center !important; } /* 4 punches * 8% = 32% */
  .dept-table .col-dept-day-hrs        { width: 9% !important; text-align: center !important; }
  .dept-table .col-dept-month-hrs      { width: 9% !important; text-align: center !important; }
  .dept-table .col-dept-action         { display: none !important; }

  /* 13 Columns in Print for Date Range Mode (sum = 100%):
     Photo: 4%, ID: 5.5%, Name: 16%, Sched: 12.5%, Shift Type: 6.5%, Days Worked: 7.5%, Days Off: 6.5%,
     Period Hours: 7%, Holiday Hours: 7%, Required Hours: 7%, Timesheet Hours: 7%, Total Hours: 7%, Short Hours: 6.5%
  */
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-photo          { width: 4% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-id             { width: 5.5% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-name           { width: 16% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-sched          { width: 12.5% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-shift-type     { width: 6.5% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-days-worked    { width: 7.5% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-days-off       { width: 6.5% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-period-hrs     { width: 7% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-holiday-hrs    { width: 7% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-required-hrs   { width: 7% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-timesheet-hrs  { width: 7% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-total-hrs      { width: 7% !important; }
  .dept-sheet-paper.dept-range-mode .dept-table .col-dept-short-hrs      { width: 6.5% !important; }

  /* Uniform typography matching Shift Type across all cells in Date Range Print */
  .dept-sheet-paper.dept-range-mode .dept-table tbody td,
  .dept-sheet-paper.dept-range-mode .dept-table tbody td span,
  .dept-sheet-paper.dept-range-mode .dept-table .dept-month-hours-wrap,
  .dept-sheet-paper.dept-range-mode .dept-table .dept-month-hours-val,
  .dept-sheet-paper.dept-range-mode .dept-table .ts-hours,
  .dept-sheet-paper.dept-range-mode .dept-table .ts-punch {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 7.5pt !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-align: center !important;
  }

  .dept-sheet-paper.dept-range-mode .dept-table tbody td.col-dept-name,
  .dept-sheet-paper.dept-range-mode .dept-table tbody td.col-dept-name span,
  .dept-sheet-paper.dept-range-mode .dept-table tbody td.col-dept-sched,
  .dept-sheet-paper.dept-range-mode .dept-table tbody td.col-dept-sched span {
    text-align: left !important;
  }

  .dept-table .dept-avatar-thumb {
    width: 24px !important;
    height: 24px !important;
    border-radius: 3px !important;
    display: inline-block !important;
    margin: 0 auto !important;
    vertical-align: middle !important;
    border: 1px solid #cbd5e1 !important;
    box-sizing: border-box !important;
  }

  .dept-table .dept-emp-cell {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    overflow: hidden !important;
  }

  .dept-table .dept-emp-name {
    font-size: 8pt !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.15 !important;
  }

  .dept-table .dept-emp-title {
    font-size: 7pt !important;
    color: #64748b !important;
    line-height: 1.1 !important;
  }

  .dept-table .dept-schedule-code {
    font-size: 7pt !important;
    color: #1e293b !important;
    word-break: break-all !important;
    display: block !important;
    line-height: 1.1 !important;
  }

  .dept-table .dept-month-hours-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .dept-table .dept-month-hours-val {
    font-size: 8.5pt !important;
    font-weight: 800 !important;
    color: #6b21a8 !important;
    font-family: inherit !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  .dept-table .dept-month-hours-sub {
    font-size: 6.8pt !important;
    color: #64748b !important;
  }

  .dept-table tfoot td {
    padding: 4px 6px !important;
    font-size: 8pt !important;
    font-weight: 700 !important;
    border: 1px solid #94a3b8 !important;
    background-color: #f1f5f9 !important;
  }

  .ts-header-bar {
    padding: 6px 14px !important;
    font-size: 11pt !important;
    font-weight: 700 !important;
    background-color: #1e293b !important;
    color: #ffffff !important;
    height: auto !important;
    min-height: 28px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    letter-spacing: 0.3px !important;
    box-sizing: border-box !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .ts-banner-main-title {
    font-size: 10pt !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    display: inline-block !important;
  }

  .ts-header-branding {
    font-size: 8.5pt !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: 0.4px !important;
    margin-left: auto !important;
    white-space: nowrap !important;
    display: inline-block !important;
    opacity: 1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .ts-emp-header {
    padding: 8px 12px !important;
    gap: 14px !important;
    grid-template-columns: 1.35fr 1.15fr 1fr !important;
    background-color: #f8fafc !important;
    border-bottom: 1px solid #94a3b8 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-emp-left {
    gap: 10px !important;
    align-items: center !important;
  }

  .ts-emp-avatar {
    width: 48px !important;
    height: 56px !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
  }

  .ts-emp-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .ts-emp-avatar svg {
    width: 30px !important;
    height: 30px !important;
  }

  .ts-emp-meta .ts-emp-id {
    font-size: 8.5pt !important;
    line-height: 1.1 !important;
    color: #64748b !important;
    font-weight: 600 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-emp-meta .ts-emp-name {
    font-size: 10.5pt !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 1px 0 !important;
    color: #0f172a !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-emp-meta .ts-emp-title {
    font-size: 8pt !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    color: #334155 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-emp-meta .ts-emp-contact {
    font-size: 7.5pt !important;
    line-height: 1.2 !important;
    margin-top: 1px !important;
    color: #64748b !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-role-col h4,
  .ts-shift-col h4 {
    font-size: 8.5pt !important;
    font-weight: 700 !important;
    margin-bottom: 2px !important;
    line-height: 1.1 !important;
    color: #0f172a !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-role-col p,
  .ts-shift-col p {
    font-size: 7.8pt !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    color: #334155 !important;
    word-break: break-word !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  #tsEmpShift {
    font-weight: 600 !important;
    color: #0f172a !important;
    font-size: 8pt !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-table-wrapper {
    overflow: visible !important;
  }

  /* Exact font, sizing and row height matching Department Attendance Worksheet */
  .ts-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 8pt !important;
    table-layout: fixed !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  #viewTimesheet .ts-table th:nth-child(1), #viewTimesheet .ts-table td:nth-child(1) { width: 18% !important; }
  #viewTimesheet .ts-table th:nth-child(2), #viewTimesheet .ts-table td:nth-child(2) { width: 13% !important; }
  #viewTimesheet .ts-table th:nth-child(3), #viewTimesheet .ts-table td:nth-child(3) { width: 15% !important; }
  #viewTimesheet .ts-table th:nth-child(4), #viewTimesheet .ts-table td:nth-child(4) { width: 15% !important; }
  #viewTimesheet .ts-table th:nth-child(5), #viewTimesheet .ts-table td:nth-child(5) { width: 13% !important; }
  #viewTimesheet .ts-table th:nth-child(6), #viewTimesheet .ts-table td:nth-child(6) { width: 13% !important; }
  #viewTimesheet .ts-table th:nth-child(7), #viewTimesheet .ts-table td:nth-child(7) { width: 13% !important; }

  .ts-table thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    padding: 4px 3px !important;
    font-size: 7.8pt !important;
    font-weight: 700 !important;
    border: 1px solid #94a3b8 !important;
    height: 23px !important;
    line-height: 1.15 !important;
    text-align: center !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-table tbody tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    height: 23px !important;
  }

  .ts-table tbody td {
    padding: 2.5px 3px !important;
    font-size: 8pt !important;
    line-height: 1.15 !important;
    border: 1px solid #cbd5e1 !important;
    height: 23px !important;
    vertical-align: middle !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
  }

  .ts-table tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
  }

  .ts-date-col {
    font-weight: 600 !important;
    font-size: 8pt !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    text-align: center !important;
  }

  .ts-badge,
  .ts-badge-present,
  .ts-badge-absent,
  .ts-badge-off,
  .ts-badge-today,
  .ts-badge-leave {
    background: transparent !important;
    background-color: transparent !important;
    color: #0f172a !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 7.2pt !important;
    display: inline-block !important;
    line-height: 1.1 !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-punch {
    color: #dc2626 !important;
    font-weight: 600 !important;
    font-size: 8pt !important;
    letter-spacing: 0.1px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    text-align: center !important;
  }

  .ts-hours {
    font-weight: 700 !important;
    font-size: 8pt !important;
    color: #0f172a !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    text-align: center !important;
  }

  .ts-table tfoot td {
    padding: 4px 8px !important;
    font-size: 8.2pt !important;
    font-weight: 700 !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #94a3b8 !important;
    height: 25px !important;
    line-height: 1.1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  .ts-total-label {
    padding-right: 12px !important;
    font-size: 8.2pt !important;
  }

  .ts-total-value {
    font-size: 8.8pt !important;
    font-weight: 800 !important;
  }
}

/* ============================================================
   VIEW 4: PENDING WORKFLOWS & RESIGNATIONS TRACKER
   ============================================================ */
.sidebar-badge-count {
  position: absolute;
  top: 6px;
  right: 8px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 14px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.app-sidebar.expanded .sidebar-badge-count {
  position: static;
  margin-left: auto;
}

/* 4-KPI Grid */
.wf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.wf-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  user-select: none;
}

.wf-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.wf-kpi-card.active {
  border-color: #0f62fe;
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.2), 0 4px 12px rgba(15, 23, 42, 0.06);
}

.wf-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.wf-kpi-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tag-red { background: #fee2e2; color: #b91c1c; }
.tag-gold { background: #fef3c7; color: #b45309; }
.tag-blue { background: #e0f2fe; color: #0369a1; }
.tag-purple { background: #f3e8ff; color: #7e22ce; }

.wf-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.icon-red { background: #fef2f2; color: #ef4444; }
.icon-gold { background: #fffbeb; color: #f59e0b; }
.icon-blue { background: #f0f9ff; color: #0284c7; }
.icon-purple { background: #faf5ff; color: #9333ea; }

.wf-kpi-val {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.val-red { color: #dc2626; }
.val-gold { color: #d97706; }
.val-blue { color: #0284c7; }
.val-purple { color: #7c3aed; }

.wf-kpi-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.wf-kpi-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

/* Filters & Search Toolbar */
.wf-toolbar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.wf-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wf-chip-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  outline: none;
}

.wf-chip-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.wf-chip-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.wf-chip-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
}

.wf-chip-btn.active .wf-chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.wf-filter-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.wf-input-wrap svg {
  position: absolute;
  left: 12px;
  pointer-events: none;
}

.wf-input-wrap input {
  padding-left: 36px;
  height: 38px;
  width: 280px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.wf-input-wrap input:focus {
  border-color: #0f62fe;
  box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.15);
}

/* ============================================================
   WORKFLOWS DATA TABLE (Flexible, Clean Layout - No Text Overlap)
   ============================================================ */
.wf-table-wrapper {
  overflow-x: auto;
  border-radius: 0 0 10px 10px;
}

.wf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
  table-layout: auto !important; /* Allow natural cell expansion */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wf-table thead th {
  background: #1e293b;
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 7px;
  border: 1px solid #334155;
  white-space: nowrap;
  vertical-align: middle;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wf-table tbody td {
  padding: 5px 7px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 11px;
  vertical-align: middle;
  line-height: 1.35;
  height: auto !important; /* Never clip or fix row heights */
  overflow: visible !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wf-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.wf-table tbody tr:hover {
  background-color: #f1f5f9;
}

#wfDateSortTh:hover {
  background-color: #334155 !important;
  color: #93c5fd !important;
}

#leavesDateSortTh:hover {
  background-color: #e2e8f0 !important;
  color: #0f62fe !important;
}

/* Date Column */
.wf-date-col {
  text-align: center;
  white-space: nowrap;
  vertical-align: middle !important;
}

.wf-date-main {
  font-weight: 700;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.3;
}

.wf-date-eff {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
  font-weight: 500;
}

/* Workflow SLA / Aging Pill */
.wf-age-pill {
  font-size: 9.5px;
  font-weight: 700;
  display: inline-block;
  padding: 1.5px 6px;
  border-radius: 9999px;
  margin-top: 3px;
  line-height: 1.2;
  white-space: nowrap;
}
.wf-age-pill.age-overdue {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.wf-age-pill.age-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.wf-age-pill.age-normal {
  background: #f1f5f9;
  color: #475569;
}

/* Missing Out Punch Anomaly Indicator */
.ts-missing-punch {
  font-size: 9px;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-block;
  margin-left: 3px;
  white-space: nowrap;
  vertical-align: middle;
}

/* Request Type & Subject Cell */
.wf-req-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  max-width: 260px;
}

.wf-subject-text {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
  word-break: break-word;
}

/* Badges in Workflows Table */
.wf-type-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  line-height: 1.2;
}

.type-resignation {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.type-leave {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.type-datachg {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.type-general {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.wf-stage-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  display: inline-block;
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

.wf-stage-pill.stage-ceo {
  background-color: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
  font-weight: 700;
}

.wf-stage-pill.stage-manager {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* Approver Tags */
.wf-approver-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  max-width: 100%;
}

.wf-approver-ceo {
  background-color: #fffbeb;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.wf-approver-mgr {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.wf-approver-grp {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}

/* Action Links */
.wf-sap-link-btn {
  background-color: #00a88f;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.wf-sap-link-btn:hover {
  background-color: #008f7a;
  box-shadow: 0 2px 6px rgba(0, 168, 143, 0.35);
  transform: translateY(-1px);
}

.wf-view-steps-btn {
  background: transparent;
  color: #0f62fe;
  border: 1px solid #bfdbfe;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
}

.wf-view-steps-btn:hover {
  background: #edf5ff;
}

/* Workflow Steps Timeline in Modal */
.wf-steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-step-node {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
}

.wf-step-node.active-step {
  border-color: #0f62fe;
  background: #f0f7ff;
  box-shadow: 0 0 0 1px #0f62fe;
}

.wf-step-node.ceo-step {
  border-color: #f59e0b;
  background: #fffdf5;
}

.wf-step-num-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  background: #cbd5e1;
  color: #334155;
}

.wf-step-node.active-step .wf-step-num-badge {
  background: #0f62fe;
  color: #ffffff;
}

.wf-step-node.ceo-step.active-step .wf-step-num-badge {
  background: #f59e0b;
  color: #ffffff;
}

.wf-step-body {
  flex: 1;
}

.wf-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.wf-step-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.wf-step-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
}

.step-status-pending {
  background: #fef3c7;
  color: #b45309;
}

.step-status-active {
  background: #dbeafe;
  color: #1e40af;
}

.wf-step-approver-name {
  font-size: 12.5px;
  color: #334155;
  font-weight: 600;
}

.wf-step-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

/* ============================================================
   EMPLOYEE WORK HOURS PRINT SLIP & CERTIFICATE
   ============================================================ */
.emp-print-slip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 22px 26px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.slip-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.slip-company-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slip-company-logo {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 2px;
  background: #0f172a;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
}

.slip-company-name {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
}

.slip-company-sub {
  font-size: 11px;
  color: #64748b;
}

.slip-doc-meta {
  text-align: right;
}

.slip-doc-title {
  font-size: 13px;
  font-weight: 800;
  color: #00a88f;
  letter-spacing: 0.5px;
}

.slip-doc-date {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Profile Box */
.slip-profile-box {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.slip-emp-photo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #cbd5e1;
  background: #f1f5f9;
  flex-shrink: 0;
}

.slip-emp-info {
  flex: 1;
  min-width: 0;
}

.slip-emp-name {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.slip-emp-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.slip-badge-empid {
  font-family: monospace;
  font-size: 11.5px;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
  padding: 1px 7px;
  border-radius: 4px;
}

.slip-emp-title {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.slip-emp-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.slip-emp-sched {
  font-family: monospace;
  font-size: 11px;
  color: #334155;
  margin-top: 2px;
  font-weight: 600;
}

.slip-hours-kpi-callout {
  background: #ffffff;
  border: 2px solid #00a88f;
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
  min-width: 155px;
  flex-shrink: 0;
}

.slip-kpi-sub {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

.slip-kpi-big {
  font-size: 26px;
  font-weight: 900;
  color: #00a88f;
  line-height: 1.1;
  margin: 3px 0;
}

.slip-kpi-note {
  font-size: 10.5px;
  color: #64748b;
}

/* Stats Strip */
.slip-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.slip-stat-col {
  display: flex;
  flex-direction: column;
}

.slip-stat-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
}

.slip-stat-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

/* Table */
.slip-table-container {
  margin-bottom: 20px;
}

.slip-table-title {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.slip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.slip-table th {
  background: #1e293b;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid #334155;
  text-align: left;
}

.slip-table td {
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 11px;
}

.slip-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.slip-table tfoot td {
  background: #f1f5f9;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

/* Signatures */
.slip-signatures-box {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 10px;
}

.slip-sign-col {
  width: 220px;
  text-align: center;
}

.slip-sign-line {
  border-bottom: 1px dashed #64748b;
  margin-bottom: 6px;
}

.slip-sign-label {
  font-size: 10.5px;
  color: #475569;
  font-weight: 600;
}

/* SPECIFIC PRINT OVERRIDES FOR EMPLOYEE SLIP */
@media print {
  body.printing-emp-slip * {
    visibility: hidden !important;
  }

  body.printing-emp-slip #empHoursPrintModal,
  body.printing-emp-slip #empPrintSlip,
  body.printing-emp-slip #empPrintSlip * {
    visibility: visible !important;
  }

  body.printing-emp-slip #empHoursPrintModal {
    position: static !important;
    display: block !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  body.printing-emp-slip #empHoursPrintModal .modal-content {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.printing-emp-slip #empHoursPrintModal .modal-body {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.printing-emp-slip .hide-on-slip-print {
    display: none !important;
  }

  body.printing-emp-slip #empPrintSlip {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    border: 1px solid #94a3b8 !important;
    padding: 8mm 10mm !important;
  }

  body.printing-emp-slip .slip-badge-empid {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #0f172a !important;
  }
}

/* ============================================== */
/* LEAVE REPORT STYLES                            */
/* ============================================== */
.leaves-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  background-color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.leaves-table thead th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 8px 8px;
  border: 1px solid #e2e8f0;
  font-size: 11.5px;
  line-height: 1.2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.2px;
}

.leaves-table tbody td {
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 12px;
  vertical-align: middle;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.leaves-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.leaves-table tbody tr:hover {
  background-color: #f0fdf4;
}

.leaves-table .dept-emp-name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  display: block;
  line-height: 1.25;
}

.leaves-table .dept-emp-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  display: block;
  margin-top: 1px;
}

.badge-leave-annual {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  white-space: nowrap;
}

.badge-leave-sick {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
  white-space: nowrap;
}

.badge-leave-unpaid {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  white-space: nowrap;
}

.badge-leave-short {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  white-space: nowrap;
}

.badge-leave-maternity {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: #fce7f3;
  color: #be185d;
  border: 1px solid #fbcfe8;
  white-space: nowrap;
}

.badge-leave-default {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  white-space: nowrap;
}

.badge-approved,
.leave-status-approved {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #15803d;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  letter-spacing: 0.2px;
}

.leave-status-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  background: transparent;
  border: none;
  padding: 0;
}

.leave-status-rejected {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  background: transparent;
  border: none;
  padding: 0;
}

.leave-status-cancelled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  padding: 0;
}

.leaves-header-bar {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
  color: #ffffff !important;
  padding: 10px 18px !important;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.leaves-header-bar #leavesSheetHeaderTitle {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14.5px !important;
}

.leaves-header-bar .ts-header-branding {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
}

.leaves-date-col {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  font-size: 12px;
}

.leaves-days-val {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  color: #1e293b;
  font-size: 12px;
  display: block;
  line-height: 1.2;
}

.leaves-hours-sub {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  color: #64748b;
  display: block;
  margin-top: 1px;
  line-height: 1.1;
}

.leaves-comment-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11.5px;
  color: #475569;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.25;
}

.leaves-avail-bal-cell {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  white-space: nowrap;
}

.leaves-avail-bal-cell .leaves-quota-val {
  color: #1e293b;
  font-weight: 600;
}

.leaves-avail-bal-cell .leaves-avail-val {
  color: #1e293b;
  font-weight: 600;
}

.leaves-avail-bal-cell .leaves-avail-sep {
  color: #94a3b8;
  font-weight: 400;
  margin: 0 4px;
}

.leaves-avail-bal-cell .leaves-bal-val {
  color: #1e293b;
  font-weight: 600;
}

/* Printing styles for Leaves Report */
@media print {
  @page leaves_landscape {
    size: A4 landscape;
    margin: 6mm 6mm 15mm 6mm;

    @bottom-left {
      content: "Printed on: Live SAP • PeopleHub By Spine";
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      font-size: 7.5pt;
      font-weight: 500;
      color: #64748b;
      vertical-align: top;
      padding-top: 3mm;
    }

    @bottom-right {
      content: counter(page) " / " counter(pages);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      font-size: 7.5pt;
      font-weight: 600;
      color: #64748b;
      vertical-align: top;
      padding-top: 3mm;
    }
  }

  body.printing-leaves {
    page: leaves_landscape;
  }

  body.printing-leaves * {
    visibility: hidden;
  }

  body.printing-leaves #viewLeaves,
  body.printing-leaves #viewLeaves #leavesPrintContainer,
  body.printing-leaves #viewLeaves #leavesPrintContainer * {
    visibility: visible;
  }

  body.printing-leaves .app-shell {
    display: block !important;
  }

  body.printing-leaves .sidebar,
  body.printing-leaves .app-header,
  body.printing-leaves .page-intro,
  body.printing-leaves .wf-kpi-grid,
  body.printing-leaves .wf-toolbar-card,
  body.printing-leaves footer {
    display: none !important;
  }

  body.printing-leaves .main-wrapper,
  body.printing-leaves .app-container,
  body.printing-leaves #viewLeaves {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    position: static !important;
  }

  body.printing-leaves #leavesPrintContainer {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  /* Bright white text on dark bar in print (Never black on dark background!) */
  body.printing-leaves .leaves-header-bar,
  body.printing-leaves .dept-sheet-header-strip {
    background-color: #1e293b !important;
    background: #1e293b !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    height: auto !important;
    min-height: 28px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    border: 1px solid #94a3b8 !important;
    border-bottom: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-leaves #leavesSheetHeaderTitle {
    color: #ffffff !important;
    font-size: 10pt !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-leaves .ts-header-branding {
    color: #ffffff !important;
    font-size: 8.5pt !important;
    font-weight: 700 !important;
    letter-spacing: 0.4px !important;
    margin-left: auto !important;
    white-space: nowrap !important;
    display: inline-block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-leaves .wf-table-wrapper {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.printing-leaves .leaves-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  body.printing-leaves .leaves-table th,
  body.printing-leaves .leaves-table td {
    padding: 3px 3px !important;
    border: 1px solid #94a3b8 !important;
    font-size: 7.5pt !important;
    line-height: 1.15 !important;
    min-width: 0 !important;
    max-width: none !important;
    word-break: break-word !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  body.printing-leaves .leaves-table thead {
    display: table-header-group !important;
  }

  body.printing-leaves .leaves-table thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    text-align: center !important;
    height: auto !important;
    min-height: 24px !important;
    padding: 3px 2px !important;
    font-size: 7.2pt !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    letter-spacing: 0 !important;
    word-break: normal !important;
  }

  body.printing-leaves .leaves-table tbody tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    height: 23px !important;
  }

  /* Compact uniform employee name & title in print (matching Department Worksheet) */
  body.printing-leaves .leaves-table .dept-emp-name {
    font-size: 7.5pt !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.2 !important;
    display: block !important;
    word-break: break-word !important;
  }

  body.printing-leaves .leaves-table .dept-emp-title {
    font-size: 6.8pt !important;
    font-weight: 400 !important;
    color: #64748b !important;
    line-height: 1.1 !important;
    display: block !important;
    margin-top: 1px !important;
  }

  /* Compact uniform DAYS typography in print */
  body.printing-leaves .leaves-table .leaves-days-val {
    font-size: 7.5pt !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    display: block !important;
    line-height: 1.15 !important;
  }

  body.printing-leaves .leaves-table .leaves-hours-sub {
    font-size: 6.5pt !important;
    font-weight: 400 !important;
    color: #64748b !important;
    display: block !important;
    line-height: 1.1 !important;
    margin-top: 1px !important;
  }

  /* Hide interactive sort arrows in print */
  body.printing-leaves #leavesDateSortIcon,
  body.printing-workflows #wfDateSortIcon {
    display: none !important;
  }

  /* Remove all dark boxes/blobs in print from Approved and Leave Type */
  body.printing-leaves .leaves-table .leave-status-approved,
  body.printing-leaves .leaves-table .leave-status-pending,
  body.printing-leaves .leaves-table .leave-status-rejected,
  body.printing-leaves .leaves-table .leave-status-cancelled,
  body.printing-leaves .leaves-table .badge-approved {
    font-size: 7.5pt !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
    display: block !important;
  }

  body.printing-leaves .leaves-table .badge-leave-annual,
  body.printing-leaves .leaves-table .badge-leave-sick,
  body.printing-leaves .leaves-table .badge-leave-unpaid,
  body.printing-leaves .leaves-table .badge-leave-short,
  body.printing-leaves .leaves-table .badge-leave-maternity,
  body.printing-leaves .leaves-table .badge-leave-default {
    font-size: 7.2pt !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
    display: block !important;
  }

  body.printing-leaves .leaves-table .leaves-mol-badge {
    font-size: 6.8pt !important;
    font-weight: 600 !important;
    color: #334155 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 1px !important;
    display: block !important;
  }
  body.printing-leaves .leaves-table .leaves-mol-lbl {
    color: #64748b !important;
    font-size: 6.5pt !important;
    font-weight: 500 !important;
  }

  /* Compact uniform Availed / Balance column in print */
  body.printing-leaves .leaves-table .leaves-avail-bal-cell,
  body.printing-leaves .leaves-table .leaves-avail-bal-cell span {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 7.5pt !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-align: center !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  body.printing-leaves .leaves-table .leaves-avail-sep {
    color: #64748b !important;
    font-weight: 400 !important;
    margin: 0 2px !important;
  }

  /* 11 columns totaling 100% (Balanced: Photo has full room, reduced Department/Leave Type gap, Quota/Availed/Balance fits strictly on one line) */
  body.printing-leaves .leaves-table th:nth-child(1), body.printing-leaves .leaves-table td:nth-child(1) { width: 4.5% !important; text-align: center !important; padding: 2px !important; }
  body.printing-leaves .leaves-table th:nth-child(2), body.printing-leaves .leaves-table td:nth-child(2) { width: 5% !important; text-align: center !important; font-weight: 600 !important; }
  body.printing-leaves .leaves-table th:nth-child(3), body.printing-leaves .leaves-table td:nth-child(3) { width: 15% !important; text-align: left !important; }
  body.printing-leaves .leaves-table th:nth-child(4), body.printing-leaves .leaves-table td:nth-child(4) { width: 11.5% !important; text-align: left !important; }
  body.printing-leaves .leaves-table th:nth-child(5), body.printing-leaves .leaves-table td:nth-child(5) { width: 7.5% !important; text-align: center !important; }
  body.printing-leaves .leaves-table th:nth-child(6), body.printing-leaves .leaves-table td:nth-child(6) { width: 7.5% !important; text-align: center !important; }
  body.printing-leaves .leaves-table th:nth-child(7), body.printing-leaves .leaves-table td:nth-child(7) { width: 7.5% !important; text-align: center !important; }
  body.printing-leaves .leaves-table th:nth-child(8) { width: 5% !important; text-align: center !important; font-weight: 700 !important; }
  body.printing-leaves .leaves-table td:nth-child(8) { width: 5% !important; text-align: center !important; font-weight: 600 !important; }
  body.printing-leaves .leaves-table th:nth-child(9), body.printing-leaves .leaves-table td:nth-child(9) { width: 5.5% !important; text-align: center !important; }
  body.printing-leaves .leaves-table th:nth-child(10), body.printing-leaves .leaves-table td:nth-child(10) { width: 15.5% !important; text-align: left !important; }
  body.printing-leaves .leaves-table th:nth-child(11), body.printing-leaves .leaves-table td:nth-child(11) { width: 15.5% !important; text-align: center !important; }
  body.printing-leaves .leaves-table th:nth-child(1) {
    white-space: nowrap !important;
  }
  body.printing-leaves .leaves-table th:nth-child(11) {
    font-size: 6.8pt !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
    padding: 3px 2px !important;
  }
}

/* Printing styles for Workflows & Rami Sir's Queue (Guaranteed 100% Page Fit, No Overflow) */
@media print {
  @page workflows_landscape {
    size: A4 landscape;
    margin: 6mm 6mm 15mm 6mm;

    @bottom-left {
      content: "Printed on: Live SAP • PeopleHub By Spine";
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      font-size: 7.5pt;
      font-weight: 500;
      color: #64748b;
      vertical-align: top;
      padding-top: 3mm;
    }

    @bottom-right {
      content: counter(page) " / " counter(pages);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      font-size: 7.5pt;
      font-weight: 600;
      color: #64748b;
      vertical-align: top;
      padding-top: 3mm;
    }
  }

  body.printing-workflows {
    page: workflows_landscape;
  }

  body.printing-workflows * {
    visibility: hidden;
  }

  body.printing-workflows #viewWorkflows,
  body.printing-workflows #viewWorkflows #wfPrintContainer,
  body.printing-workflows #viewWorkflows #wfPrintContainer * {
    visibility: visible;
  }

  body.printing-workflows .app-shell {
    display: block !important;
  }

  body.printing-workflows .sidebar,
  body.printing-workflows .app-header,
  body.printing-workflows .page-intro,
  body.printing-workflows .wf-kpi-grid,
  body.printing-workflows .wf-toolbar-card,
  body.printing-workflows footer,
  body.printing-workflows .wf-view-steps-btn {
    display: none !important;
  }

  body.printing-workflows .main-wrapper,
  body.printing-workflows .app-container,
  body.printing-workflows #viewWorkflows {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    position: static !important;
  }

  body.printing-workflows #wfPrintContainer {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  /* Workflow Print Header Bar: Bright white text on dark strip, no OData pill */
  body.printing-workflows .dept-sheet-header-strip,
  body.printing-workflows .wf-header-bar {
    background-color: #1e293b !important;
    background: #1e293b !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    height: auto !important;
    min-height: 28px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    border: 1px solid #94a3b8 !important;
    border-bottom: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-workflows #wfSheetHeaderTitle {
    color: #ffffff !important;
    font-size: 10pt !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-workflows .ts-header-branding {
    color: #ffffff !important;
    font-size: 9pt !important;
    font-weight: 700 !important;
    display: inline-block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-workflows #wfActiveFilterBadge {
    display: none !important;
  }

  body.printing-workflows .wf-table thead {
    display: table-header-group !important;
  }

  body.printing-workflows .wf-table-wrapper {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.printing-workflows .wf-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }

  body.printing-workflows .wf-table th,
  body.printing-workflows .wf-table td {
    padding: 2px 3px !important;
    border: 1px solid #94a3b8 !important;
    font-size: 6.2pt !important;
    line-height: 1.15 !important;
    min-width: 0 !important;
    max-width: none !important;
    word-break: break-word !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
  }

  body.printing-workflows .wf-table thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    text-align: center !important;
    height: 22px !important;
    padding: 3px 2px !important;
    font-size: 6.5pt !important;
  }

  body.printing-workflows .wf-table tbody tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    height: 22px !important;
  }

  /* Hide interactive button Actions column (column 10) in print */
  body.printing-workflows .wf-table th:nth-child(10),
  body.printing-workflows .wf-table td:nth-child(10) {
    display: none !important;
  }

  /* 9 columns totaling exactly 100% with no overflow */
  body.printing-workflows .wf-table th:nth-child(1), body.printing-workflows .wf-table td:nth-child(1) { width: 4% !important; text-align: center !important; padding: 2px !important; }
  body.printing-workflows .wf-table th:nth-child(2), body.printing-workflows .wf-table td:nth-child(2) { width: 7% !important; text-align: center !important; font-weight: 600 !important; }
  body.printing-workflows .wf-table th:nth-child(3), body.printing-workflows .wf-table td:nth-child(3) { width: 17% !important; text-align: left !important; }
  body.printing-workflows .wf-table th:nth-child(4), body.printing-workflows .wf-table td:nth-child(4) { width: 15% !important; text-align: left !important; }
  body.printing-workflows .wf-table th:nth-child(5), body.printing-workflows .wf-table td:nth-child(5) { width: 16% !important; text-align: left !important; }
  body.printing-workflows .wf-table th:nth-child(6), body.printing-workflows .wf-table td:nth-child(6) { width: 9% !important; text-align: center !important; }
  body.printing-workflows .wf-table th:nth-child(7), body.printing-workflows .wf-table td:nth-child(7) { width: 12% !important; text-align: left !important; }
  body.printing-workflows .wf-table th:nth-child(8), body.printing-workflows .wf-table td:nth-child(8) { width: 9% !important; text-align: center !important; }
  body.printing-workflows .wf-table th:nth-child(9), body.printing-workflows .wf-table td:nth-child(9) { width: 11% !important; text-align: left !important; }

  body.printing-workflows .wf-table .dept-avatar-thumb {
    width: 20px !important;
    height: 20px !important;
    border-radius: 3px !important;
    display: block !important;
    margin: 0 auto !important;
  }

  body.printing-workflows .wf-table .wf-emp-name {
    font-size: 6.8pt !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.15 !important;
    word-break: break-word !important;
  }

  body.printing-workflows .wf-table .wf-emp-title {
    font-size: 5.8pt !important;
    color: #64748b !important;
    line-height: 1.1 !important;
  }

  body.printing-workflows .wf-table .wf-type-pill {
    font-size: 5.8pt !important;
    padding: 0 !important;
    border-radius: 0 !important;
    line-height: 1.1 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 700 !important;
  }

  body.printing-workflows .wf-table .wf-subject-text {
    font-size: 6pt !important;
    color: #475569 !important;
    line-height: 1.15 !important;
    margin-top: 1px !important;
  }

  body.printing-workflows .wf-table .wf-date-main {
    font-size: 6.5pt !important;
    font-weight: 700 !important;
  }

  body.printing-workflows .wf-table .wf-date-eff {
    font-size: 5.8pt !important;
    color: #64748b !important;
  }

  body.printing-workflows .wf-table .wf-stage-pill {
    font-size: 6pt !important;
    padding: 0 !important;
    border-radius: 0 !important;
    white-space: normal !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 600 !important;
  }

  body.printing-workflows .wf-table .wf-approver-tag {
    font-size: 6.2pt !important;
    padding: 0 !important;
    border-radius: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  body.printing-workflows .wf-table .wf-badge-newhire {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-weight: 700 !important;
    color: #0284c7 !important;
  }
}





/* Workflow Screen Header Bar & Title (Bright White Font, No OData Badge) */
.dept-sheet-header-strip,
.wf-header-bar {
  background: #1e293b !important;
  color: #ffffff !important;
}

#wfSheetHeaderTitle {
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
}

#wfActiveFilterBadge {
  display: none !important;
}


/* =========================================================
   PUNCH MAINTENANCE MODULE STYLES
   ========================================================= */

.punch-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.punch-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.punch-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.punch-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.punch-kpi-icon.blue   { background: #eff6ff; color: #2563eb; }
.punch-kpi-icon.green  { background: #ecfdf5; color: #059669; }
.punch-kpi-icon.amber  { background: #fffbeb; color: #d97706; }
.punch-kpi-icon.red    { background: #fef2f2; color: #dc2626; }
.punch-kpi-icon.purple { background: #f5f3ff; color: #7c3aed; }

.punch-kpi-body {
  display: flex;
  flex-direction: column;
}

.punch-kpi-val {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.1;
}

.punch-kpi-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 3px;
}

/* Punch Filters Bar */
.punch-filter-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.punch-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.punch-filter-chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
  overflow-x: auto;
}

.punch-chip {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.punch-chip:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.punch-chip.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* Punch Table */
.punch-table-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.punch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.punch-table th {
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  padding: 11px 14px;
  font-size: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border-bottom: 1px solid #334155;
}

.punch-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.punch-table tr:hover {
  background: #f8fafc;
}

.punch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.punch-badge-original {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.punch-badge-modified {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.punch-badge-deleted {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.punch-badge-missed {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  animation: pulseMissed 2s infinite ease-in-out;
}

@keyframes pulseMissed {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Punch Time Pill Display */
.punch-times-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.punch-pair-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 11.5px;
}

.punch-tag-in {
  color: #059669;
  font-weight: 700;
}

.punch-tag-out {
  color: #dc2626;
  font-weight: 700;
}

.punch-tag-sep {
  color: #94a3b8;
  font-size: 10px;
}

/* Action Buttons */
.punch-actions-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.punch-btn {
  border: none;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.punch-btn-edit {
  background: #0284c7;
  color: #ffffff;
}
.punch-btn-edit:hover {
  background: #0369a1;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.punch-btn-revert {
  background: #f59e0b;
  color: #ffffff;
}
.punch-btn-revert:hover {
  background: #d97706;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.punch-btn-delete {
  background: #fee2e2;
  color: #dc2626;
}
.punch-btn-delete:hover {
  background: #fca5a5;
  color: #991b1b;
}

/* Dropzone */
.punch-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.punch-dropzone:hover,
.punch-dropzone.dragover {
  border-color: #0284c7;
  background: #f0f9ff;
}

.punch-dropzone-icon {
  font-size: 38px;
  color: #0284c7;
  margin-bottom: 8px;
}


/* ============================================================
   AUTHENTICATION & USER PROFILE STYLES
   ============================================================ */

/* ============================================================
   MODERN ENTERPRISE SPLIT-SCREEN LOGIN
   ============================================================ */

.login-screen-split {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  background: #0f172a;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Left Hero Showcase Pane */
.login-split-left {
  flex: 1.2;
  background: linear-gradient(135deg, #07111e 0%, #0c2340 50%, #0369a1 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.35);
}

.split-left-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  pointer-events: none;
  opacity: 0.6;
}

.split-left-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.split-brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.split-brand-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 22px;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.55);
  letter-spacing: 0.5px;
}

.split-brand-name {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.15;
}

.split-brand-by {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  margin-top: 2px;
}

.split-hero-headline h2 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 16px 0;
  letter-spacing: -0.6px;
  color: #ffffff;
}

.split-hero-headline p {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 36px 0;
}

.split-hero-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 44px;
}

.split-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.feature-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-text strong {
  font-size: 14px;
  color: #f8fafc;
  font-weight: 700;
}

.feature-text span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.split-footer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.split-footer-pill {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
}

/* Right Sign-In Pane */
.login-split-right {
  flex: 0.9;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow-y: auto;
}

.login-box-card {
  width: 100%;
  max-width: 440px;
  padding: 10px 0;
}

.login-mobile-brand {
  display: none;
  text-align: center;
  margin-bottom: 24px;
}

.login-form-heading {
  margin-bottom: 28px;
}

.sign-in-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: -0.6px;
}

.sign-in-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.login-trust-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  justify-content: center;
}

.trust-shield-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive breakpoint for smaller screens */
@media (max-width: 960px) {
  .login-screen-split {
    flex-direction: column;
    overflow-y: auto;
  }
  .login-split-left {
    display: none;
  }
  .login-split-right {
    flex: 1;
    min-height: 100vh;
    padding: 40px 24px;
  }
  .login-mobile-brand {
    display: block;
  }
}

.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: linear-gradient(135deg, #091322 0%, #0f172a 50%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.login-container {
  max-width: 460px;
  width: 100%;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 34px 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-badge {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #1e40af, #0284c7);
  border-radius: 14px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(2, 132, 199, 0.35);
}

.login-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.login-subtitle {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.login-error-alert {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid #ef4444;
  color: #991b1b;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.12);
}

.login-field-group {
  margin-bottom: 16px;
}

.login-field-group label {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 6px;
}

.login-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.login-input-wrap:focus-within {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.login-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 8px;
  font-size: 13.5px;
  color: #0f172a;
  outline: none;
  font-family: inherit;
}

.login-pwd-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: 4px;
  display: flex;
  align-items: center;
}

.login-pwd-toggle:hover {
  color: #0f172a;
}

.login-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #1e40af);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
  font-family: inherit;
}

.login-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
}

.login-demo-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.login-demo-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.login-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.demo-login-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
}

.demo-login-chip:hover {
  background: #f0f9ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.chip-role {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1.5px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
}

.chip-admin { background: #dbeafe; color: #1e40af; }
.chip-manager { background: #fef3c7; color: #b45309; }
.chip-employee { background: #e0f2fe; color: #0284c7; }

.chip-name {
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  font-family: monospace;
}

.login-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 10.5px;
  color: #94a3b8;
}

/* User Profile in App Header */
.user-header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.user-header-meta {
  text-align: right;
}

.user-header-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.user-header-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.user-role-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1.5px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.user-role-badge.badge-admin {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.user-role-badge.badge-manager {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.user-role-badge.badge-employee {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.user-dept-badge {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 500;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #0284c7);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid #ffffff;
}

.user-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-logout:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* ========================================================
   MODERN ENTERPRISE ANIMATION SUITE (MODULAR & REVERSIBLE)
   ======================================================== */

/* 1. Smooth View / Tab Transitions */
.view-section {
  animation: viewGlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* 2. Login Screen Smooth Transitions */
.login-screen-split {
  transition: opacity 0.26s ease-out, transform 0.26s ease-out;
}

.login-screen-exit {
  opacity: 0 !important;
  transform: scale(0.985) !important;
  pointer-events: none !important;
}

/* 3. Card Shake on Error (iOS / macOS Style) */
@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.login-shake {
  animation: loginShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* 4. Login Button Micro-Spinner */
.login-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* 5. Skeleton Shimmer Wave Effect */
@keyframes shimmerWave {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmerWave 1.4s ease-in-out infinite;
  border-radius: 4px;
  display: inline-block;
}

.skeleton-text-sm { height: 12px; width: 60px; }
.skeleton-text-md { height: 14px; width: 110px; }
.skeleton-text-lg { height: 14px; width: 160px; }
.skeleton-pill { height: 22px; width: 75px; border-radius: 12px; }
.skeleton-avatar { width: 34px; height: 34px; border-radius: 50%; }

.skeleton-row td {
  padding: 14px 12px !important;
  vertical-align: middle;
}

/* 6. Interactive Card Elevation & Micro-Hovers */
.wf-kpi-card, .leaves-kpi-card {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease !important;
}

.wf-kpi-card:hover, .leaves-kpi-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

.demo-login-chip {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.demo-login-chip:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* 7. Live Pulse Dot Animation */
.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  margin-right: 5px;
  animation: livePulseDot 1.8s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes livePulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.55; }
}

/* 8. Crisp Red Error Alert & Input Shake Animations */
.login-error-alert.alert-danger {
  background: #fef2f2 !important;
  border: 1.5px solid #fca5a5 !important;
  border-left: 4px solid #ef4444 !important;
  color: #991b1b !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.12) !important;
}

.login-error-alert.alert-danger svg {
  stroke: #ef4444 !important;
  flex-shrink: 0;
}

.login-error-alert.alert-success {
  background: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
  border-left: 4px solid #10b981 !important;
  color: #065f46 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12) !important;
}

.login-error-alert.alert-success svg {
  stroke: #10b981 !important;
  flex-shrink: 0;
}

@keyframes alertShakePop {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  30% {
    opacity: 1;
    transform: translateY(0) translateX(-6px);
  }
  50% {
    transform: translateY(0) translateX(5px);
  }
  70% {
    transform: translateY(0) translateX(-3px);
  }
  85% {
    transform: translateY(0) translateX(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

.alert-animated {
  animation: alertShakePop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Red Input Wrap Error on Wrong Password */
.login-input-wrap.input-wrap-error {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.22) !important;
  animation: inputErrorShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.login-input-wrap.input-wrap-error svg {
  stroke: #ef4444 !important;
}

.login-input-wrap.input-wrap-error input {
  color: #991b1b !important;
}

@keyframes inputErrorShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-5px); }
  30%, 60%, 90% { transform: translateX(5px); }
}

