/* Employee profile and account pages: glass header card and a ledger that turns into
   cards on narrow screens. The section grid under the profile header is not part of this file. */

.eh-wrap {
  --eh-ink: var(--text1, #1b2140);
  --eh-soft: #4b5567;
  --eh-glass: rgba(255, 255, 255, .62);
  --eh-edge: rgba(255, 255, 255, .8);
  --eh-field: rgba(255, 255, 255, .7);
  --eh-line: #dce4f1;
  container-type: inline-size;
  margin-bottom: 12px;
}

html[data-theme="dark"] .eh-wrap {
  --eh-ink: #f2f5ff;
  --eh-soft: #b9c3db;
  --eh-glass: rgba(27, 31, 42, .66);
  --eh-edge: rgba(255, 255, 255, .14);
  --eh-field: rgba(255, 255, 255, .06);
  --eh-line: rgba(255, 255, 255, .14);
}

.eh-glass {
  border: 1px solid var(--eh-edge);
  border-radius: 26px;
  color: var(--eh-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1) 45%, rgba(255, 255, 255, .28)),
    var(--eh-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 24px 60px rgba(31, 38, 90, .14),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

html[data-theme="dark"] .eh-glass {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, .05)),
    var(--eh-glass);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.eh-hero {
  display: grid;
  gap: 16px;
  padding: 18px;
}

/* ---------- identity ---------- */
.eh-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.eh-avatar {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  background: linear-gradient(145deg, #8f84f0, #5069dc);
  box-shadow:
    0 0 0 4px var(--eh-edge),
    0 14px 30px rgba(80, 105, 220, .35);
}

.eh-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: zoom-in;
}

.eh-name h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.eh-id {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 12px;
  border: 1px solid var(--eh-line);
  border-radius: 999px;
  color: var(--eh-soft);
  background: var(--eh-field);
  font-size: 12px;
}

.eh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.eh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.eh-chip .timer-chip {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

.eh-chip.is-blue { color: #3b57c8; background: rgba(80, 105, 220, .14); border-color: rgba(80, 105, 220, .3); }
.eh-chip.is-red { color: #b13f2a; background: rgba(224, 120, 90, .16); border-color: rgba(224, 120, 90, .35); }
.eh-chip.is-green { color: #1f7a49; background: rgba(63, 174, 114, .16); border-color: rgba(63, 174, 114, .35); }
.eh-chip.is-amber { color: #8a5d0d; background: rgba(192, 138, 30, .17); border-color: rgba(192, 138, 30, .38); }

html[data-theme="dark"] .eh-chip.is-blue { color: #a9b9ff; }
html[data-theme="dark"] .eh-chip.is-red { color: #f4ae98; }
html[data-theme="dark"] .eh-chip.is-green { color: #8be3ae; }
html[data-theme="dark"] .eh-chip.is-amber { color: #f0cf86; }

/* ---------- info tiles ---------- */
.eh-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.eh-tile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--eh-line);
  border-radius: 18px;
  background: var(--eh-field);
}

.eh-tile.is-wide {
  grid-column: 1 / -1;
}

.eh-tile > i {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  font-size: 19px;
}

.eh-tile > div {
  min-width: 0;
}

.eh-tile small {
  display: block;
  color: var(--eh-soft);
  font-size: 11.5px;
}

.eh-tile b {
  display: block;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eh-toggle {
  display: none;
  justify-self: center;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--eh-line);
  border-radius: 14px;
  color: var(--eh-ink);
  background: var(--eh-field);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- actions ---------- */
.eh-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.eh-actions.is-pair {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.eh-actions.is-trio {
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
}

.eh-btn.is-previous-debt {
  --t: #c58a1b;
}

.eh-btn {
  --t: #5069dc;
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--t) 28%, rgba(255, 255, 255, .9));
  border-radius: 18px;
  color: var(--eh-ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--t) 16%, transparent), color-mix(in srgb, var(--t) 4%, transparent) 75%),
    var(--eh-field);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.1), box-shadow .28s ease, border-color .28s ease;
}

html[data-theme="dark"] .eh-btn {
  border-color: color-mix(in srgb, var(--t) 34%, rgba(255, 255, 255, .12));
}

.eh-btn:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--t) 55%, transparent);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--t) 28%, transparent);
}

.eh-btn:active {
  transform: translateY(0) scale(.97);
}

