/* ==========================================================================
   HR Admin MIS - Workflow & Process Lifecycle Styles (Executive Royal & Navy Blue)
   ========================================================================== */

/* Top Interactive Workflow Stepper Tracker */
.workflow-tracker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.workflow-tracker-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6, #2563eb, #1d4ed8, #059669);
}

.stepper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.stepper-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-heading);
}

.stepper-progress-text {
  font-size: 0.8rem;
  color: var(--text-heading);
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.stepper-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
  gap: 0.75rem;
}

.stepper-steps::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: rgba(37, 99, 235, 0.2);
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  transition: all var(--transition-normal);
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid rgba(37, 99, 235, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  transition: all var(--transition-smooth);
  box-shadow: 0 3px 10px rgba(30, 58, 138, 0.08);
}

.step-info {
  margin-top: 0.65rem;
}

.step-num {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 800;
}

.step-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.25;
  margin-top: 0.15rem;
}

/* Stepper States */
.step-node.completed .step-circle {
  background: rgba(5, 150, 105, 0.15);
  border-color: var(--phase-completion);
  color: var(--phase-completion);
}

.step-node.completed .step-label {
  color: var(--text-heading);
}

.step-node.active .step-circle {
  background: var(--gradient-primary);
  border-color: #93c5fd;
  color: #fff;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.45);
  transform: scale(1.08);
}

.step-node.active .step-label {
  color: var(--primary-dark);
  font-weight: 800;
}

.step-node:hover .step-circle {
  border-color: var(--primary);
  color: var(--text-heading);
}

/* Generic Section Grid */
.workflow-section-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
}

@media (max-width: 1080px) {
  .workflow-section-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards & Panels */
.wf-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  position: relative;
  transition: all var(--transition-normal);
}

.wf-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.wf-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.wf-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-heading);
}

/* Allowances & Benefits Specific (Recruitment Phase) */
.allowance-section-box {
  background: rgba(37, 99, 235, 0.05);
  border: 1.5px dashed rgba(37, 99, 235, 0.35);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.allowance-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.allowance-badge-tag {
  background: var(--phase-recruitment-bg);
  color: var(--phase-recruitment);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.allowances-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .allowances-grid {
    grid-template-columns: 1fr;
  }
}

.allowance-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.04);
}

.allowance-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.allowance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.allowance-icon-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-heading);
}

.allowance-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.icon-medical { background: rgba(225, 29, 72, 0.15); color: #e11d48; }
.icon-leave { background: rgba(217, 119, 6, 0.15); color: #d97706; }
.icon-mobile { background: rgba(37, 99, 235, 0.15); color: #2563eb; }
.icon-pf { background: rgba(5, 150, 105, 0.15); color: #059669; }

.allowance-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.allowance-input-group input {
  flex: 1;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--text-heading);
  font-size: 0.88rem;
  font-weight: 700;
}

.allowance-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.allowance-summary-pill {
  margin-top: 1rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.allowance-summary-pill span {
  color: var(--text-heading);
  font-weight: 700;
}

.allowance-summary-pill .total-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-dark);
}

/* Candidate Pipeline & Scorecard (Interview & Selection) */
.pipeline-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 6px rgba(134, 25, 143, 0.04);
}

.req-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  white-space: normal;
  line-height: 1.25;
  max-width: 100%;
}

.req-status-pill.open {
  background: rgba(5, 150, 105, 0.15);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.35);
}

.req-status-pill.closed {
  background: rgba(225, 29, 72, 0.15);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.candidates-list-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.candidate-card-item {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.04);
}

.candidate-card-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.candidate-primary {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.candidate-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.candidate-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
}

.candidate-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.75rem;
  margin-top: 0.2rem;
  font-weight: 500;
}

.candidate-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Onboarding Checklist (Phase 4) */
.onboard-docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-heading);
}

.doc-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.doc-verified { background: rgba(5, 150, 105, 0.15); color: #047857; }
.doc-pending { background: rgba(217, 119, 6, 0.15); color: #b45309; }

/* Completion & Profile Activation Card (Phase 5) */
.profile-creation-box {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1.5px solid rgba(37, 99, 235, 0.28);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-md);
}

.profile-active-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(5, 150, 105, 0.15);
  color: #047857;
  border: 2px solid #059669;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.35); }
  50% { box-shadow: 0 0 16px 4px rgba(5, 150, 105, 0.2); }
}

.credentials-preview-box {
  background: #f8fafc;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.cred-row:last-child {
  border-bottom: none;
}

.cred-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.cred-val {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

/* ==========================================================================
   Active Projects Grid & PDF Document Viewer Styles
   ========================================================================== */

.projects-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-display-card {
  background: #ffffff;
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.05);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.project-display-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.project-display-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.16);
}

.proj-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.proj-code-badge {
  font-size: 0.74rem;
  font-family: monospace;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-dark);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.proj-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.25;
  margin-top: 0.25rem;
}

.proj-client-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Total Budget Section */
.proj-budget-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(96, 165, 250, 0.12) 100%);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.proj-budget-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-secondary);
}

.proj-budget-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* PDF Documents Section */
.proj-docs-section {
  margin: 1rem 0;
}

