/* Till attendant home screen, notification tabs and task reminder fields. */

/* ---------- home layout ---------- */
.till-home-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.till-home-row > .card {
  margin: 0;
}

/* keep a clear gap between the stacked dashboard blocks */
.till-home-row {
  margin-bottom: 18px;
}

.till-main-grid {
  margin-top: 18px;
}

.till-quick-actions + .employee-dashboard-widgets,
.till-stock-alert + .employee-dashboard-widgets {
  margin-top: 18px;
}

.employee-dashboard-widgets > .employee-dashboard-journal {
  margin-top: 18px;
}

/* ---------- pending handovers: one tidy card per handover ---------- */
.till-home-row .till-attendant-payment-list {
  gap: 10px;
}

.till-home-row .till-attendant-payment-day {
  gap: 8px;
}

.till-home-row .employee-salaries-card .salary-payment-list-item.till-attendant-payment-list-item {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon main amount"
    "icon status action";
  align-items: center;
  gap: 8px 12px;
  padding: 12px;
}

.till-home-row .till-attendant-payment-list-item .salary-payment-list-icon {
  grid-area: icon;
  align-self: start;
}

.till-home-row .till-attendant-payment-list-item .salary-payment-list-main {
  grid-area: main;
}

.till-home-row .till-attendant-payment-list-item .salary-payment-list-main small {
  min-width: 0;
}

.till-home-row .till-attendant-payment-list-item .salary-payment-list-main bdi {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.till-home-row .till-attendant-payment-list-item .salary-payment-list-amount {
  grid-area: amount;
  min-width: 0;
  justify-self: end;
}

.till-home-row .till-attendant-payment-list-item .salary-payment-list-status {
  grid-area: status;
  justify-self: start;
}

.till-home-row .till-attendant-payment-list-item .till-attendant-confirm-btn,
.till-home-row .till-attendant-payment-list-item .btn {
  grid-area: action;
  justify-self: end;
}

.till-quick-actions {
  margin-top: 18px;
}

/* ---------- cash card ---------- */
.till-home-hero {
  display: grid;
  gap: 16px;
  margin: 0;
}

.till-home-hero-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.till-home-hero-head small {
  color: var(--accent-solid, #5b63e0);
  font-size: 11px;
  font-weight: 800;
}

.till-home-hero-head h2 {
  margin: 3px 0 0;
  color: var(--text1);
  font-size: 15px;
  font-weight: 900;
}

.till-home-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  font-size: 26px;
  background: linear-gradient(145deg, #7b6bea, #5069dc);
  box-shadow: 0 10px 22px rgba(82, 91, 210, .3);
}

.till-home-amount {
  color: var(--text1);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.2;
}

.till-home-amount span {
  margin-inline-start: 8px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
}

.till-home-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.till-home-chip {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-glass, #fff) 55%, transparent);
}

.till-home-chip span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text2);
  font-size: 11px;
}

.till-home-chip b {
  display: block;
  margin-top: 4px;
  color: var(--text1);
  font-size: 14px;
}

.till-home-chip.is-in i {
  color: var(--success);
}

.till-home-chip.is-out i {
  color: var(--danger);
}

.till-home-chip.is-wait i {
  color: var(--warning);
}

.till-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.till-home-count-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text2);
  font-size: 11px;
  line-height: 1.8;
}

.till-home-count-note i {
  color: var(--warning);
}

/* ---------- low stock alert ---------- */
.till-stock-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 38%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--text2);
  font-size: 12px;
}

.till-stock-alert > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.till-stock-alert i {
  color: var(--danger);
  font-size: 22px;
}

.till-stock-alert b {
  display: block;
  margin-bottom: 2px;
  color: var(--text1);
  font-size: 13px;
}

.till-stock-sent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