/* light that sweeps across the button on hover */
.eh-btn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70px;
  width: 46px;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  transition: left .7s ease;
  pointer-events: none;
}

.eh-btn:hover::before {
  left: 120%;
}

.eh-btn-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--t) 60%, #fff), var(--t));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--t) 40%, transparent);
  font-size: 18px;
}

.eh-btn-icon > i {
  transition: transform .35s cubic-bezier(.2, 1.6, .4, 1);
}

/* the label wraps inside the button instead of running out of it */
.eh-btn-label {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
}

.eh-btn.is-print { --t: #7b6bea; }
.eh-btn.is-excel { --t: #2fa96d; }
.eh-btn.is-edit { --t: #c08a1e; }

.eh-btn.is-print:hover .eh-btn-icon > i { animation: ehPaper .7s ease; }
.eh-btn.is-excel:hover .eh-btn-icon > i { transform: scale(1.2) rotate(-8deg); }
.eh-btn.is-edit:hover .eh-btn-icon > i { animation: ehPen .7s ease; }

@keyframes ehPaper {
  0% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
  60% { transform: translateY(2px); }
  100% { transform: none; }
}

@keyframes ehPen {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-16deg); }
  60% { transform: rotate(12deg); }
}

.eh-btn.is-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(120deg, #5b7bff, #7a55f0, #4fa3f0, #5b7bff);
  background-size: 250% 100%;
  animation: ehBtnFlow 6s linear infinite;
  box-shadow:
    0 12px 26px rgba(91, 100, 240, .4),
    inset 0 1px 0 rgba(255, 255, 255, .4);
}

.eh-btn.is-primary:hover {
  box-shadow: 0 16px 32px rgba(91, 100, 240, .5);
}

.eh-btn.is-primary .eh-btn-icon {
  background: rgba(255, 255, 255, .22);
  box-shadow: none;
}

.eh-btn.is-primary::before {
  transition: none;
  animation: ehBtnSheen 3.4s ease-in-out infinite;
}

@keyframes ehBtnFlow {
  to { background-position: 250% 0; }
}

@keyframes ehBtnSheen {
  60%, 100% { left: 120%; }
}

.eh-btn:focus-visible,
.eh-toggle:focus-visible {
  outline: 3px solid rgba(80, 105, 220, .4);
  outline-offset: 2px;
}

/* four buttons need room for their labels: below this width the main one takes a full row
   and the other three sit under it with the icon above the text */
@container (max-width: 899px) {
  .eh-actions:not(.is-pair) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .eh-actions:not(.is-pair) .eh-btn.is-primary {
    grid-column: 1 / -1;
  }

  .eh-actions:not(.is-pair) .eh-btn:not(.is-primary) {
    flex-direction: column;
    gap: 6px;
    padding: 10px 8px;
    font-size: 13px;
  }
}

@container (max-width: 520px) {
  .eh-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .eh-avatar {
    width: 84px;
    height: 84px;
    font-size: 34px;
  }

  .eh-chips {
    justify-content: center;
  }

  .eh-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eh-tile.is-extra {
    display: none;
  }

  .eh-hero.is-open .eh-tile.is-extra {
    display: flex;
  }

  .eh-toggle {
    display: inline-flex;
  }

  .eh-actions.is-pair {
    grid-template-columns: 1fr;
  }

  /* On a phone the main action takes the whole row and the other two share the next one. */
  .eh-actions.is-trio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eh-actions.is-trio > :first-child {
    grid-column: 1 / -1;
  }
}

/* ---------- account tabs: two equal cards ---------- */
.eh-tabs {
  --eh-ink: var(--text1, #1b2140);
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

html[data-theme="dark"] .eh-tabs {
  --eh-ink: #f2f5ff;
}

.eh-tab {
  --t: #2fa96d;
  --t2: #2f9fc4;
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--t) 26%, rgba(255, 255, 255, .88));
  border-radius: 20px;
  color: var(--eh-ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--t) 14%, transparent), transparent 70%),
    rgba(255, 255, 255, .66);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 14px 34px rgba(31, 38, 90, .14),
    inset 0 1px 0 rgba(255, 255, 255, .75);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.1), box-shadow .35s ease, border-color .35s ease, color .3s ease;
  animation: ehTabIn .55s cubic-bezier(.2, .9, .3, 1.1) both;
}