.proj-docs-header {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.proj-docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pdf-doc-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pdf-doc-badge:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--primary);
  transform: translateX(2px);
}

.pdf-doc-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-heading);
  font-size: 0.82rem;
  font-weight: 700;
}

.pdf-icon-tag {
  background: #e11d48;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.pdf-size-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Project Card Footer */
.proj-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.proj-duration-tag {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Simulated PDF Viewer in Modal */
.pdf-viewer-canvas {
  background: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

.pdf-page-sheet {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 2.5rem;
  color: #1e293b;
  font-family: 'Times New Roman', Times, serif;
  line-height: 1.6;
}

.pdf-letterhead {
  border-bottom: 2px solid #1e3a8a;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdf-stamp-box {
  border: 2px solid #059669;
  color: #059669;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  transform: rotate(-3deg);
  display: inline-block;
}

/* HR Admin Profile Creation Comprehensive Form Styles (Full-Width Streamlined Layout) */
.profile-creation-layout {
  display: block;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.profile-form-section {
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.form-section-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(37, 99, 235, 0.2);
  letter-spacing: -0.01em;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-3 {
  grid-column: span 3;
}

.col-span-4 {
  grid-column: span 4;
}

@media (max-width: 960px) {
  .form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .col-span-4, .col-span-3 {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .form-grid-4, .form-grid-3, .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .col-span-4, .col-span-3, .col-span-2 {
    grid-column: span 1;
  }
}

/* ==========================================================================
   MANAGED WORKFLOWS: HR ADMIN ROLE & RESPONSIBILITIES
   (Executive Royal & Navy Blue Scheme, Government / PITB Inspired Excellence)
   ========================================================================== */

/* Managed Workflow Role Header Banner */
.workflow-role-banner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(239, 246, 255, 0.9) 100%);
  border: 1.5px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(30, 58, 138, 0.08);
  position: relative;
  overflow: hidden;
}

.workflow-role-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #2563eb, #1e3a8a);
}

.workflow-role-title-box h2 {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #1e3a8a;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.workflow-role-title-box p {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin: 0;
  font-weight: 500;
}

.workflow-official-emblem {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.emblem-svg-icon {
  width: 48px;
  height: 48px;
  color: #1e3a8a;
}

.emblem-text {
  text-align: right;
  line-height: 1.25;
}

.emblem-text .gov-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.emblem-text .dept-title {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

/* 1. Live Count & Leave Quota Cards */
.live-count-badge-box {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1.5px solid #3b82f6;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.live-count-shield {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.4);
  animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.leave-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.leave-quota-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.leave-quota-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.12);
  border-color: #2563eb;
}

.leave-quota-card .card-type {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.leave-quota-card .live-num {
  font-size: 2.1rem;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.leave-quota-card .live-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.leave-progress-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.6rem;
}

.leave-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

/* System Override & Adjustment Banner */
.system-override-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.override-toggle-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #b45309;
}

/* Audit Trail Table */
.audit-trail-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.audit-trail-header {
  padding: 1.25rem 1.5rem;
  background: rgba(239, 246, 255, 0.6);
  border-bottom: 1px solid rgba(37, 99, 235, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.audit-badge-override {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
}

/* 2. Travel & Overtime (OT) Specific Styles */
.ot-calculator-card {
  background: #ffffff;
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.ot-meter-container {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1.5px solid #93c5fd;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.ot-meter-dial {
  text-align: center;
  min-width: 140px;
}

.ot-meter-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1;
}

.ot-meter-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.ot-meter-bar-wrap {
  flex: 1;
}

.ot-bar-track {
  width: 100%;
  height: 14px;
  background: #bfdbfe;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.ot-bar-fill {
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
  transition: width 0.6s ease;
}

.policy-check-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

/* 3. Letter Request Workflow Styles */
.letter-action-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.letter-email-preview-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.dispatch-at-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.2s;
}

.dispatch-at-btn:hover {
  background: #1d4ed8;
}

/* Letterhead Sheet in Modal (Official Printable Document) */
.official-letterhead-sheet {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 3rem 3.5rem;
  font-family: 'Times New Roman', Georgia, serif;
  color: #0f172a;
  line-height: 1.6;
  position: relative;
  min-height: 600px;
}

.official-letterhead-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #1e3a8a;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.letterhead-gov-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.letterhead-dept-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.letterhead-ref-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #334155;
}

.letterhead-title-subject {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: #1e3a8a;
  margin-bottom: 1.75rem;
  letter-spacing: 0.02em;
}

.letterhead-body-text {
  font-size: 0.95rem;
  text-align: justify;
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

.letterhead-signature-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 3.5rem;
  padding-top: 1rem;
}

.official-seal-stamp {
  border: 2px dashed #2563eb;
  border-radius: 50%;
  width: 90px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 900;
  color: #2563eb;
  text-transform: uppercase;
  transform: rotate(-8deg);
  background: rgba(239, 246, 255, 0.4);
}

.qr-verification-box {
  border: 1px solid #cbd5e1;
  padding: 0.4rem;
  background: #f8fafc;
  border-radius: 4px;
  text-align: center;
}

/* Inline Annual Quota Editing in Table */
.inline-quota-input {
  width: 78px;
  padding: 0.35rem 0.5rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: #1e3a8a;
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(30, 58, 138, 0.05);
}

.inline-quota-input:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.inline-quota-input:focus {
  outline: none;
  border-color: #1e3a8a;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.inline-quota-unit {
  position: absolute;
  right: 6px;
  pointer-events: none;
  font-size: 0.65rem;
  font-weight: 700;
  color: #3b82f6;
}

.btn-save-quota {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 800;
  background: #1e3a8a;
  color: #ffffff;
  border: 1px solid #1e3a8a;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.btn-save-quota:hover {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

.btn-save-quota:active {
  transform: translateY(0);
}

/* Hide HR Admin Lifecycle Flow Tracker on Managed Workflow views:
   Leave Adjustments, Travel & OT, Letter Requests, and Attendance Record */
body[data-active-view="leave-management"] #workflow-tracker-card,
body[data-active-view="leave-management"] .workflow-tracker-card,
body[data-active-view="travel-ot"] #workflow-tracker-card,
body[data-active-view="travel-ot"] .workflow-tracker-card,
body[data-active-view="letter-requests"] #workflow-tracker-card,
body[data-active-view="letter-requests"] .workflow-tracker-card,
body[data-active-view="attendance"] #workflow-tracker-card,
body[data-active-view="attendance"] .workflow-tracker-card {
  display: none !important;
}

/* Attendance Status Badges & Device Pills */
.badge-present {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-late {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-leave {
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-halfday {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-absent {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.att-device-pill {
  font-family: inherit;
  font-size: 0.72rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}

/* ========================================================================== */
/* FLUID FULL-WIDTH LAYOUT ENHANCEMENTS FOR ATTENDANCE, RECRUITMENT & LETTERS */
/* ========================================================================== */

/* Attendance Record Page Full-Width Adjustments */
#view-attendance {
  width: 100%;
}

#view-attendance .audit-trail-card {
  width: 100%;
}

#view-attendance .metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 1.15rem;
}

@media (max-width: 1380px) {
  #view-attendance .metrics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  #view-attendance .metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Interactive Attendance Tiles */
.att-interactive-tile {
  cursor: pointer !important;
  position: relative !important;
  user-select: none;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
}

.att-interactive-tile:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.12) !important;
  border-color: #3b82f6 !important;
}

.att-interactive-tile:active {
  transform: translateY(-1px) !important;
}

/* Selected Active Tile */
.att-interactive-tile.selected-tile {
  border-color: #2563eb !important;
  background: #f0f7ff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25), 0 8px 24px rgba(30, 58, 138, 0.14) !important;
  transform: translateY(-2px) !important;
}

.att-interactive-tile.selected-tile .tile-click-badge {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border-color: #1e3a8a !important;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.35);
}

.att-interactive-tile .tile-click-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  font-size: 0.63rem;
  font-weight: 800;
  color: #1e3a8a;
  background: rgba(37, 99, 235, 0.08);
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  display: flex;
  align-items: center;
  gap: 2px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.att-interactive-tile:hover .tile-click-badge {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Inline Tile Breakdown Detail Card (Below tiles) */
.att-inline-detail-card {
  background: #ffffff;
  border: 1.5px solid #93c5fd;
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.09);
  overflow: hidden;
  animation: attPanelFade 0.22s ease-out;
}

@keyframes attPanelFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Category Tab Buttons Inside Inline Panel */
.att-panel-tab-btn,
.att-modal-tab-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease-in-out;
}

.att-panel-tab-btn:hover,
.att-modal-tab-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.att-panel-tab-btn.active,
.att-modal-tab-btn.active {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.att-panel-tab-btn.active span,
.att-modal-tab-btn.active span {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

#view-attendance .data-table th,
#view-attendance .data-table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
  padding: 0.7rem 0.55rem;
  font-size: 0.78rem;
}

#view-attendance .table-responsive {
  overflow-x: hidden;
}

#view-attendance .data-table {
  table-layout: fixed;
  width: 100%;
}

#view-attendance .att-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}

#view-attendance .att-actions .btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
}

/* Recruitment — fit table inside shared content width (no horizontal scroll) */
#view-recruitment {
  width: 100%;
}

#view-recruitment .table-card {
  width: 100%;
  max-width: 100%;
}

#view-recruitment .table-responsive {
  overflow-x: hidden;
}