/* ---------- latest movements ---------- */
.till-move {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.till-move:last-child {
  border-bottom: 0;
}

.till-move-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.till-move.is-in .till-move-icon {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

.till-move.is-out .till-move-icon {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

.till-move b {
  display: block;
  color: var(--text1);
  font-size: 12px;
}

.till-move small {
  color: var(--text2);
  font-size: 10px;
}

.till-move strong {
  font-size: 12px;
}

.till-move.is-in strong {
  color: var(--success);
}

.till-move.is-out strong {
  color: var(--danger);
}

/* ---------- task reminder fields ---------- */
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 3px;
  color: var(--text2);
  font-size: 10.5px;
}

.task-meta i {
  margin-inline-end: 3px;
}

.task-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.task-time-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-time-field span {
  color: var(--text2);
  font-size: 11px;
}

.task-time-field .add-task-desc {
  margin: 0;
}

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .till-home-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .till-home-chips {
    grid-template-columns: 1fr;
  }
}

/* narrow cards (phones, or the card sitting beside another one) */
.till-home-row .till-attendant-handover-card {
  container-type: inline-size;
}

@container (max-width: 480px) {
  .till-home-row .employee-salaries-card .salary-payment-list-item.till-attendant-payment-list-item {
    grid-template-areas:
      "icon main main"
      "status status amount"
      "action action action";
  }

  .till-home-row .till-attendant-payment-list-item .till-attendant-confirm-btn,
  .till-home-row .till-attendant-payment-list-item .btn {
    justify-self: stretch;
  }

  .till-home-row .till-attendant-payment-list-item .salary-payment-list-status {
    justify-self: start;
  }
}

/* ---------- themed dropdowns inside the workspace ---------- */
#employeeWorkspace {
  --till-tone: #6a5ce2;
}

#employeeWorkspace .accounts-sort-select {
    position: relative;
    z-index: 5;
    min-width: 195px;
}

#employeeWorkspace .accounts-sort-select.is-open  {
  z-index: 100;
}

#employeeWorkspace .accounts-sort-select > select {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

#employeeWorkspace .accounts-sort-trigger {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 11px;
    border: 1px solid var(--theme-stroke, rgba(255,255,255,.8));
    border-radius: 12px;
    color: var(--text1);
    background: var(--theme-glass, rgba(255,255,255,.74));
    box-shadow: inset 0 1px 0 var(--theme-highlight, rgba(255,255,255,.9));
    cursor: pointer;
    font: inherit;
    font-size: 12.5px;
    font-weight: 760;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

#employeeWorkspace .accounts-sort-trigger-copy {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

#employeeWorkspace .accounts-sort-trigger-copy > i  {
  color: var(--till-tone);
  font-size: 16px;
}
#employeeWorkspace .accounts-sort-chevron  {
  color: var(--text2);
  transition: transform .2s var(--ui-ease);
}

#employeeWorkspace .accounts-sort-select.is-open .accounts-sort-trigger,
#employeeWorkspace .accounts-sort-trigger:focus-visible {
    outline: 0;
    border-color: var(--till-tone);
    background: var(--theme-glass, rgba(255,255,255,.92));
    box-shadow: 0 0 0 3px rgba(117,95,232,.17), inset 0 1px 0 var(--theme-highlight, rgba(255,255,255,.95));
}

#employeeWorkspace .accounts-sort-select.is-open .accounts-sort-chevron  {
  transform: rotate(180deg);
}

#employeeWorkspace .accounts-sort-menu {
    position: absolute;
    z-index: 120;
    inset-inline: 0;
    top: calc(100% + 8px);
    display: none;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--theme-stroke, rgba(255,255,255,.87));
    border-radius: 15px;
    background: linear-gradient(145deg, var(--theme-glass, rgba(247,249,255,.97)), var(--theme-glass, rgba(220,228,248,.93)));
    box-shadow: 0 18px 34px rgba(34,45,94,.25), inset 0 1px 0 var(--theme-highlight, rgba(255,255,255,.96));
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

#employeeWorkspace .accounts-sort-select.is-open .accounts-sort-menu  {
  display: grid;
  animation: accountsSortMenuIn .2s var(--ui-ease) both;
}