html[data-theme="dark"] .eh-tab {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--t) 18%, transparent), transparent 70%),
    rgba(27, 31, 42, .7);
  border-color: color-mix(in srgb, var(--t) 34%, rgba(255, 255, 255, .1));
  box-shadow:
    0 14px 34px rgba(0, 0, 0, .4),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.eh-tab.is-salaries {
  --t: #c08a1e;
  --t2: #d8643a;
  animation-delay: .07s;
}

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

.eh-tab:hover:not(.is-active) {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--t) 55%, transparent);
  box-shadow:
    0 18px 38px color-mix(in srgb, var(--t) 26%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .75);
}

.eh-tab:active {
  transform: translateY(0) scale(.98);
}

.eh-tab::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -90px;
  width: 60px;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg);
  transition: left .8s ease;
  pointer-events: none;
}

.eh-tab:hover::before {
  left: 120%;
}

.eh-tab:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--t) 55%, transparent);
  outline-offset: 3px;
}

.eh-tab-icon {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--t) 62%, #fff), var(--t));
  box-shadow:
    0 10px 22px color-mix(in srgb, var(--t) 40%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .45);
  font-size: 26px;
}

.eh-tab-icon > i {
  transition: transform .4s cubic-bezier(.2, 1.6, .4, 1);
}

.eh-tab:hover .eh-tab-icon > i {
  transform: scale(1.15) rotate(-8deg);
}

.eh-tab-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.eh-tab-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--t) 22%, transparent);
  border-radius: 13px;
  color: var(--t);
  background: color-mix(in srgb, var(--t) 14%, transparent);
  font-size: 18px;
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.1);
}

.eh-tab:hover .eh-tab-mark {
  transform: translateX(-4px);
}

/* selected: a solid gradient card with white text, not just a stronger tint */
.eh-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--t), var(--t2) 90%);
  background-size: 200% 200%;
  box-shadow:
    0 20px 40px color-mix(in srgb, var(--t) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -10px 24px rgba(0, 0, 0, .08);
  animation: ehTabFlow 7s ease-in-out infinite;
}

html[data-theme="dark"] .eh-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--t), var(--t2) 90%);
  background-size: 200% 200%;
}

@keyframes ehTabFlow {
  50% { background-position: 100% 100%; }
}

.eh-tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline-start: -40px;
  top: -60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .32), transparent 70%);
  animation: ehTabGlow 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ehTabGlow {
  50% {
    transform: scale(1.25);
    opacity: .6;
  }
}

.eh-tab.is-active .eh-tab-icon {
  background: rgba(255, 255, 255, .24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    0 8px 18px rgba(0, 0, 0, .14);
}

.eh-tab.is-active .eh-tab-icon::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 22px;
  animation: ehRing 2.4s ease-out infinite;
}

.eh-tab.is-active .eh-tab-mark {
  border-color: transparent;
  color: var(--t);
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .14);
}

.eh-tab.is-active .eh-tab-mark > i {
  animation: ehTabPip .45s cubic-bezier(.2, 1.6, .4, 1);
}

@keyframes ehTabPip {
  from { transform: scale(0) rotate(-40deg); }
  to { transform: none; }
}

/* narrow: icon above the label so a long title never leaves the card */
@container (max-width: 460px) {
  .eh-tab {
    min-height: 116px;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 14px 8px;
    text-align: center;
  }

  .eh-tab-label {
    flex: none;
    text-align: center;
  }

  .eh-tab-mark {
    display: none;
  }
}