#view-recruitment .data-table {
  table-layout: fixed;
  width: 100%;
}

#view-recruitment .data-table th,
#view-recruitment .data-table td {
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
  padding: 0.75rem 0.65rem;
}

#view-recruitment .data-table th:nth-child(1),
#view-recruitment .data-table td:nth-child(1) { width: 16%; }
#view-recruitment .data-table th:nth-child(2),
#view-recruitment .data-table td:nth-child(2) { width: 14%; }
#view-recruitment .data-table th:nth-child(3),
#view-recruitment .data-table td:nth-child(3) { width: 8%; }
#view-recruitment .data-table th:nth-child(4),
#view-recruitment .data-table td:nth-child(4) { width: 10%; }
#view-recruitment .data-table th:nth-child(5),
#view-recruitment .data-table td:nth-child(5) { width: 16%; }
#view-recruitment .data-table th:nth-child(6),
#view-recruitment .data-table td:nth-child(6) { width: 10%; }
#view-recruitment .data-table th:nth-child(7),
#view-recruitment .data-table td:nth-child(7) { width: 12%; }
#view-recruitment .data-table th:nth-child(8),
#view-recruitment .data-table td:nth-child(8) { width: 14%; }

#view-recruitment .req-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}

#view-recruitment .req-actions .btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
}

