/* Employees list and the add / edit form, built to match the approved design. */

:is(#view-employees, #view-customers) {
  --ep-text: var(--text1);
  --ep-soft: #2f3a4d;
  --ep-muted: #4b5567;
  --ep-glass: rgba(255, 255, 255, .58);
  --ep-glass-soft: rgba(255, 255, 255, .46);
  --ep-edge: rgba(255, 255, 255, .85);
  --ep-line: rgba(91, 99, 224, .16);
  --ep-primary: #5069dc;
  --ep-ease: cubic-bezier(.2, .9, .3, 1.1);
}

html[data-theme="dark"] :is(#view-employees, #view-customers) {
  --ep-text: #ffffff;
  --ep-soft: #dbe3ee;
  --ep-muted: #b5c0d0;
  --ep-glass: rgba(34, 42, 84, .56);
  --ep-glass-soft: rgba(255, 255, 255, .08);
  --ep-edge: rgba(255, 255, 255, .16);
  --ep-line: rgba(140, 150, 255, .2);
  --ep-primary: #b7c0ff;
}

:is(#view-employees, #view-customers) .ep-glass,
:is(#view-employees, #view-customers) .emp-list-section {
  border: 1px solid var(--ep-edge);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1) 45%, rgba(255, 255, 255, .28)),
    var(--ep-glass);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  box-shadow:
    0 24px 60px rgba(31, 38, 90, .14),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

html[data-theme="dark"] :is(#view-employees, #view-customers) .ep-glass,
html[data-theme="dark"] :is(#view-employees, #view-customers) .emp-list-section {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, .07)),
    var(--ep-glass);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .2);
}

@keyframes epRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes epFloat {
  50% {
    transform: translateY(-4px) rotate(-3deg);
  }
}

@keyframes epLive {
  50% {
    transform: scale(1.3);
    opacity: .65;
  }
}

@keyframes epSheen {
  from {
    background-position: 160% 0;
  }
  60%, to {
    background-position: -60% 0;
  }
}

/* ---------- page top ---------- */
#view-employees .employee-section-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--ep-edge);
  border-radius: 18px;
  background: var(--ep-glass-soft);
}

#view-employees .employee-section-tabs .filter-tab {
  padding: 9px 18px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ep-soft);
  font-weight: 800;
  transition: all .3s var(--ep-ease);
}

#view-employees .employee-section-tabs .filter-tab.active {
  background: linear-gradient(135deg, #7b6bea, #5069dc);
  color: #fff;
  box-shadow: 0 8px 18px rgba(80, 105, 220, .3);
}

#view-employees .page-title {
  color: var(--ep-text);
  font-weight: 800;
}

#view-employees .employee-create-launch-btn {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #7b6bea, #5069dc);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(80, 105, 220, .32);
  transition: transform .25s var(--ep-ease);
}

#view-employees .employee-create-launch-btn:hover {
  transform: translateY(-2px);
}

/* ---------- list ---------- */
#view-employees .emp-list-section-title {
  color: var(--ep-text);
  font-size: 1.15em;
  font-weight: 800;
}

#view-employees .emp-list-section-count {
  padding: 3px 12px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ep-primary) 14%, transparent);
  color: var(--ep-primary);
  font-weight: 800;
}

.emp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.emp-toolbar-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(91, 99, 224, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: border-color .2s ease, box-shadow .2s ease;
}

html[data-theme="dark"] .emp-toolbar-search {
  border-color: rgba(140, 150, 255, .2);
  background: rgba(255, 255, 255, .08);
}

.emp-toolbar-search:focus-within {
  border-color: #5069dc;
  box-shadow: 0 0 0 4px rgba(80, 105, 220, .18);
}

.emp-toolbar-search i {
  color: #5069dc;
  font-size: 20px;
}

.emp-toolbar .emp-toolbar-search input#empListSearch {
  flex: 1;
  min-width: 0;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit;
  font: inherit;
  font-weight: 700;
}

