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

/* Notification panel */
/* Modern Horizontal Tabs for Profile/Add Employee */
.pex-tabs-container {
  background: var(--bg-s);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-radius: var(--r) var(--r) 0 0;
}

.pex-tabs-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 25px;
  padding: 10px 0;
  width: 100%;
}

.pex-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.pex-tab-item {
  color: var(--text3);
  font-size: 14px;
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
  cursor: pointer;
  border-radius: var(--rs);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pex-tab-item:hover {
  color: var(--brand);
}

.pex-tab-item.act {
  color: var(--brand);
  background: var(--brand-lt);
}

.pex-tab-item i {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.pex-tab-item.act i {
  opacity: 1;
}

.prof-section-modern {
  padding: 25px;
  animation: fadeIn 0.3s ease;
}

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

.pex-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pex-field-modern {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pex-field-modern label {
  font-size: 13px;
  color: var(--text2);
  font-weight: 800;
}

.cs-placeholder {
  color: var(--text3);
  font-weight: 500;
  opacity: 0.8;
}

/* Ensure modal is large enough */
.modal-wide {
  width: 95vw !important;
  max-width: 1400px !important;
  height: 90vh !important;
  display: flex;
  flex-direction: column;
}

.modal-wide .m-bd {
  flex: 1;
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

.pex-content-area {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
}

.notif-panel {
  position: fixed;
  top: var(--hh);
  right: 16px;
  width: 300px;
  background: var(--bg-c);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  z-index: 500;
  box-shadow: var(--sh2);
  display: none;
  animation: slideDown .2s ease;
}
.notif-panel.open { display: block; }
@keyframes slideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

/* Unread notification */
/* Validation Styles */
.val-error {
  border-color: #EF4444 !important;
  background-color: rgba(239, 68, 68, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.val-error-msg {
  color: #EF4444;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  animation: slideInLeft 0.3s ease;
}

/* Custom Searchable Select Design */
.custom-select {
  position: relative;
  width: 100%;
  z-index: 1;
}

.custom-select.active {
  z-index: 2010;
}

.cs-wrapper {
  position: relative;
  width: 100%;
  font-family: inherit;
}

.cs-search-input {
  width: 100%;
  padding: 10px 35px 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  font-size: 13px;
  color: var(--text);
  outline: none;
  font-family: var(--font-main);
  transition: all 0.3s ease;
}

body.ltr .cs-search-input {
  padding: 10px 14px 10px 35px;
}

.cs-trigger {
  width: 100%;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--rs);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  transition: all 0.2s ease;
  min-height: 38px;
  overflow: hidden;
}

.cs-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: right;
  padding: 0 4px;
}
body.ltr .cs-label { text-align: left; }

.cs-trigger:hover {
  border-color: var(--brand);
}

.cs-trigger.active {
  border-color: var(--brand3);
  background: var(--bg-c);
  box-shadow: 0 0 0 3px rgba(44, 120, 115, .12);
}

.cs-trigger::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text3);
  border-bottom: 2px solid var(--text3);
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.3s ease;
}

.cs-trigger.active::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.cs-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: auto;
  min-width: 100%;
  max-width: 400px;
  background: var(--bg-c);
  border: 1px solid var(--border2);
  border-radius: var(--rs);
  box-shadow: var(--sh2);
  display: none;
  z-index: 2000;
  max-height: 280px;
  overflow: hidden;
  animation: csFadeIn 0.2s ease;
}
body.ltr .cs-dropdown {
  right: auto;
  left: 0;
}

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

.cs-search-wrap {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-s);
}

.cs-search {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  font-size: 13px;
  outline: none;
}

.cs-search:focus {
  border-color: var(--brand);
}

.cs-options {
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
  padding-left: 10px;
}

.cs-options::-webkit-scrollbar {
  width: 5px;
}

.cs-options::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: var(--rs);
}

.cs-option {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text2);
  cursor: pointer;
  border-radius: var(--rs);
  transition: all 0.2s;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  margin-bottom: 2px;
}
body.ltr .cs-option { text-align: left; }

.cs-option:hover {
  background: var(--bg-s);
  color: var(--brand);
}

.cs-option.selected {
  background: var(--brand-lt);
  color: var(--brand);
  font-weight: 700;
}

.cs-option.no-results {
  color: var(--text3);
  text-align: center;
  cursor: default;
}
.cs-option.no-results:hover { background: none; }


.emp-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}
body.rtl .emp-card-actions {
  right: auto;
  left: 10px;
}
.emp-dots-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.emp-dots-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.4);
}
.emp-action-menu {
  position: absolute;
  top: 40px;
  right: 12px;
  background: var(--bg-c);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  width: 140px;
  display: none;
  flex-direction: column;
  padding: 4px;
  z-index: 1000;
}
body.rtl .emp-action-menu {
  right: auto;
  left: 12px;
}
.emp-action-menu.show { display: flex; }
.menu-item {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--rs);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  transition: all 0.2s;
}
.menu-item:hover { background: var(--bg-s); color: var(--brand); }
.menu-item.act { background: var(--brand-lt); color: var(--brand); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.active { background: #22C55E; }
.status-dot.incomplete { background: #EAB308; }
.status-dot.inactive { background: #EF4444; }

.emp-card-new { position: relative; } /* Ensure absolute works */
.emp-card-side {
  width: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 15px;
  flex-shrink: 0;
}
.circular-av {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.emp-card-new:hover .circular-av {
  transform: scale(1.1);
  border-color: #fff;
}

/* Photo Upload in Profile */
.pex-avatar-edit-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: -20px;
  z-index: 5;
}
.pex-edit-photo-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: 3px solid var(--bg-c);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--sh);
  transition: all 0.2s;
}
.pex-edit-photo-btn:hover {
  transform: scale(1.1);
  background: var(--brand-hv);
}