/* Letter Requests — fit inside shared 1440px content width */
#view-letter-requests {
  width: 100%;
}

#view-letter-requests .workflow-role-banner {
  width: 100%;
}

#view-letter-requests .audit-trail-card {
  width: 100%;
  max-width: 100%;
}

#view-letter-requests .table-responsive {
  overflow-x: hidden;
}

#view-letter-requests .data-table {
  table-layout: fixed;
  width: 100%;
}

#view-letter-requests .data-table th,
#view-letter-requests .data-table td {
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
  padding: 0.7rem 0.55rem;
  font-size: 0.78rem;
}

#view-letter-requests .letter-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}

#view-letter-requests .letter-actions .btn,
#view-letter-requests .letter-actions .dispatch-at-btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

/* Travel & OT — fit inside shared 1440px content width */
#view-travel-ot {
  width: 100%;
}

#view-travel-ot .audit-trail-card {
  width: 100%;
  max-width: 100%;
}

#view-travel-ot .travel-ot-kpi-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1100px) {
  #view-travel-ot .travel-ot-kpi-grid {
    grid-template-columns: 1fr;
  }
}

#view-travel-ot .table-responsive {
  overflow-x: hidden;
}

#view-travel-ot .data-table {
  table-layout: fixed;
  width: 100%;
}

#view-travel-ot .data-table th,
#view-travel-ot .data-table td {
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
  padding: 0.65rem 0.45rem;
  font-size: 0.76rem;
}

#view-travel-ot .data-table th:nth-child(1),
#view-travel-ot .data-table td:nth-child(1) { width: 9%; }
#view-travel-ot .data-table th:nth-child(2),
#view-travel-ot .data-table td:nth-child(2) { width: 12%; }
#view-travel-ot .data-table th:nth-child(3),
#view-travel-ot .data-table td:nth-child(3) { width: 13%; }
#view-travel-ot .data-table th:nth-child(4),
#view-travel-ot .data-table td:nth-child(4) { width: 10%; }
#view-travel-ot .data-table th:nth-child(5),
#view-travel-ot .data-table td:nth-child(5) { width: 8%; }
#view-travel-ot .data-table th:nth-child(6),
#view-travel-ot .data-table td:nth-child(6) { width: 8%; }
#view-travel-ot .data-table th:nth-child(7),
#view-travel-ot .data-table td:nth-child(7) { width: 8%; }
#view-travel-ot .data-table th:nth-child(8),
#view-travel-ot .data-table td:nth-child(8) { width: 9%; }
#view-travel-ot .data-table th:nth-child(9),
#view-travel-ot .data-table td:nth-child(9) { width: 11%; }
#view-travel-ot .data-table th:nth-child(10),
#view-travel-ot .data-table td:nth-child(10) { width: 12%; }

#view-travel-ot .policy-check-badge {
  white-space: normal;
  max-width: 100%;
  font-size: 0.68rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.25;
}

#view-travel-ot .travel-ot-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}

#view-travel-ot .travel-ot-actions .btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
}

/* Leave Management — no horizontal table scroll */
#view-leave-management .table-responsive {
  overflow-x: hidden;
}

#view-leave-management .data-table {
  table-layout: fixed;
  width: 100%;
}

#view-leave-management .data-table th,
#view-leave-management .data-table td {
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
  padding: 0.7rem 0.55rem;
  font-size: 0.78rem;
}

#view-leave-management .leave-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}

#view-leave-management .leave-actions .btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
}

/* Employee Profile Dossier (sidebar View Profile) */
#view-profile {
  width: 100%;
}

.profile-dossier-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #1d4ed8 100%);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 10px 28px rgba(30, 58, 138, 0.28);
}

.profile-dossier-banner-main {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.profile-dossier-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.profile-dossier-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.profile-dossier-kpi {
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.06);
}

.profile-dossier-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-dossier-kpi-value {
  margin-top: 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading);
}

.profile-dossier-kpi-value span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .profile-dossier-kpis {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   EMPLOYEE PROFILE WORKSPACE & DOSSIER (EXECUTIVE SUITE)
   ========================================================================== */
.profile-hero-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 45%, #eff6ff 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  color: #1e293b;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(30, 58, 138, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.profile-hero-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.profile-hero-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.profile-avatar-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.22);
  border: 3.5px solid #dbeafe;
  flex-shrink: 0;
}

.profile-hero-meta h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-hero-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.profile-hero-tag {
  background: #ffffff;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e3a8a;
  border: 1.5px solid #dbeafe;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.profile-hero-tag .hero-field-title {
  color: #64748b;
  font-weight: 600;
  margin-right: 0.25rem;
}

.profile-hero-contact {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #64748b;
  flex-wrap: wrap;
}

.profile-hero-contact strong,
.profile-hero-contact span {
  color: #334155;
}

.profile-hero-contact .hero-contact-label {
  color: #64748b;
  font-weight: 600;
  margin-right: 0.2rem;
}