#employeeWorkspace .accounts-sort-option {
    min-height: 39px;
    display: grid;
    grid-template-columns: 21px minmax(0,1fr) 20px;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text1);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 730;
    text-align: right;
}

#employeeWorkspace .accounts-sort-option > i:first-child  {
  color: var(--till-tone);
  font-size: 15px;
}
#employeeWorkspace .accounts-sort-option > i:last-child  {
  opacity: 0;
  color: var(--till-tone);
}
#employeeWorkspace .accounts-sort-option:hover  {
  background: var(--theme-glass, rgba(255,255,255,.64));
}
#employeeWorkspace .accounts-sort-option.is-active  {
  border-color: rgba(117,95,232,.2);
  background: rgba(117,95,232,.1);
}
#employeeWorkspace .accounts-sort-option.is-active > i:last-child  {
  opacity: 1;
}


#employeeWorkspace .accounts-sort-select {
  --accounts-tone:var(--till-tone);
  min-width:0;
  width:100%;
}
#employeeWorkspace .accounts-sort-menu {
  max-height:300px;
  overflow:auto;
  background:var(--panel);
  border-color:color-mix(in srgb,var(--till-tone) 30%,transparent);
}
#employeeWorkspace .accounts-sort-trigger {
  min-height:46px;
  border-color:color-mix(in srgb,var(--till-tone) 30%,transparent);
}
#employeeWorkspace .accounts-sort-option.is-active {
  background:color-mix(in srgb,var(--till-tone) 12%,transparent);
  border-color:color-mix(in srgb,var(--till-tone) 25%,transparent);
}

/* ---------- one card: cash + shift ---------- */
.till-home-shift {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.till-home-shift .employee-self-worktime {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.till-home-shift .employee-self-worktime::before {
  display: none;
}

/* ---------- tabbed cards ---------- */
.till-tabs {
  margin-bottom: 12px;
}

.till-tabs .filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.till-tab-badge {
  margin-inline-start: 4px;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 99px;
  color: #fff;
  background: var(--warning);
  font-size: 10px;
  line-height: 16px;
}

.till-tab-panel[hidden],
.till-fold-body[hidden] {
  display: none;
}

.till-tabs-card > .till-tab-panel > .till-attendant-handover-card {
  margin: 0;
}

.till-moves-link {
  width: 100%;
  margin-top: 10px;
}

.till-embedded-prices .price-widget-banner {
  margin-top: 0;
}

/* ---------- folded sections ---------- */
.till-folds {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.till-fold {
  margin: 0;
  padding: 0;
}

.till-fold-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--text1);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.till-fold-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(145deg, #7b6bea, #5069dc);
}

.till-fold-title {
  font-size: 14px;
  font-weight: 800;
}

.till-fold-meta {
  margin-inline-start: auto;
  color: var(--text2);
  font-size: 11px;
}

.till-fold-chevron {
  color: var(--text2);
  transition: transform .2s ease;
}

.till-fold.is-open .till-fold-chevron {
  transform: rotate(180deg);
}

.till-fold-body {
  padding: 0 16px 16px;
}

.till-fold-body > .card,
.till-fold-body > .side-card {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.till-fold-body > .card::before,
.till-fold-body > .card::after {
  display: none;
}

/* ---------- task time fields ---------- */
.task-time-row .accounts-sort-select {
  min-width: 0;
}

.task-time-field input[type="time"] {
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--till-tone, #6a5ce2) 30%, transparent);
  border-radius: 12px;
  background: var(--theme-glass, rgba(255, 255, 255, .74));
  color: var(--text1);
  font: inherit;
  font-size: 12.5px;
  font-weight: 760;
}

/* dropdown menus must open over the neighbouring cards, not under them */
.employee-calendar-card:has(.accounts-sort-select.is-open) {
  position: relative !important;
  z-index: 60 !important;
  overflow: visible !important;
}

#employeeWorkspace .task-time-row .accounts-sort-menu {
  inset-inline-start: auto;
  inset-inline-end: 0;
  min-width: 190px;
}
