/* ══════════════════════════════════════════════════════════════════════════
   SkillBridge AI / GAPLOW — HR Admin Records Portal
   Theme: Crisp Executive Light Theme (Pure White Canvas, High Contrast Slate)
   No Dark Mode — Dedicated Admin Landing Page Stylesheet
   ══════════════════════════════════════════════════════════════════════════ */

/* Admin View Canvas */
.admin-view {
  padding: 28px 36px 60px 36px;
  background-color: #DDE9E3;
  min-height: calc(100vh - 64px);
  color: #0F172A;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
}

/* Admin Sidebar Mode (Attached #F0F5F2 Theme with Dark Black Text) */
aside.sidebar.admin-sidebar-mode {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  background: #F0F5F2 !important;
  border-right: 1px solid #CBD5E1 !important;
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.03) !important;
  padding: 24px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  transition: width 0.2s ease !important;
}

.main-wrapper.admin-layout-adjusted {
  margin-left: 240px !important;
}

aside.sidebar.admin-sidebar-mode .sidebar-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding: 0 !important;
  overflow: visible !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-link {
  display: block !important;
  width: 100% !important;
  padding: 11px 16px !important;
  border-radius: 4px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #000000 !important; /* Dark black module text */
  text-decoration: none !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-link:hover {
  background: #E2ECE5 !important;
  color: #000000 !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-link.active {
  background: #DDE9E2 !important;
  color: #000000 !important;
  border: 1px solid #748636 !important;
  font-weight: 800 !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-subgroup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 14px;
  padding-left: 10px;
  border-left: 2px solid #CBD5E1;
  margin-top: 4px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-subgroup.open {
  display: flex !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-subgroup.collapsed {
  display: none !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-link .chevron-icon {
  font-size: 16px;
  color: #000000 !important;
  transition: transform 0.2s ease;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-sublink {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #000000 !important; /* Dark black module sublink text */
  text-decoration: none !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-sublink .material-symbols-outlined {
  font-size: 16px !important;
  color: #000000 !important; /* Dark black icon */
  transition: color 0.15s ease !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-sublink:hover {
  background: #E2ECE5 !important;
  color: #000000 !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-sublink:hover .material-symbols-outlined {
  color: #000000 !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-sublink.active {
  background: #DDE9E2 !important;
  color: #000000 !important;
  border: 1px solid #748636 !important;
  font-weight: 800 !important;
}

aside.sidebar.admin-sidebar-mode .admin-sidebar-sublink.active .material-symbols-outlined {
  color: #000000 !important;
}

/* Page Header */
.admin-page-header {
  margin-bottom: 24px;
}

.admin-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.admin-page-title {
  font-size: 24px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 0;
}

.admin-page-subtitle {
  font-size: 13.5px;
  color: #64748B;
  margin: 0;
}

/* Toolbar & Filter Bar */
.admin-toolbar-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-search-box {
  position: relative;
  flex: 1 1 580px;
  min-width: 540px;
  max-width: 680px;
}

@media (max-width: 768px) {
  .admin-search-box {
    min-width: 100%;
    max-width: 100%;
  }
}

.admin-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 19px;
  pointer-events: none;
}

.admin-search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-search-input:focus {
  border-color: #748636;
  box-shadow: 0 0 0 3px rgba(116, 134, 54, 0.15);
}

.admin-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-select {
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.admin-select:focus {
  border-color: #748636;
}

.admin-select optgroup {
  font-weight: 700;
  color: #0F172A;
  background: #F8FAFC;
  padding: 6px 4px;
}

.admin-select option {
  font-weight: 400;
  color: #334155;
  background: #FFFFFF;
  padding: 4px 6px;
}

.admin-count-pill {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #F1F5F9;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #E2E8F0;
  white-space: nowrap;
}

/* Records Table Card */
.admin-table-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  overflow: visible;
}

.admin-table-container {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.admin-table th {
  background: #F8FAFC;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  border-bottom: 2px solid #E2E8F0;
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
  color: #334155;
  vertical-align: middle;
  background: #FFFFFF;
  transition: background-color 0.12s ease;
}

.admin-table tr:hover td {
  background-color: #F8FAFC;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

/* Columns formatting */
.emp-id-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: #5F6F2A;
  white-space: nowrap;
}

.emp-name-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.emp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.emp-name-info {
  display: flex;
  flex-direction: column;
}

.emp-full-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0F172A;
}

.emp-email {
  font-size: 11.5px;
  color: #64748B;
}

.emp-unit {
  font-weight: 500;
  color: #1E293B;
}

.emp-job-title {
  font-weight: 500;
  color: #334155;
}

.emp-manager {
  color: #475569;
  font-weight: 500;
}

/* Status Badges */
.admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.admin-status-badge.active {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.admin-status-badge.inactive {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
}

.admin-status-badge.suspended {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.admin-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.admin-status-badge.active .admin-status-dot {
  background: #16A34A;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.admin-status-badge.inactive .admin-status-dot {
  background: #94A3B8;
}

.admin-status-badge.suspended .admin-status-dot {
  background: #D97706;
}

/* ══════════════════════════════════════════════════════════════════════════
   Actions Column Hover Dropdown & Submenu
   ══════════════════════════════════════════════════════════════════════════ */
.admin-action-cell {
  position: relative;
  text-align: right;
  white-space: nowrap;
}

.admin-action-wrapper {
  position: relative;
  display: inline-block;
}

.admin-action-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-action-wrapper:hover .admin-action-trigger,
.admin-action-wrapper.is-open .admin-action-trigger {
  background: #F8FAFC;
  border-color: #748636;
  color: #5F6F2A;
  box-shadow: 0 1px 3px rgba(116, 134, 54, 0.15);
}

/* Popover list on hover */
.admin-action-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 210px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  padding: 6px;
  z-index: 1000;
  text-align: left;
}

.admin-action-wrapper:hover .admin-action-menu,
.admin-action-wrapper:focus-within .admin-action-menu,
.admin-action-wrapper.is-open .admin-action-menu {
  display: block;
}

.admin-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.admin-action-item:hover {
  background-color: #F1F5F9;
  color: #0F172A;
}

.admin-action-item .material-symbols-outlined {
  font-size: 18px;
  color: #64748B;
  transition: color 0.12s ease;
}

.admin-action-item:hover .material-symbols-outlined {
  color: #748636;
}

.admin-action-item.danger-item:hover {
  background-color: #FEF2F2;
  color: #DC2626;
}

.admin-action-item.danger-item:hover .material-symbols-outlined {
  color: #DC2626;
}

/* Submenu trigger for Deactivate */
.admin-submenu-trigger {
  position: relative;
  width: 100%;
}

.admin-submenu {
  display: none;
  position: absolute;
  top: 0;
  right: calc(100% + 4px);
  width: 240px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.14), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 6px;
  z-index: 1001;
}

.admin-submenu-trigger:hover .admin-submenu {
  display: block;
}

.admin-subitem {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.admin-subitem:hover {
  background: #FEF2F2;
}

.admin-subitem-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0F172A;
  display: block;
  line-height: 1.2;
}

.admin-subitem-desc {
  font-size: 11px;
  color: #64748B;
  display: block;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Light Theme Modals for Admin Actions
   ══════════════════════════════════════════════════════════════════════════ */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.admin-modal-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: adminModalFadeIn 0.18s ease-out;
}

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

.admin-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
}

.admin-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #64748B;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.admin-modal-close-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

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

.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.admin-field {
  margin-bottom: 16px;
}

.admin-field:last-child {
  margin-bottom: 0;
}

.admin-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.admin-field-input,
.admin-field-select,
.admin-field-textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-field-input:focus,
.admin-field-select:focus,
.admin-field-textarea:focus {
  border-color: #748636;
  box-shadow: 0 0 0 3px rgba(116, 134, 54, 0.15);
}

.admin-field-input[disabled] {
  background: #F1F5F9;
  color: #64748B;
  cursor: not-allowed;
}

.admin-field-hint {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 4px;
}

/* Admin Tab Panels */
.admin-tab-panel {
  width: 100%;
  animation: fadeIn 0.2s ease-in-out;
}

/* Job Grade Badges */
.emp-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.emp-grade-badge.grade-5 {
  background: #FAF5FF;
  color: #7E22CE;
  border: 1px solid #E9D5FF;
}

.emp-grade-badge.grade-4 {
  background: #EEF2FF;
  color: #4338CA;
  border: 1px solid #C7D2FE;
}

.emp-grade-badge.grade-3 {
  background: #F0F9FF;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.emp-grade-badge.grade-2 {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.emp-grade-badge.grade-1 {
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
}

/* Add Employee Button (Top Right of Page) */
.btn-admin-add-employee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #748636 !important;
  color: #FFFFFF !important;
  border: 1px solid #748636 !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(116, 134, 54, 0.25);
}

.btn-admin-add-employee:hover {
  background: #63732D !important;
  border-color: #63732D !important;
  box-shadow: 0 3px 6px rgba(116, 134, 54, 0.3);
  transform: translateY(-1px);
}

.btn-admin-add-employee:active {
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════════
   Employee Directory Enhancements
   ══════════════════════════════════════════════════════════════════════════ */

/* Job Title Link */
.emp-job-title-link {
  color: #1E40AF;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration 0.15s ease;
  display: inline-block;
}

.emp-job-title-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* Reporting Manager Wrapper (Job Title under Name) */
.emp-manager-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emp-manager-name {
  font-weight: 600;
  color: #0F172A;
  font-size: 13px;
}

.emp-manager-title {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
  line-height: 1.3;
}

/* Organizational Unit Wrapper (Immediate on Top, Parent Underneath) */
.emp-ou-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emp-ou-immediate {
  font-weight: 600;
  color: #0F172A;
  font-size: 13px;
}

.emp-ou-parent {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
  line-height: 1.3;
}

/* Employee Directory Pagination */
.admin-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid #E2E8F0;
  background: #FFFFFF;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-pagination-info {
  font-size: 13px;
  color: #64748B;
}

.admin-pagination-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-page-btn:hover:not(:disabled) {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.admin-page-number {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.admin-page-number:hover {
  background: #F1F5F9;
}

.admin-page-number.active {
  background: #748636;
  border-color: #748636;
  color: #FFFFFF;
  font-weight: 700;
}

/* Job Role Target Row Highlight Animation */
@keyframes jobRolePulse {
  0% { background-color: #FEF08A; }
  50% { background-color: #EFF6FF; }
  100% { background-color: transparent; }
}

.highlighted-job-role {
  animation: jobRolePulse 2.5s ease-out;
  outline: 2px solid #2563EB;
  outline-offset: -2px;
}