.profile-hero-contact #emp-profile-email {
  color: #1e3a8a !important;
}

.profile-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

/* Profile Switcher Box */
.profile-switcher-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.profile-switcher-box label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
}

.profile-switcher-box select {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e3a8a;
  border: 1.5px solid #93c5fd;
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  background: #ffffff;
}

/* Profile Nav Tabs — fit inside content width, no horizontal scrollbar */
.profile-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-bottom: 2px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 1.5rem;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-bottom: 2px;
}

.profile-tab-btn {
  background: transparent;
  border: none;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 8px 8px 0 0;
  position: relative;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

.profile-tab-btn > span:not(.profile-tab-badge) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-tab-btn:hover {
  color: #1e3a8a;
  background: rgba(37, 99, 235, 0.05);
}

.profile-tab-btn.active {
  color: #1e3a8a;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(30, 58, 138, 0.06);
}

.profile-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #2563eb;
  border-radius: 3px 3px 0 0;
}

.profile-tab-badge {
  background: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  flex-shrink: 0;
}

.profile-tab-pane {
  display: none;
}

.profile-tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

#view-employee-profile {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.profile-metrics-strip {
  display: none !important;
}

/* Modules hidden from Employee account */
body[data-role="employee"] .emp-hide-module,
body[data-role="supervisor"] .emp-hide-module,
.role-employee .emp-hide-module {
  display: none !important;
}

#view-employee-profile .table-responsive {
  overflow-x: hidden;
  border-color: #1e3a8a !important;
}

/* ==========================================================================
   ALL TABLE BOUNDARIES IN EMPLOYEE ACCOUNT / PROFILE (#1e3a8a)
   ========================================================================== */
#view-employee-profile table,
#view-employee-profile .data-table,
#view-employee-profile .work-history-table,
body[data-role="employee"] table,
body[data-role="employee"] .data-table,
body[data-role="employee"] .work-history-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse !important;
  border: 1.5px solid #1e3a8a !important;
}

#view-employee-profile table thead,
#view-employee-profile .data-table thead,
#view-employee-profile .work-history-table thead,
body[data-role="employee"] table thead,
body[data-role="employee"] .data-table thead,
body[data-role="employee"] .work-history-table thead {
  border-bottom: 2px solid #1e3a8a !important;
}

#view-employee-profile table th,
#view-employee-profile .data-table th,
#view-employee-profile .work-history-table th,
body[data-role="employee"] table th,
body[data-role="employee"] .data-table th,
body[data-role="employee"] .work-history-table th {
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
  padding: 0.7rem 0.55rem;
  font-size: 0.78rem;
  border: 1px solid #1e3a8a !important;
  border-bottom: 2px solid #1e3a8a !important;
}

#view-employee-profile table td,
#view-employee-profile .data-table td,
#view-employee-profile .work-history-table td,
body[data-role="employee"] table td,
body[data-role="employee"] .data-table td,
body[data-role="employee"] .work-history-table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
  padding: 0.7rem 0.55rem;
  font-size: 0.78rem;
  border: 1px solid #1e3a8a !important;
}

#view-employee-profile table tbody tr,
#view-employee-profile .data-table tbody tr,
#view-employee-profile .work-history-table tbody tr,
body[data-role="employee"] table tbody tr,
body[data-role="employee"] .data-table tbody tr,
body[data-role="employee"] .work-history-table tbody tr {
  border-bottom: 1px solid #1e3a8a !important;
}

/* Profile detail info cards — proper gaps & padding */
.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
}

.profile-detail-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#view-employee-profile .profile-detail-card,
body[data-role="employee"] .profile-detail-card {
  border: 1.5px solid #1e3a8a !important;
}

.profile-detail-card-header {
  padding: 1.15rem 1.5rem;
  background: rgba(239, 246, 255, 0.65);
  border-bottom: 1.5px solid rgba(37, 99, 235, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

#view-employee-profile .profile-detail-card-header,
body[data-role="employee"] .profile-detail-card-header {
  border-bottom: 1.5px solid #1e3a8a !important;
}

#view-employee-profile .audit-trail-card,
body[data-role="employee"] .audit-trail-card {
  border: 1.5px solid #1e3a8a !important;
}

#view-employee-profile .audit-trail-header,
body[data-role="employee"] .audit-trail-header {
  border-bottom: 1.5px solid #1e3a8a !important;
}

.profile-detail-card-header--green {
  background: rgba(16, 185, 129, 0.06);
  border-bottom-color: rgba(16, 185, 129, 0.2);
}

.profile-detail-card-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.profile-detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  padding: 1.35rem 1.5rem 1.5rem;
  box-sizing: border-box;
}

.profile-detail-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-detail-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.profile-detail-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.4;
  word-break: break-word;
}

.profile-detail-value--accent {
  color: #0284c7;
}

.profile-detail-value--link {
  color: #2563eb;
}

.profile-detail-sub {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 0.15rem;
  line-height: 1.35;
}

.profile-detail-card--wide {
  grid-column: 1 / -1;
}

@media (max-width: 960px) {
  .profile-detail-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .profile-detail-fields {
    gap: 1.1rem 1.25rem;
    padding: 1.15rem 1.25rem 1.35rem;
  }
}