.emp-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emp-filter-chip {
  padding: 9px 16px;
  border: 1px solid rgba(91, 99, 224, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .46);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.1), background .3s ease;
}

html[data-theme="dark"] .emp-filter-chip {
  border-color: rgba(140, 150, 255, .2);
  background: rgba(255, 255, 255, .08);
}

.emp-filter-chip:hover {
  transform: translateY(-2px);
}

.emp-filter-chip.is-on {
  border-color: transparent;
  background: linear-gradient(135deg, #7b6bea, #5069dc);
  color: #fff;
  box-shadow: 0 8px 18px rgba(80, 105, 220, .3);
}

#view-employees #employeesListWrap .emp-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}

#view-employees #employeesListWrap .emp-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar body body"
    "meta meta meta"
    "status status open";
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--emp-tone) 28%, var(--ep-edge));
  border-radius: 24px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--emp-tone) 14%, transparent), transparent 62%),
    var(--ep-glass-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: transform .35s var(--ep-ease), box-shadow .35s ease;
  animation: epRise .55s var(--ep-ease) both;
}

#view-employees #employeesListWrap .emp-row::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--emp-tone), color-mix(in srgb, var(--emp-tone) 40%, #fff));
}

#view-employees #employeesListWrap .emp-row:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 36px color-mix(in srgb, var(--emp-tone) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .6);
}

#view-employees #employeesListWrap .emp-row-avatar {
  grid-area: avatar;
  position: relative;
  inset: auto;
  margin: 0;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  overflow: visible;
  border: 0 !important;
  border-radius: 22px;
  color: #fff !important;
  font-size: 1.7em;
  font-weight: 800;
  background: linear-gradient(145deg, color-mix(in srgb, var(--emp-tone) 60%, #fff), var(--emp-tone));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--emp-tone) 32%, transparent);
}

#view-employees #employeesListWrap .emp-row-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
}

#view-employees #employeesListWrap .emp-row-avatar::after {
  content: "";
  position: absolute;
  top: auto;
  inset-inline-start: auto;
  inset-inline-end: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 3px solid var(--panel, #fff);
  border-radius: 50%;
  background: var(--success);
  transform: none;
  animation: epLive 1.8s ease-in-out infinite;
}

#view-employees #employeesListWrap .emp-row.is-busy .emp-row-avatar::after {
  background: var(--warning);
}

#view-employees #employeesListWrap .emp-row.is-leave .emp-row-avatar::after {
  background: #5069dc;
}

#view-employees #employeesListWrap .emp-row.is-off .emp-row-avatar::after,
#view-employees #employeesListWrap .emp-row.is-inactive .emp-row-avatar::after {
  background: var(--danger);
  animation: none;
}

#view-employees #employeesListWrap .emp-row-body {
  grid-area: body;
  min-width: 0;
}

#view-employees #employeesListWrap .emp-row-name {
  display: block;
  color: var(--ep-text);
  font-size: 1.15em;
  font-weight: 800;
}

#view-employees #employeesListWrap .emp-row-id {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 99px;
  color: var(--emp-tone);
  background: color-mix(in srgb, var(--emp-tone) 14%, transparent);
  font-size: .8em;
  font-weight: 800;
  direction: ltr;
}

html[data-theme="dark"] #view-employees #employeesListWrap .emp-row-id {
  color: color-mix(in srgb, var(--emp-tone) 45%, #fff);
}

#view-employees #employeesListWrap .employee-row-delete {
  grid-area: del;
  align-self: start;
  width: 40px;
  height: 40px;
  transition: transform .25s var(--ep-ease), background .25s ease;
}

#view-employees #employeesListWrap .employee-row-delete:hover {
  transform: scale(1.12);
}

#view-employees #employeesListWrap .emp-row-meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

#view-employees #employeesListWrap .emp-row-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--ep-line);
  border-radius: 14px;
  background: var(--ep-glass-soft);
  color: var(--ep-text);
  font-weight: 700;
}

#view-employees #employeesListWrap .emp-row-meta-item i {
  color: var(--emp-tone);
  font-size: 18px;
}

