:root{
  --manager-accent: #0f766e;
  --manager-soft: rgba(15,118,110,0.15);
}

.app--managers{
  padding-bottom: 76px;
}
.app--managers.is-salary-view .meta--date{
  display: none;
}
.app--managers.is-input-focus .topbar__aux{
  display: none;
}
.app--managers.is-input-focus .bottom-nav{
  display: none;
}
body.is-keypad-open .app{
  filter: blur(12px) saturate(0.9);
}
body.is-keypad-open{
  overflow: hidden;
}

.keypad{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  flex-direction: column;
  gap: 10px;
}
.keypad.is-visible{
  display: flex;
}
.keypad__overlay{
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.35);
  backdrop-filter: blur(12px);
}
.keypad__preview{
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .2s ease, transform .2s ease;
}
.keypad.is-visible .keypad__preview{
  opacity: 1;
  transform: translateY(0);
}
.keypad__preview-card{
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(15,118,110,0.35);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 30px rgba(15,118,110,0.18);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.keypad__preview-label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(28,27,24,0.55);
}
.keypad__preview-value{
  font-weight: 700;
  font-size: 20px;
  color: #0b7d7c;
}
.keypad__panel{
  position: relative;
  width: min(560px, 92vw);
  border-radius: 22px;
  border: 1px solid rgba(20,20,18,0.12);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 24px 40px rgba(20,20,18,0.18);
  backdrop-filter: blur(16px);
  padding: 14px;
  display: grid;
  gap: 12px;
  z-index: 1;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .2s ease, transform .2s ease;
}
.keypad.is-visible .keypad__panel{
  opacity: 1;
  transform: translateY(0);
}
.keypad__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.keypad__label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(28,27,24,0.55);
}
.keypad__value{
  font-weight: 700;
  font-size: 18px;
}
.keypad__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.keypad__btn{
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(14,165,164,0.35);
  background: rgba(255,255,255,0.95);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease;
}
.keypad__btn:active{
  transform: translateY(1px);
}
.keypad__btn--ghost{
  border-color: rgba(20,20,18,0.16);
  background: rgba(255,255,255,0.8);
  font-size: 14px;
}
.keypad__actions{
  display: flex;
  justify-content: flex-end;
}
.keypad__actions .btn{
  width: 100%;
  justify-content: center;
}


.manager-panel.is-hidden{
  display: none;
}