/* Punch Console */
.punch-console-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.punch-live-clock {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1e3a8a;
  font-family: monospace;
  line-height: 1;
}

.punch-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 800;
}

.punch-btn-in {
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  transition: all var(--transition-fast);
}

.punch-btn-in:hover {
  background: #047857;
  transform: translateY(-1px);
}

.punch-btn-out {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
  transition: all var(--transition-fast);
}

.punch-btn-out:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* ==========================================================================
   AUTHENTICATION & PORTAL SESSION STYLES (EMPLOYEE VS HR ADMIN)
   ========================================================================== */
.user-portal-status-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.user-portal-status-pill.employee {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.05);
}

.user-portal-status-pill.admin {
  border-color: rgba(15, 23, 42, 0.25);
  background: rgba(15, 23, 42, 0.03);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-indicator-dot.online {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.status-indicator-dot.admin {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.7);
}

.portal-role-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.portal-empid-tag {
  font-family: monospace;
  font-size: 0.74rem;
  background: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.login-tab-btn {
  color: #94a3b8;
  background: transparent;
  border: none;
}

.login-tab-btn.active {
  background: #ffffff !important;
  color: #1e3a8a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.employee-quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.employee-quick-card:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateX(2px);
}

.employee-quick-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1.5px #2563eb;
}

.employee-quick-card .emp-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.employee-quick-card .emp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.nav-section-title.portal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   ATTENDANCE MONTHLY CALENDAR STYLES (EXECUTIVE ROYAL PALETTE)
   ========================================================================== */
.cal-day-name {
  font-size: 0.74rem;
  font-weight: 800;
  color: #475569;
  padding: 0.5rem 0.25rem;
  background: #f1f5f9;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.cal-day-name.weekend {
  color: #94a3b8;
  background: #f8fafc;
}

.att-cal-day {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.55rem;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.att-cal-day:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.att-cal-day.selected {
  border-color: #1e3a8a !important;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.25), 0 4px 16px rgba(30, 58, 138, 0.15) !important;
  background: #f0f7ff !important;
}

.att-cal-day.is-today {
  border-color: #2563eb;
  background: #fafcff;
}

.att-cal-day.is-today::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #10b981);
}

.att-cal-day.other-month {
  background: #f8fafc;
  border-color: #f1f5f9;
  opacity: 0.4;
  cursor: default;
}

.att-cal-day.other-month:hover {
  transform: none;
  border-color: #f1f5f9;
  box-shadow: none;
}

.att-cal-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.att-cal-day-num {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
}

.att-cal-day.is-today .att-cal-day-num {
  color: #1d4ed8;
}

.att-cal-badge-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
}

.att-cal-badge-present {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.att-cal-badge-late {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.att-cal-badge-leave {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.att-cal-badge-absent {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.att-cal-badge-weekend {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.att-cal-badge-future {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
}

.att-cal-time-row {
  font-size: 0.7rem;
  font-weight: 700;
  color: #334155;
  margin-top: 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.att-cal-hours-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #1e3a8a;
  background: rgba(30, 58, 138, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.btn-cal-view-toggle {
  transition: all 0.15s ease;
}

@media (max-width: 900px) {
  .att-cal-day {
    min-height: 75px;
    padding: 0.35rem;
  }
  .att-cal-time-row {
    font-size: 0.62rem;
  }
}

/* ==========================================================================
   EMPLOYEE PROFILE 7-SUBTABS NAVIGATION BAR (EXACT SPECIFICATION)
   ========================================================================== */
.emp-profile-subtabs-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.emp-profile-subtabs-nav {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #ffffff;
  border-bottom: 1.5px solid #e2e8f0;
  min-height: 56px;
}

.emp-subtab-btn {
  background: #ffffff;
  border: none;
  border-right: 1px solid #f1f5f9;
  padding: 0.65rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  text-decoration: none;
  user-select: none;
}

.emp-subtab-btn:last-child {
  border-right: none;
}

.emp-subtab-btn .subtab-text-line {
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  text-align: center;
  line-height: 1.28;
  transition: color 0.15s ease;
}

.emp-subtab-btn:hover {
  background: #f8fafc;
}

.emp-subtab-btn:hover .subtab-text-line {
  color: #0369a1;
}

.emp-subtab-btn.active {
  background: #ffffff;
}

.emp-subtab-btn.active .subtab-text-line {
  color: #0369a1;
  font-weight: 700;
}

.emp-subtab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: #0369a1;
  border-radius: 2px 2px 0 0;
}

.emp-subtab-pane {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.emp-subtab-pane.active {
  display: block;
}

@media (max-width: 900px) {
  .emp-profile-subtabs-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* Stacked layout for Personal Information & Contact Details (Up / Down) */
.profile-detail-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.profile-detail-fields--grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem 1.5rem;
  padding: 1.35rem 1.5rem 1.5rem;
}

@media (max-width: 1200px) {
  .profile-detail-fields--grid4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .profile-detail-fields--grid4 {
    grid-template-columns: 1fr;
  }
}

/* Official Work History Table (Matches PITB / Govt HRMIS format) */
.work-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  background: #ffffff;
  border: 1.5px solid #1e3a8a;
}

.work-history-table th {
  background: #f8fafc;
  color: #1e3a8a;
  font-weight: 700;
  border: 1px solid #1e3a8a;
  border-bottom: 2px solid #1e3a8a;
  padding: 0.85rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.work-history-table td {
  border: 1px solid #1e3a8a;
  padding: 0.85rem 1rem;
  color: #475569;
  font-weight: 400;
  vertical-align: middle;
}

.work-history-table tbody tr:hover {
  background: #f8fafc;
}

/* Add Education Modal & Button */
#modal-add-education .modal-content {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

#modal-add-education select,
#modal-add-education input[type="text"] {
  border: 1px solid #d2d6de;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#modal-add-education select:focus,
#modal-add-education input[type="text"]:focus {
  border-color: #00bcd4;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

#btn-open-add-education:hover {
  background: #00acc1 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 188, 212, 0.4) !important;
}

@media (max-width: 768px) {
  #modal-add-education .modal-body > div {
    grid-template-columns: 1fr !important;
  }
}

/* Add Dependent Modal & Button */
#modal-add-dependent .modal-content {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

#modal-add-dependent select,
#modal-add-dependent input[type="text"] {
  border: 1px solid #d2d6de;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#modal-add-dependent select:focus,
#modal-add-dependent input[type="text"]:focus {
  border-color: #00bcd4;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

#modal-add-dependent .modal-header .modal-close-btn:hover {
  background: #bd2130 !important;
  transform: scale(1.05);
}

#btn-open-add-dependent:hover {
  background: #00acc1 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 188, 212, 0.4) !important;
}

#modal-add-dependent button[type="submit"]:hover {
  background: #172554 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.4) !important;
}

@media (max-width: 768px) {
  #modal-add-dependent .modal-body > div {
    grid-template-columns: 1fr !important;
  }
}

/* Certifications and Training Add Record Buttons & Modals */
#btn-add-certification:hover {
  background: #172554 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.4) !important;
}

