/* SAME — BRUT / barre de commandes compacte + menu Période. */
[data-testid='history-mobile-gross-detail'] {
  position: relative;
}

.same-brut-toolbar-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.same-brut-toolbar-period-wrap {
  position: relative;
}

.same-brut-toolbar-button,
.same-brut-toolbar-icon {
  height: 30px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 7px;
  background: rgba(255,255,255,.018);
  color: rgba(205,216,229,.74);
  font-size: 10px;
  line-height: 1;
  font-weight: 650;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.same-brut-toolbar-button {
  min-width: 82px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.same-brut-toolbar-button > span:last-child {
  color: rgba(213,182,106,.66);
  font-size: 10px;
}

.same-brut-toolbar-icon {
  width: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.same-brut-toolbar-icon[data-kind='close'] {
  font-size: 17px;
  color: rgba(210,220,232,.66);
}

.same-brut-toolbar-button:hover,
.same-brut-toolbar-icon:hover,
.same-brut-toolbar-button[aria-expanded='true'] {
  border-color: rgba(255,196,76,.19);
  background: rgba(255,190,65,.025);
  color: rgba(241,232,213,.9);
}

.same-brut-period-menu,
.same-brut-calendar {
  position: absolute;
  top: 35px;
  right: 0;
  z-index: 20;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px;
  background: linear-gradient(160deg, rgba(10,21,34,.995), rgba(5,12,22,.998));
  box-shadow: 0 16px 36px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.035);
}

.same-brut-period-menu {
  width: 154px;
  padding: 5px;
}

.same-brut-period-menu[hidden],
.same-brut-calendar[hidden] {
  display: none !important;
}

.same-brut-period-option {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(183,196,211,.76);
  font-size: 9px;
  line-height: 1;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.same-brut-period-option:hover,
.same-brut-period-option:focus-visible {
  outline: none;
  background: rgba(255,190,65,.045);
  color: rgba(242,234,216,.94);
}

.same-brut-period-option[aria-checked='true'] {
  color: rgba(239,201,111,.94);
  background: rgba(255,190,65,.035);
}

.same-brut-period-option[aria-checked='true']::after {
  content: '✓';
  color: rgba(232,197,117,.78);
  font-size: 9px;
}

.same-brut-period-custom {
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,.055);
  border-radius: 0 0 6px 6px;
  padding-top: 3px;
}

.same-brut-calendar-icon {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  color: rgba(224,190,109,.76);
}

.same-brut-calendar-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.same-brut-calendar {
  width: 238px;
  padding: 9px;
}

.same-brut-calendar-top {
  height: 28px;
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 4px;
}

.same-brut-calendar-top strong {
  text-align: center;
  color: rgba(230,236,244,.9);
  font-size: 10px;
  line-height: 1;
  font-weight: 720;
}

.same-brut-calendar-nav {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 6px;
  background: rgba(255,255,255,.015);
  color: rgba(185,198,214,.72);
  font-size: 15px;
  cursor: pointer;
}

.same-brut-calendar-nav:hover {
  border-color: rgba(255,196,76,.16);
  color: rgba(239,224,192,.92);
}

.same-brut-calendar-weekdays,
.same-brut-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.same-brut-calendar-weekdays {
  margin-top: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.045);
}

.same-brut-calendar-weekdays span {
  height: 18px;
  display: grid;
  place-items: center;
  color: rgba(101,118,139,.7);
  font-size: 7px;
  font-weight: 800;
}

.same-brut-calendar-days {
  margin-top: 5px;
}

.same-brut-calendar-empty,
.same-brut-calendar-day {
  height: 25px;
}

.same-brut-calendar-day {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(178,191,207,.76);
  font-size: 8px;
  font-weight: 650;
  cursor: pointer;
}

.same-brut-calendar-day:hover {
  background: rgba(255,190,65,.04);
  color: rgba(242,232,211,.94);
}

.same-brut-calendar-day[data-range='true'] {
  background: rgba(255,190,65,.055);
  color: rgba(234,211,160,.9);
}

.same-brut-calendar-day[data-edge='start'],
.same-brut-calendar-day[data-edge='end'] {
  background: rgba(224,183,82,.19);
  box-shadow: inset 0 0 0 1px rgba(235,198,111,.32);
  color: rgba(255,241,210,.98);
}

.same-brut-calendar-range {
  min-height: 24px;
  margin: 7px 0 0;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.045);
  color: rgba(129,145,164,.72);
  font-size: 8px;
  line-height: 12px;
  font-weight: 600;
  text-align: center;
}

.same-brut-calendar-actions {
  margin-top: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.same-brut-calendar-cancel,
.same-brut-calendar-apply {
  height: 29px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 750;
  cursor: pointer;
}

.same-brut-calendar-cancel {
  border: 1px solid rgba(255,255,255,.065);
  background: rgba(255,255,255,.012);
  color: rgba(166,181,199,.72);
}

.same-brut-calendar-apply {
  border: 1px solid rgba(232,194,105,.18);
  background: rgba(255,190,65,.055);
  color: rgba(236,208,145,.92);
}

.same-brut-calendar-apply:disabled {
  opacity: .34;
  cursor: default;
}

@media (max-width: 639px) {
  .same-brut-toolbar-actions {
    gap: 4px;
  }

  .same-brut-toolbar-button {
    min-width: 70px;
    padding-inline: 7px;
    font-size: 9px;
  }

  .same-brut-toolbar-icon {
    width: 28px;
  }

  .same-brut-period-menu {
    width: 148px;
  }

  .same-brut-calendar {
    width: 226px;
  }
}