.period-block{
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.filter{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter__label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(28,27,24,0.65);
}
.period-picker__value{
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  text-align: center;
  flex: 1;
  min-width: 0;
  pointer-events: none;
}

.quick-range{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-range__btn{
  border: 1px solid rgba(20,20,18,0.14);
  background: rgba(255,255,255,0.85);
  color: rgba(28,27,24,0.8);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease;
}
.quick-range__btn:hover{
  border-color: rgba(15,118,110,0.4);
  box-shadow: 0 10px 18px rgba(15,118,110,0.18);
}
.quick-range__btn.is-active{
  background: rgba(15,118,110,0.12);
  border-color: rgba(15,118,110,0.45);
  color: #0b7d7c;
}

.calendar-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.calendar-cell--range{
  background: rgba(14,165,164,0.1);
}
.calendar-cell--range-start,
.calendar-cell--range-end{
  background: linear-gradient(180deg, rgba(14,165,164,0.35), rgba(14,165,164,0.15));
  color: #0f2626;
}

.field__input--money{
  cursor: text;
  user-select: text;
  caret-color: auto;
}
.field.is-active{
  border-color: rgba(15,118,110,0.5);
  box-shadow: 0 16px 28px rgba(15,118,110,0.2);
}
.field.is-active .field__label{
  color: #0b7d7c;
  font-weight: 700;
}
.field__input--money::placeholder{
  color: rgba(28,27,24,0.35);
}

.summary-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.summary-item{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid rgba(20,20,18,0.08);
  box-shadow: 0 12px 30px rgba(18,18,16,0.06);
}
.summary-item__label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.summary-item__value{
  font-size: 20px;
  font-weight: 700;
}
.summary-item--accent{
  border-color: rgba(15,118,110,0.45);
  background: linear-gradient(150deg, rgba(15,118,110,0.18), rgba(255,255,255,0.98));
  box-shadow: 0 18px 32px rgba(15,118,110,0.18);
}

.hint-card{
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(20,20,18,0.18);
  background: rgba(255,255,255,0.7);
  color: rgba(28,27,24,0.75);
  display: grid;
  gap: 6px;
}
.hint-card__title{
  font-weight: 700;
  font-size: 13px;
}
.hint-card__text{
  font-size: 13px;
  line-height: 1.4;
}


.salary-card{
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(20,20,18,0.1);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 16px 32px rgba(20,20,18,0.1);
  display: grid;
  gap: 14px;
}
.salary-card__top{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.salary-card__label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(28,27,24,0.55);
}
.salary-card__value{
  font-size: 22px;
  font-weight: 700;
}
.salary-card__value--accent{
  color: #0b7d7c;
}
.salary-card__accent{
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,118,110,0.35);
  background: rgba(15,118,110,0.12);
  text-align: right;
}

.breakdown{
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(20,20,18,0.08);
}
.breakdown__row{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(28,27,24,0.8);
  column-gap: 6px;
}
.breakdown__row--total{
  padding-top: 8px;
  border-top: 1px dashed rgba(20,20,18,0.18);
  margin-top: 6px;
}
.breakdown__row strong{
  font-weight: 700;
  color: rgba(28,27,24,0.9);
}
.breakdown__earn{
  text-align: right;
  font-weight: 700;
  color: #0b7d7c;
}

@media (max-width: 520px){
  .salary-card{
    padding: 12px;
  }
  .salary-card__top{
    flex-direction: column;
    align-items: stretch;
  }
  .salary-card__accent{
    width: 100%;
    text-align: left;
  }
  .breakdown__row{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    font-size: 13px;
    column-gap: 4px;
  }
  .history-item__row{
    flex-direction: column;
    align-items: flex-start;
  }
  .history-item__salary{
    align-self: flex-start;
  }
  .history-detail__row{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    font-size: 11px;
    row-gap: 2px;
  }
  .history-detail__row strong,
  .history-detail__earn{
    text-align: left;
  }
}
.breakdown--calc{
  border-top: 1px dashed rgba(20,20,18,0.2);
  padding-top: 10px;
}

.shift-stats{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.shift-stats__item{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(20,20,18,0.12);
  background: rgba(255,255,255,0.8);
}
.shift-stats__label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(28,27,24,0.55);
}
.shift-stats__value{
  font-weight: 700;
  font-size: 16px;
  margin-top: 6px;
}

.formula{
  margin-top: 12px;
  font-size: 13px;
  color: rgba(28,27,24,0.6);
}

.history-list{
  display: grid;
  gap: 10px;
}
.history-item{
  border: 1px solid rgba(20,20,18,0.12);
  background: rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
  max-width: 100%;
  overflow: hidden;
}
.history-item__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.history-item:hover{
  border-color: rgba(15,118,110,0.4);
  box-shadow: 0 12px 24px rgba(15,118,110,0.16);
}
.history-item.is-open{
  border-color: rgba(15,118,110,0.5);
  box-shadow: 0 12px 24px rgba(15,118,110,0.16);
}
.history-detail{
  display: none;
  border: 1px dashed rgba(20,20,18,0.18);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.8);
  overflow: hidden;
  max-width: 100%;
}
.history-item.is-open .history-detail{
  display: grid;
  gap: 6px;
}
.history-detail__row{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 6px;
  align-items: center;
  font-size: 12px;
  color: rgba(28,27,24,0.8);
  line-height: 1.2;
}
.history-detail__row strong{
  font-weight: 700;
}
.history-detail__earn{
  text-align: right;
  font-weight: 700;
  color: #0b7d7c;
}
.history-item__date{
  font-weight: 700;
  font-size: 15px;
}
.history-item__meta{
  font-size: 12px;
  color: rgba(28,27,24,0.55);
  margin-top: 4px;
}
.history-item__status{
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid rgba(20,20,18,0.12);
  color: rgba(28,27,24,0.7);
  background: rgba(255,255,255,0.9);
}
.history-item__status--pending{
  color: #b45309;
  border-color: rgba(180,83,9,0.35);
  background: rgba(252,211,77,0.18);
}
.history-item__status--rejected{
  color: #b91c1c;
  border-color: rgba(185,28,28,0.35);
  background: rgba(254,202,202,0.2);
}
.history-item__salary{
  font-weight: 700;
  color: #0b7d7c;
  font-size: 15px;
}
.history-item.is-pending .history-item__salary{
  color: rgba(11,125,124,0.7);
}
.history-item.is-rejected .history-item__salary{
  color: rgba(185,28,28,0.8);
}
.history-empty{
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(20,20,18,0.18);
  color: rgba(28,27,24,0.6);
  background: rgba(255,255,255,0.7);
  font-size: 13px;
}

.bottom-nav{
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  transform: translateX(-50%);
  width: min(560px, 92vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  border: 1px solid rgba(20,20,18,0.12);
  background: rgba(255,255,255,0.86);
  box-shadow: 0 24px 40px rgba(20,20,18,0.2);
  backdrop-filter: blur(16px);
  z-index: 60;
}
.bottom-nav__btn{
  border: 1px solid transparent;
  background: transparent;
  border-radius: 16px;
  padding: 12px 10px;
  font-weight: 700;
  cursor: pointer;
  color: rgba(28,27,24,0.75);
  transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
}
.bottom-nav__btn.is-active{
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  border-color: rgba(14,165,164,0.5);
  box-shadow: 0 16px 28px rgba(14,165,164,0.25);
}
.bottom-nav__btn:active{
  transform: translateY(1px);
}

@media (max-width: 860px){
  .topbar__grid{
    grid-template-columns: 1fr;
  }
  .salary-card__top{
    flex-direction: column;
    align-items: flex-start;
  }
  .salary-card__accent{
    width: 100%;
    text-align: left;
  }
}