#btn-add-training:hover {
  background: #172554 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.4) !important;
}

#modal-add-certification input[type="text"]:focus {
  border-color: #1e3a8a !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2) !important;
}

#modal-add-training input[type="text"]:focus {
  border-color: #1e3a8a !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2) !important;
}

#modal-add-certification .modal-header .modal-close-btn:hover,
#modal-add-training .modal-header .modal-close-btn:hover {
  background: #bd2130 !important;
  transform: scale(1.05);
}

#modal-add-certification button[type="submit"]:hover {
  background: #172554 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.45) !important;
}

#modal-add-training button[type="submit"]:hover {
  background: #172554 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.45) !important;
}

@media (max-width: 768px) {
  #modal-add-certification .modal-body > div,
  #modal-add-training .modal-body > div {
    grid-template-columns: 1fr !important;
  }
}

.btn-delete-dossier-doc:hover,
button[onclick*="deleteDocFromProfile"]:hover,
button[onclick*="clearDocCategoryFile"]:hover {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
  color: #be123c !important;
  transform: translateY(-1px);
}

/* Upload Document Modal & Searchable Select Dropdown */
#btn-open-upload-document:hover,
#btn-top-upload-doc:hover {
  background: #00acc1 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 188, 212, 0.45) !important;
}

#doc-type-trigger:hover {
  border-color: #00bcd4 !important;
}

#doc-type-trigger.open {
  border-color: #00bcd4 !important;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2) !important;
}

#doc-type-search-input:focus {
  border-color: #00bcd4 !important;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2) !important;
}

.doc-type-option {
  transition: background-color 0.15s ease, color 0.15s ease;
}

.doc-type-option:hover {
  background-color: #f0fdfa !important;
  color: #00bcd4 !important;
}

.doc-type-option.selected {
  background-color: #e0f7fa !important;
  color: #00838f !important;
  font-weight: 600 !important;
}

#modal-upload-document .modal-header .modal-close-btn:hover {
  background: #bd2130 !important;
  transform: scale(1.05);
}

#modal-upload-document button[type="submit"]:hover {
  background: #e04836 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(240, 90, 72, 0.45) !important;
}

@media (max-width: 768px) {
  #modal-upload-document .modal-body > div {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   PORTAL STANDARD EMPLOYEE PROFILE CARD (GOVERNMENT / PITB DOSSIER SPEC)
   ========================================================================== */
.emp-portal-card {
  background: #ffffff;
  border: 1.5px solid #1e3a8a;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: 390px 1fr;
  align-items: stretch;
}

.emp-portal-left {
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-right: 1.5px solid #1e3a8a;
}

.emp-portal-avatar-box {
  width: 115px;
  height: 125px;
  flex-shrink: 0;
  border: 1px solid #1e3a8a;
  border-radius: 4px;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emp-portal-avatar-photo {
  width: 100%;
  height: 100%;
}

#emp-profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

.emp-portal-identity {
  flex: 1;
  min-width: 0;
}

#link-change-password {
  transition: color 0.15s ease;
}

#link-change-password:hover {
  text-decoration: underline !important;
  color: #0369a1 !important;
}

.emp-portal-right {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.emp-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  height: 100%;
}

.emp-grid-cell {
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: 1px solid #1e3a8a;
  border-bottom: 1px solid #1e3a8a;
}