#view-employees #employeesListWrap .emp-row-meta-item span {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-employees #employeesListWrap .emp-row-status {
  grid-area: status;
  justify-self: start;
  padding: 5px 12px;
  border-radius: 99px;
  font-weight: 800;
}

#view-employees #employeesListWrap .emp-row-status.is-free {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

#view-employees #employeesListWrap .emp-row-status.is-busy {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 16%, transparent);
}

html[data-theme="dark"] #view-employees #employeesListWrap .emp-row-status.is-free {
  color: #7ff0b2;
}

html[data-theme="dark"] #view-employees #employeesListWrap .emp-row-status.is-busy {
  color: #ffd685;
}

#view-employees #employeesListWrap .emp-row-open {
  grid-area: open;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--emp-tone);
  font-weight: 800;
}

html[data-theme="dark"] #view-employees #employeesListWrap .emp-row-open {
  color: color-mix(in srgb, var(--emp-tone) 45%, #fff);
}

#view-employees #employeesListWrap .emp-row-open i {
  transition: transform .3s var(--ep-ease);
}

#view-employees #employeesListWrap .emp-row:hover .emp-row-open i {
  transform: translateX(-6px);
}

/* ---------- form: title card ---------- */
:is(#view-employees, #view-customers) .ep-form {
  container-type: inline-size;
  display: grid;
  gap: 14px;
}

:is(#view-employees, #view-customers) .ep-fhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 24px;
  padding: 16px 18px;
  animation: epRise .5s var(--ep-ease) both;
}

:is(#view-employees, #view-customers) .ep-fhead-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

:is(#view-employees, #view-customers) .ep-fhead-ico {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  font-size: 26px;
  background: linear-gradient(145deg, #8f84f0, #5069dc);
  box-shadow: 0 10px 22px rgba(80, 105, 220, .32);
  animation: epFloat 3.6s ease-in-out infinite;
}

:is(#view-employees, #view-customers) .ep-fhead h3 {
  margin: 0;
  color: var(--ep-text);
  font-size: 1.3em;
  font-weight: 800;
}

:is(#view-employees, #view-customers) .ep-fhead p {
  margin: 3px 0 0;
  color: var(--ep-soft);
  font-weight: 700;
}

.emp-head-live {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px 22px;
}

.emp-head-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 16px 8px 10px;
  border: 1px solid rgba(80, 105, 220, .28);
  border-radius: 20px;
  background: rgba(80, 105, 220, .08);
}

.emp-head-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 17px;
  color: #fff;
  font-size: 1.35em;
  font-weight: 800;
  background: linear-gradient(145deg, #8f84f0, #5069dc);
  box-shadow: 0 8px 18px rgba(80, 105, 220, .3);
}

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

.emp-head-preview b {
  display: block;
  color: var(--ep-text, inherit);
  font-weight: 800;
}

.emp-head-preview small {
  display: block;
  margin: 2px 0 4px;
  color: var(--ep-soft, inherit);
  font-weight: 700;
}

.emp-head-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: .85em;
  font-weight: 800;
}