/* ---------- employee ledger ---------- */
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) {
  --eh-ink: var(--text1, #1b2140);
  --eh-soft: #4b5567;
  --eh-glass: rgba(255, 255, 255, .62);
  --eh-edge: rgba(255, 255, 255, .8);
  --eh-field: rgba(255, 255, 255, .72);
  --eh-line: #dce4f1;
  container-type: inline-size;
  border: 1px solid var(--eh-edge, rgba(255, 255, 255, .8));
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1) 45%, rgba(255, 255, 255, .28)),
    var(--eh-glass, rgba(255, 255, 255, .62));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 24px 60px rgba(31, 38, 90, .14),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) {
  --eh-ink: #f2f5ff;
  --eh-soft: #b9c3db;
  --eh-glass: rgba(27, 31, 42, .66);
  --eh-edge: rgba(255, 255, 255, .14);
  --eh-field: rgba(255, 255, 255, .06);
  --eh-line: rgba(255, 255, 255, .14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, .05)),
    rgba(27, 31, 42, .66);
  border-color: rgba(255, 255, 255, .14);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* head: period icon, title and actions */
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .acct-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-period-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-period-icon {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  font-size: 23px;
  background: linear-gradient(145deg, #7c9bff, #5069dc 55%, #7a4fe0);
  box-shadow: 0 10px 22px rgba(80, 105, 220, .4);
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-period-icon::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(124, 155, 255, .5);
  border-radius: 19px;
  animation: ehRing 2.6s ease-out infinite;
}

@keyframes ehRing {
  from {
    transform: scale(.92);
    opacity: .9;
  }
  to {
    transform: scale(1.22);
    opacity: 0;
  }
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card {
  container-type: inline-size;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn {
  --t: #5069dc;
  position: relative;
  overflow: hidden;
  width: auto;
  min-width: 0;
  flex: 0 1 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 14px 6px 16px;
  border: 1px solid color-mix(in srgb, var(--t) 28%, rgba(255, 255, 255, .9));
  border-radius: 18px;
  color: var(--eh-ink, #1b2140);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--t) 16%, transparent), color-mix(in srgb, var(--t) 4%, transparent) 75%),
    var(--eh-field, rgba(255, 255, 255, .72));
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.1), box-shadow .28s ease, border-color .28s ease;
  animation: ehRowIn .5s cubic-bezier(.2, .9, .3, 1.1) both;
}

html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn {
  border-color: color-mix(in srgb, var(--t) 34%, rgba(255, 255, 255, .12));
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn:nth-child(2) { animation-delay: .05s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn:nth-child(3) { animation-delay: .1s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn:nth-child(4) { animation-delay: .15s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn:nth-child(5) { animation-delay: .2s; }

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--t) 55%, transparent);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--t) 28%, transparent);
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn:active:not(:disabled) {
  transform: translateY(0) scale(.97);
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* light that sweeps across on hover */
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70px;
  width: 46px;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  transition: left .7s ease;
  pointer-events: none;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn:hover:not(:disabled)::before {
  left: 120%;
}

/* the icon becomes a small gradient tile */
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn > i {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--t) 60%, #fff), var(--t));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--t) 40%, transparent);
  font-size: 17px;
  transition: transform .35s cubic-bezier(.2, 1.6, .4, 1);
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-history { --t: #5069dc; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-settle { --t: #c08a1e; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-print { --t: #7b6bea; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-export { --t: #2fa96d; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-deduction { --t: #d85a30; }

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-history:hover:not(:disabled) > i { transform: rotate(-360deg); transition-duration: .7s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-settle:hover:not(:disabled) > i,
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-export:hover:not(:disabled) > i,
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-deduction:hover:not(:disabled) > i { transform: scale(1.2) rotate(-8deg); }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-print:hover:not(:disabled) > i { animation: ehPaper .7s ease; }

/* the main action: animated gradient with a sweeping light */
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn-solid {
  border: 0;
  color: #fff;
  background: linear-gradient(120deg, #5b7bff, #7a55f0, #4fa3f0, #5b7bff);
  background-size: 250% 100%;
  animation: ehFlow 6s linear infinite;
  box-shadow:
    0 12px 26px rgba(91, 100, 240, .4),
    inset 0 1px 0 rgba(255, 255, 255, .4);
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn-solid > i {
  background: rgba(255, 255, 255, .22);
  box-shadow: none;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn-solid:hover:not(:disabled) > i {
  transform: scale(1.2) rotate(-8deg);
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn-solid::before {
  transition: none;
  animation: ehSheen 3.4s ease-in-out infinite;
}

@keyframes ehFlow {
  to { background-position: 250% 0; }
}

@keyframes ehSheen {
  60%, 100% { left: 120%; }
}


/* rows: the table becomes a list of glass rows */
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table-wrap {
  overflow: visible;
  max-height: none;
  border: 0;
  background: none;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table,
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tbody {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table thead {
  display: none;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr {
  --t: #c08a1e;
  --tc: #a8730f;
  position: relative;
  display: grid;
  /* The date has its own column; the free one between date and status takes whatever is left. */
  grid-template-columns: 30px auto minmax(0, 1fr) auto;
  grid-template-areas:
    "seq date . status"
    "desc desc desc desc"
    "amount amount by by";
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border: 1px solid var(--eh-line, #dce4f1);
  border-radius: 20px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--t) 9%, transparent), transparent 40%),
    var(--eh-field, rgba(255, 255, 255, .72));
  animation: ehRowIn .55s cubic-bezier(.2, .9, .3, 1.1) both;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.1), box-shadow .25s ease, border-color .25s ease;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr::before {
  content: "";
  position: absolute;
  inset-block: 10px;
  inset-inline-end: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, var(--t), color-mix(in srgb, var(--t) 40%, transparent));
;display:none!important;}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--t) 40%, transparent);
  box-shadow: 0 14px 30px rgba(31, 38, 90, .14);
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr.ledger-row--is-debt { --t: #d85a30; --tc: #c9472b; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr.ledger-row--is-warning { --t: #c08a1e; --tc: #a8730f; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr.ledger-row--is-paid { --t: #2fa96d; --tc: #1f8a55; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr.ledger-row-opening { --t: #5069dc; --tc: #3b57c8; }

html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr.ledger-row--is-debt { --tc: #f4ae98; }
html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr.ledger-row--is-warning { --tc: #f0cf86; }
html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr.ledger-row--is-paid { --tc: #8be3ae; }
html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr.ledger-row-opening { --tc: #a9b9ff; }

/* Debt carried from the paper ledger: amber, like debt in the reports. */
#customerProfileWrap .ledger-card--customer .ledger-table tr.ledger-row-previous {
  --t: #c58a1b;
  --tc: #9a6a10;
}

html[data-theme="dark"] #customerProfileWrap .ledger-card--customer .ledger-table tr.ledger-row-previous {
  --tc: #f0cf86;
}

#customerProfileWrap .ledger-table .ledger-prev-doc {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--eh-soft, #4b5567);
}

#customerProfileWrap .ledger-table .od-reverse {
  margin-top: 6px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr:nth-child(1) { animation-delay: .05s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr:nth-child(2) { animation-delay: .11s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr:nth-child(3) { animation-delay: .17s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr:nth-child(4) { animation-delay: .23s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr:nth-child(5) { animation-delay: .29s; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr:nth-child(n+6) { animation-delay: .35s; }

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

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table td {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-seq {
  grid-area: seq;
  width: 30px;
  height: 30px;
  display: grid !important;
  place-items: center;
  border: 1px solid var(--eh-line, #dce4f1);
  border-radius: 10px;
  color: var(--eh-soft, #4b5567);
  background: var(--eh-field, rgba(255, 255, 255, .72));
  font-size: 12.5px;
  font-weight: 700;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-date-cell {
  grid-area: date;
  /* The date keeps its own width; a long "paid for" name beside the status must not squeeze it letter by letter. */
  min-width: max-content;
  color: var(--eh-ink, #1b2140);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-status-cell {
  grid-area: status;
  justify-self: start;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-status-cell .ledger-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--t) 32%, transparent);
  border-radius: 999px;
  color: var(--tc);
  background: color-mix(in srgb, var(--t) 15%, transparent);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-status-cell .ledger-status-badge > i {
  font-size: 15px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-row--is-warning .ledger-status-badge > i.ti-hourglass-high {
  animation: ehSand 2.4s ease-in-out infinite;
}

@keyframes ehSand {
  50% { transform: rotate(180deg); }
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-desc-cell {
  grid-area: desc;
  min-width: 0;
  color: var(--eh-ink, #1b2140);
  font-size: 14px;
  font-weight: 700;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-desc-cell > * {
  margin-top: 6px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-desc-cell .document-number-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  direction: ltr;
  border-radius: 12px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-amount-cell {
  grid-area: amount;
  justify-self: start;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-amount-cell .ledger-amount-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--ta) 28%, transparent);
  border-radius: 13px;
  color: var(--ta);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ta) 22%, transparent), color-mix(in srgb, var(--ta) 8%, transparent));
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-amount-cell.is-debt { --ta: #c9472b; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-amount-cell.is-paid { --ta: #1f9d5f; }

html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-amount-cell.is-debt { --ta: #f4ae98; }
html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-amount-cell.is-paid { --ta: #8be3ae; }

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-by-cell {
  grid-area: by;
  justify-self: end;
  /* A long name wraps inside its own space instead of widening the columns above it. */
  contain: inline-size;
  width: 100%;
  min-width: 0;
  color: var(--eh-soft, #4b5567);
  font-size: 13px;
  text-align: end;
  white-space: normal;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-by-cell::before {
  content: attr(data-label) ": ";
}

/* total */
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--tt) 38%, transparent);
  border-radius: 22px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tt) 22%, transparent), color-mix(in srgb, var(--tt) 4%, transparent));
  animation: ehRowIn .55s .5s cubic-bezier(.2, .9, .3, 1.1) both;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-row.is-debt { --tt: #d85a30; --tx-total: #b13f2a; }
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-row.is-credit,
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-row.is-settled { --tt: #2fa96d; --tx-total: #1f7a49; }

html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-row.is-debt { --tx-total: #f4ae98; }
html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-row.is-credit,
html[data-theme="dark"] :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-row.is-settled { --tx-total: #8be3ae; }

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tt) 65%, #fff), var(--tt));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--tt) 35%, transparent);
  font-size: 20px;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-label {
  font-size: 14px;
  font-weight: 700;
}

:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-total-amount {
  margin-inline-start: auto;
  color: var(--tx-total);
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
}

/* medium: two lines per row, no header */
@container (min-width: 600px) {
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tr {
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    grid-template-areas:
      "seq date status amount"
      "seq desc desc by";
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-seq {
    align-self: start;
    margin-top: 2px;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-amount-cell {
    justify-self: end;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-by-cell {
    contain: none;
    width: auto;
    text-align: start;
    white-space: nowrap;
  }
}

/* wide: one line per row, with a header */
@container (min-width: 1040px) {
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table thead {
    display: block;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table thead tr,
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table tbody tr {
    grid-template-columns: 40px 190px 175px minmax(240px, 1fr) 125px 120px;
    grid-template-areas: "seq date status desc amount by";
    gap: 12px;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table thead tr {
    padding: 0 14px;
    border: 0;
    background: none;
    box-shadow: none;
    animation: none;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table thead tr::before {
    display: none;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-table thead th {
    position: static;
    padding: 0;
    border: 0;
    color: var(--eh-soft, #4b5567);
    background: none;
    font-size: 12px;
    white-space: nowrap;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-seq {
    align-self: center;
    margin-top: 0;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-amount-cell {
    justify-self: start;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-by-cell {
    justify-self: start;
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-by-cell::before {
    content: none;
  }
}

/* narrow: buttons wrap two to a line, the main one full width */
@container (max-width: 560px) {
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn {
    flex: 1 1 calc(50% - 5px);
  }

  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-action-record {
    flex-basis: 100%;
  }
}

/* the receipt link inside a customer ledger row */
:is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) .ledger-row-receipt-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: 8px;
  padding: 3px 10px;
  border: 1px solid var(--eh-line, #dce4f1);
  border-radius: 12px;
  color: #5069dc;
  background: var(--eh-field, rgba(255, 255, 255, .72));
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* AFN / USD account switch above the customer ledger */
#customerProfileWrap .customer-currency-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 5px;
  border: 1px solid var(--eh-edge, rgba(255, 255, 255, .8));
  border-radius: 20px;
  background: var(--eh-glass, rgba(255, 255, 255, .62));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#customerProfileWrap .customer-currency-tabs .acct-pill-btn {
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  color: var(--eh-soft, #4b5567);
  background: none;
  font-weight: 700;
}

#customerProfileWrap .customer-currency-tabs .acct-pill-btn-solid {
  color: #fff;
  background: linear-gradient(120deg, #3dbb85, #2f9fc4);
  box-shadow: 0 8px 20px rgba(47, 159, 196, .35);
}

/* the back button keeps 10px between itself and the card below it */
:is(#employeesProfileWrap, #employeeAccountProfileWrap, #customerProfileWrap) > .back-btn-prominent {
  margin-block: 0 10px !important;
}

@media (prefers-reduced-motion: reduce) {
  .eh-tab,
  .eh-tab *,
  .eh-tab::before,
  .eh-tab::after,
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn,
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn::before,
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card .acct-ledger-actions .acct-pill-btn > i,
  .eh-btn,
  .eh-btn:hover,
  .eh-btn::before,
  .eh-btn-icon > i,
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) *,
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) *::before,
  :is(#employeeAccountProfileWrap, #customerProfileWrap) .ledger-card:is(.ledger-card--employee, .ledger-card--customer) *::after {
    animation: none !important;
    transition: none;
    transform: none;
  }
}