.emp-grid-cell:nth-child(3n) {
  border-right: none;
}

.emp-grid-cell:nth-child(n+7) {
  border-bottom: none;
}

.emp-grid-cell .cell-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
}

.emp-grid-cell .cell-divider {
  width: 75%;
  height: 1px;
  background: #1e3a8a;
  margin: 0.15rem auto 0.25rem auto;
}

.emp-grid-cell .cell-lbl {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}

#modal-change-password button[type="submit"]:hover {
  background: #0369a1 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4) !important;
}

@media (max-width: 992px) {
  .emp-portal-card {
    grid-template-columns: 1fr;
  }
  .emp-portal-left {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
}

@media (max-width: 640px) {
  .emp-portal-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .emp-portal-contact-table {
    justify-content: center;
  }
  .emp-portal-grid {
    grid-template-columns: 1fr;
  }
  .emp-grid-cell {
    border-right: none;
  }
}

/* Employee Comprehensive Record (Matched to Official Reference Document) */
.comprehensive-record-field {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.comprehensive-record-field:hover {
  border-color: #94a3b8;
}

.comprehensive-record-field .field-hdr {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.comprehensive-record-field .field-val {
  font-size: 0.88rem;
  color: #1e293b;
  font-weight: 600;
  min-height: 1.25rem;
  word-break: break-word;
}

/* ==========================================================================
   HR ADMIN DOCUMENTS REPOSITORY (FOLDER-STYLE STRUCTURE)
   ========================================================================== */
#view-documents {
  width: 100%;
}

.docs-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg, 8px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 2rem;
}

.docs-root-folder-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  padding: 1.15rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.docs-root-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.docs-root-folder-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.docs-root-folder-name {
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, monospace;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.docs-root-path {
  font-size: 0.78rem;
  color: #bfdbfe;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
  font-family: monospace;
}

.docs-toolbar-bar {
  padding: 0.9rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.docs-search-box {
  position: relative;
  min-width: 280px;
  max-width: 420px;
  flex: 1;
}

.docs-search-box input {
  width: 100%;
  padding: 0.5rem 0.85rem 0.5rem 2.2rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #ffffff;
  color: #1e293b;
  outline: none;
  transition: all 0.2s ease;
}

.docs-search-box input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.docs-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.docs-tree-container {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Individual Employee Folder Node */
.docs-emp-node {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  transition: all 0.2s ease;
  overflow: hidden;
}

.docs-emp-node:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.docs-emp-node.expanded {
  border-color: #3b82f6;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.1);
}

.docs-emp-header {
  padding: 0.85rem 1.15rem;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
  gap: 0.75rem;
}

.docs-emp-node.expanded .docs-emp-header {
  background: #f0f7ff;
  border-bottom: 1px solid #bfdbfe;
}

.docs-emp-header:hover {
  background: #f8fafc;
}

.docs-emp-node.expanded .docs-emp-header:hover {
  background: #e6f0fd;
}

.docs-emp-folder-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.docs-caret-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-weight: 800;
  font-size: 0.72rem;
  background: rgba(37, 99, 235, 0.08);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.docs-emp-node.expanded .docs-caret-btn {
  transform: rotate(90deg);
  background: #2563eb;
  color: #ffffff;
}

.docs-folder-glyph {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.docs-emp-folder-name {
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, monospace;
  font-weight: 800;
  font-size: 0.98rem;
  color: #1e3a8a;
  background: rgba(37, 99, 235, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}

.docs-emp-info-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-emp-info-text {
  font-size: 0.85rem;
  color: #334155;
  font-weight: 700;
}

.docs-emp-meta-dept {
  color: #64748b;
  font-weight: 400;
  font-size: 0.78rem;
}

.docs-emp-folder-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.docs-count-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  white-space: nowrap;
}

.docs-emp-node.expanded .docs-count-pill {
  background: #2563eb;
  color: #ffffff;
}

/* Document rows inside folder */
.docs-files-container {
  padding: 0.85rem 1.15rem 1rem 1.15rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.docs-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  background: #f8fafc;
  transition: all 0.15s ease;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.docs-file-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.docs-file-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 280px;
}

.docs-pdf-badge {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.docs-file-main-info {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.docs-file-line {
  font-size: 0.86rem;
  color: #1e293b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.docs-filename-text {
  color: #0f172a;
  font-family: inherit;
  font-weight: 700;
}

.docs-uploader-sep {
  color: #94a3b8;
  font-weight: 400;
}

.docs-uploader-text {
  color: #2563eb;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.78rem;
}

.docs-file-submeta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  color: #64748b;
}

.docs-file-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.docs-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.6rem;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition: all 0.15s ease;
}

.docs-file-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.docs-file-btn.btn-view {
  color: #1e3a8a;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.docs-file-btn.btn-view:hover {
  background: #dbeafe;
}

.docs-file-btn.btn-download {
  color: #059669;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.docs-file-btn.btn-download:hover {
  background: #d1fae5;
}

.docs-file-btn.btn-delete {
  color: #e11d48;
  background: #fff1f2;
  border-color: #fecdd3;
}
.docs-file-btn.btn-delete:hover {
  background: #ffe4e6;
}