.emp-head-status.is-active {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

.emp-head-status.is-inactive {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

html[data-theme="dark"] .emp-head-status.is-active {
  color: #7ff0b2;
}

html[data-theme="dark"] .emp-head-status.is-inactive {
  color: #ffa08a;
}

.emp-head-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.emp-head-ring {
  position: relative;
  width: 72px;
  height: 72px;
}

.emp-head-ring svg {
  transform: rotate(-90deg);
}

.emp-head-ring circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.emp-head-ring .ring-bg {
  stroke: rgba(120, 130, 170, .22);
}

.emp-head-ring .ring-fg {
  stroke: url(#empRingGradient);
  transition: stroke-dashoffset .7s cubic-bezier(.2, .9, .3, 1.1);
}

.emp-head-ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ep-text, inherit);
  font-size: .95em;
  font-weight: 800;
}

.emp-head-progress strong {
  display: block;
  color: var(--ep-text, inherit);
  font-weight: 800;
}

.emp-head-progress small {
  color: var(--ep-soft, inherit);
  font-weight: 700;
}

@container (max-width: 820px) {
  :is(#view-employees, #view-customers) .ep-fhead {
    grid-template-columns: minmax(0, 1fr);
  }

  .emp-head-live {
    justify-content: space-between;
  }
}

/* ---------- form: sections ---------- */
:is(#view-employees, #view-customers) .ep-fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 14px;
  align-items: start;
}

:is(#view-employees, #view-customers) .ep-fsec {
  position: relative;
  padding: 18px;
  animation: epRise .55s var(--ep-ease) both;
}

:is(#view-employees, #view-customers) .ep-no {
  position: absolute;
  top: 14px;
  inset-inline-start: 16px;
  color: var(--ep-muted);
  font-size: .85em;
  font-weight: 800;
  direction: ltr;
}

:is(#view-employees, #view-customers) .ep-fsec h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--ep-text);
  font-size: 1.1em;
  font-weight: 800;
}

:is(#view-employees, #view-customers) .ep-fsec h4 i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--s) 65%, #fff), var(--s));
}

:is(#view-employees, #view-customers) .ep-frow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

:is(#view-employees, #view-customers) .ep-fld {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

:is(#view-employees, #view-customers) .ep-fld > label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ep-text);
  font-weight: 800;
}

:is(#view-employees, #view-customers) .ep-fld > label i {
  color: var(--s);
  font-size: 1.1em;
}

:is(#view-employees, #view-customers) .ep-fld input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid var(--ep-line);
  border-radius: 14px;
  background: var(--ep-glass-soft);
  color: var(--ep-text);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: border-color .2s ease, box-shadow .2s ease;
}

:is(#view-employees, #view-customers) .ep-fld input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: 0;
  border-color: var(--s);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--s) 18%, transparent);
}

:is(#view-employees, #view-customers) .ep-fld input.is-readonly {
  color: var(--ep-soft);
  direction: ltr;
  text-align: end;
}

:is(#view-employees, #view-customers) .ep-fld small,
:is(#view-employees, #view-customers) .ep-hint {
  color: var(--ep-soft);
  font-weight: 700;
  line-height: 1.8;
}

:is(#view-employees, #view-customers) .ep-fld .field-error-msg {
  color: var(--danger);
  font-weight: 700;
}

:is(#view-employees, #view-customers) #emp_hireDatePicker > *,
:is(#view-employees, #view-customers) .employee-responsibility-select-control > * {
  min-height: 48px;
  border-radius: 14px;
  font-weight: 800;
}

:is(#view-employees, #view-customers) .employee-responsibility-select-control select {
  width: 100%;
}

/* ---------- permissions and status ---------- */
:is(#view-employees, #view-customers) .ep-note {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  color: var(--ep-text);
  font-weight: 700;
  line-height: 1.8;
}

:is(#view-employees, #view-customers) .ep-note i {
  margin-top: 2px;
  color: var(--warning);
  font-size: 19px;
}

:is(#view-employees, #view-customers) .emp-perm-list.is-unavailable .ep-sw {
  opacity: .55;
  pointer-events: none;
}

:is(#view-employees, #view-customers) .ep-sw {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--ep-line);
  border-radius: 16px;
  background: var(--ep-glass-soft);
  cursor: pointer;
  transition: transform .3s var(--ep-ease), border-color .3s ease, background .3s ease;
}

:is(#view-employees, #view-customers) .ep-sw:hover {
  transform: translateY(-2px);
}

:is(#view-employees, #view-customers) .ep-sw > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

:is(#view-employees, #view-customers) .ep-sw-icon,
:is(#view-employees, #view-customers) .ep-state-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--c);
  font-size: 22px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
}

:is(#view-employees, #view-customers) .ep-sw-copy b {
  display: block;
  color: var(--ep-text);
  font-weight: 800;
}

:is(#view-employees, #view-customers) .ep-sw-copy small {
  color: var(--ep-soft);
  font-weight: 700;
  line-height: 1.7;
}

:is(#view-employees, #view-customers) .ep-knob {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 99px;
  background: rgba(120, 130, 170, .35);
  transition: background .3s ease;
}

:is(#view-employees, #view-customers) .ep-knob::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
  transition: inset-inline-start .35s var(--ep-ease);
}

:is(#view-employees, #view-customers) .ep-sw:has(input:checked) {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
}

:is(#view-employees, #view-customers) .ep-sw:has(input:checked) .ep-knob {
  background: var(--c);
}

:is(#view-employees, #view-customers) .ep-sw:has(input:checked) .ep-knob::after {
  inset-inline-start: 25px;
}

:is(#view-employees, #view-customers) .ep-sw:has(input:focus-visible),
:is(#view-employees, #view-customers) .ep-state:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent);
  outline-offset: 2px;
}

:is(#view-employees, #view-customers) .ep-states {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

:is(#view-employees, #view-customers) .ep-state {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--ep-line);
  border-radius: 16px;
  background: var(--ep-glass-soft);
  cursor: pointer;
  transition: all .3s var(--ep-ease);
}

:is(#view-employees, #view-customers) .ep-state > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

:is(#view-employees, #view-customers) .ep-check {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ep-line);
  border-radius: 50%;
  color: transparent;
  transition: all .3s var(--ep-ease);
}

:is(#view-employees, #view-customers) .ep-state:has(input:checked) {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, transparent);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--c) 18%, transparent);
  transform: translateY(-2px);
}

:is(#view-employees, #view-customers) .ep-state:has(input:checked) .ep-check {
  border-color: var(--c);
  background: var(--c);
  color: #fff;
}

/* ---------- photo ---------- */
:is(#view-employees, #view-customers) .emp-photo-stage {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
  border: 2px dashed color-mix(in srgb, var(--s) 45%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--s) 6%, transparent);
  text-align: center;
  cursor: pointer;
  transition: all .3s var(--ep-ease);
}

:is(#view-employees, #view-customers) .emp-photo-stage:hover {
  transform: scale(1.015);
  background: color-mix(in srgb, var(--s) 12%, transparent);
}

:is(#view-employees, #view-customers) .emp-photo-stage.has-error {
  border-color: var(--danger);
}

:is(#view-employees, #view-customers) .emp-photo-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
}

:is(#view-employees, #view-customers) .emp-photo-placeholder i {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  font-size: 30px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--s) 65%, #fff), var(--s));
  animation: epFloat 3.4s ease-in-out infinite;
}

:is(#view-employees, #view-customers) .emp-photo-placeholder strong {
  color: var(--ep-text);
  font-weight: 800;
}

:is(#view-employees, #view-customers) .emp-photo-placeholder span {
  color: var(--ep-soft);
  font-weight: 700;
}

:is(#view-employees, #view-customers) .emp-photo-stage img {
  position: static;
  inset: auto;
  width: 150px;
  height: 150px;
  margin: auto;
  border-radius: 50%;
  object-fit: cover;
  object-position: var(--emp-photo-x, 50%) var(--emp-photo-y, 50%);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, .8),
    0 14px 30px rgba(31, 38, 90, .28);
}

:is(#view-employees, #view-customers) .emp-photo-position-controls {
  display: none !important;
}

:is(#view-employees, #view-customers) .emp-photo-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

:is(#view-employees, #view-customers) .ep-formats {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--ep-soft);
  font-size: .9em;
  font-weight: 700;
}

/* ---------- buttons and the sticky action bar ---------- */
:is(#view-employees, #view-customers) .ep-btn {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #7b6bea, #5069dc);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(80, 105, 220, .3);
  transition: transform .25s var(--ep-ease);
}

:is(#view-employees, #view-customers) .ep-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

:is(#view-employees, #view-customers) .ep-btn:disabled {
  opacity: .5;
  cursor: default;
}

:is(#view-employees, #view-customers) .ep-btn-ghost {
  border: 1px solid var(--ep-line);
  background: var(--ep-glass-soft);
  color: var(--ep-text);
  box-shadow: none;
}

:is(#view-employees, #view-customers) .ep-btn-primary {
  background: linear-gradient(135deg, #3dbb85, #2f9fc4);
  box-shadow: 0 10px 22px rgba(47, 159, 196, .3);
}

:is(#view-employees, #view-customers) .ep-btn-danger {
  background: linear-gradient(135deg, #e0785a, #c64c3e);
  box-shadow: 0 10px 22px rgba(198, 76, 62, .3);
}

:is(#view-employees, #view-customers) .ep-btn-primary::after,
:is(#view-employees, #view-customers) .emp-photo-btn.is-upload::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .4) 50%, transparent 65%);
  background-size: 260% 100%;
  animation: epSheen 3.2s ease-in-out infinite;
  pointer-events: none;
}

:is(#view-employees, #view-customers) .ep-stick {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  padding: 12px;
  border-radius: 22px;
}

:is(#view-employees, #view-customers) .emp-modal-action-buttons {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 10px;
  width: 100%;
}

:is(#view-employees, #view-customers) .emp-modal-action-buttons .ep-btn {
  width: 100%;
  min-height: 52px;
}

/* an open dropdown lifts its whole section above the sections that follow */
:is(#view-employees, #view-customers) .ep-fsec:has(.is-open),
:is(#view-employees, #view-customers) .ep-fsec:has([aria-expanded="true"]) {
  z-index: 80;
}

@media (max-width: 520px) {
  :is(#view-employees, #view-customers) .emp-photo-actions,
  :is(#view-employees, #view-customers) .emp-modal-action-buttons {
    grid-template-columns: 1fr;
  }

  #view-employees #employeesListWrap .emp-row-meta {
    grid-template-columns: 1fr;
  }

  .emp-head-live {
    flex-direction: column;
    align-items: stretch;
  }

  .emp-head-progress {
    justify-content: center;
  }

  :is(#view-employees, #view-customers) .ep-stick {
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(#view-employees, #view-customers) .ep-fhead-ico,
  #view-employees #employeesListWrap .emp-row-avatar::after,
  :is(#view-employees, #view-customers) .emp-photo-placeholder i,
  :is(#view-employees, #view-customers) .ep-btn::after,
  #view-employees #employeesListWrap .emp-row,
  :is(#view-employees, #view-customers) .ep-fsec,
  :is(#view-employees, #view-customers) .ep-fhead {
    animation: none !important;
  }
}

:is(#view-employees, #view-customers) .employee-responsibility-select-menu {
  background: var(--mr-menu-bg, #f8f9ff);
}

html[data-theme="dark"] :is(#view-employees, #view-customers) .employee-responsibility-select-menu {
  background: #1b2148;
}

:is(#view-employees, #view-customers) .ep-fsec:has(.employee-responsibility-select-control.is-open) {
  z-index: 140;
}

:is(#view-employees, #view-customers) .ep-states {
  margin-top: 12px;
}

:is(#view-employees, #view-customers) .ep-danger-zone {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-color: color-mix(in srgb, var(--danger) 35%, var(--ep-edge));
}

:is(#view-employees, #view-customers) .ep-danger-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--danger);
  font-size: 22px;
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

:is(#view-employees, #view-customers) .ep-danger-copy b {
  display: block;
  color: var(--ep-text);
  font-weight: 800;
}

:is(#view-employees, #view-customers) .ep-danger-copy small {
  color: var(--ep-soft);
  font-weight: 700;
}

@media (max-width: 520px) {
  :is(#view-employees, #view-customers) .ep-danger-zone {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  :is(#view-employees, #view-customers) .ep-danger-zone .ep-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  #view-employees #employeesListWrap .emp-row {
    grid-template-areas:
      "avatar body body"
      "meta meta meta"
      "status status status"
      "open open open";
  }

  #view-employees #employeesListWrap .emp-row-open {
    justify-self: stretch;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--emp-tone) 12%, transparent);
  }

  #view-employees #employeesListWrap .emp-row-status {
    justify-self: stretch;
  }
}
