.records-view {
  background: transparent;
  padding: 0;
  display: flex;
  flex: 1;
  min-height: 0;
}

.records-view__card {
  background: #fff;
  border-radius: 24px 24px 0px 0px;
  padding: 16px 16px calc(16px + var(--nav-height) + env(safe-area-inset-bottom));
  flex: 1;
  min-height: 100vh;
  height: 100%;
  max-height: none;
  overflow: visible;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.records-toggle {
  display: inline-flex;
  border-radius:24px;
  background: #f1f3f7;
  border: 1px solid #e7ebf2;
  align-self: center;
  height: 40px;
  padding: 2px;
 
}

.records-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 12px;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  color: #1B1B1B;
  
}

.records-toggle button img {
  width: 24px;
  height: 24px;
}

.records-toggle button.active {
 background: #ffffff;
    color: #111;
    border-radius: 16px;
}

.records-toggle button.active img {
  filter: brightness(0) saturate(100%);
}

.records-list-view {
  display: grid;
  gap: 10px;
  width: 100%;
}

.records-date-label {
  margin: 20px 0 12px;
  font-weight: 400;
  font-size: 12px;
  color: #B2BED0;
  text-align: center;
}

.record-swipe {
  position: relative;
  overflow: hidden;
}

.record-swipe__actions {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  gap: 10px;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.record-swipe__actions--left {
  left: 12px;
  right: auto;
}

.record-swipe__action {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  cursor: pointer;
}

.record-swipe__action--edit {
  background: #f5a524;
}
.record-swipe__action--delete {
  background: #f25757;
}
.record-swipe__action--done {
  background: #22c55e;
}
.record-swipe__action img {
  width: 16px;
  height: 16px;
}

.record-swipe__inner {
  position: relative;
  z-index: 1;
  transition: transform 160ms ease;
  will-change: transform;
}

.record-swipe--open .record-swipe__actions {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.record-swipe--open-left .record-swipe__actions--left {
  opacity: 0;
  pointer-events: none;
}

.record-swipe--open-right .record-swipe__actions:not(.record-swipe__actions--left) {
  opacity: 0;
  pointer-events: none;
}

.record-swipe--open .record-swipe__inner {
  pointer-events: none;
}

.record-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  padding: 10px 20px 10px 12px;
  border-radius: 16px;
  background: #F7F9FB;
  align-items: start;
  gap: 10px;
  position: relative;
}

.record-item__avatar {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: #dbeafe;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
}

.record-item__body {
  display: grid;
  gap: 4px;
}

.record-item__time {
  font-weight: 600;
  font-size: 12px;
  color: #111827;
}

.record-item__name {
  font-weight: 600;
  font-size: 14px;
  margin: 0;
}

.record-item__service {
  margin: 0;
  color: #374151;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-item__service-indicator {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  flex-shrink: 0;
}

.record-item__price {
  font-weight: 400;
  font-size: 14px;
  color: #111827;
  display: flex;
  align-items: flex-end;
  align-self: end;
  justify-self: end;
}

.record-item::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0px;
  width: 16px;
  height: 16px;
  background: url("../images/icons/dots.svg") center/contain no-repeat;
  transform: translateY(-50%);
  pointer-events: none;
}

.records-timeline {
  display: none;
  width: 100%;
  display: grid;
  gap: 16px;
}

.records-timeline__day {
  display: grid;
  gap: 10px;
}

.records-timeline__grid {

  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 10px;
  row-gap: 0;
}

.records-timeline__times {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  align-content: start;
  gap: 0;
}

.records-timeline__events {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  align-content: start;
  gap: 0;
  position: relative;
}

.records-timeline__times .slot,
.records-timeline__events .slot {
  display: block;
  width: 100%;
}

.records-timeline__times .slot {
  padding: 0;
  height: 32px;
  font-weight: 700;
  color: #1B1B1B;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.records-timeline__times .time--half {
  font-size: 10px;
  color: #c6d4e1;
}

.records-timeline__events .slot {
  padding: 0;
  height: 32px;
  display: flex;
  align-items: flex-start;
  position: relative;
}

.records-timeline__grid .slot:last-child {
  border-bottom: none;
}

.records-timeline__events .slot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #c7ccd6;
  transform: translateY(-50%);
}

.records-timeline__events .slot.events--full::before {
  top: 8px;
  transform: none;
}

.records-timeline__events .slot.events--half::before {
  border-top-style: dashed;
  top: 6px;
  transform: none;
}

.records-timeline__events .event {
  position: absolute;
  z-index: 2;
  padding: 5px 10px;
  padding-left: 14px;
  background: transparent;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
}

.records-timeline__events .event::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--service-color, #c7ccd6);
  z-index: 1;
}

.records-timeline__events .event::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--event-bg, #e0f2fe);
  opacity: 0.7;
  z-index: 0;
}

.records-timeline__events .event span {
  font-weight: 400;
  font-size: 12px;
}

.records-timeline__events .event__content {
  display: grid;
  position: relative;
  z-index: 2;
 
}

.records-timeline__events .event__name {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
}

.records-timeline__events .event__service {
  font-weight: 500;
  font-size: 12px;
  color: #1B1B1B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.records-timeline__events .event__price {
  font-weight: 600;
  font-size: 12px;
  color: #111827;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.records-timeline__events .event__service-indicator {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  flex-shrink: 0;
}

.records-timeline__events .timeline-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid #111827;
  z-index: 3;
}

.records-timeline__events .timeline-now::before {
  content: "";
  position: absolute;
  left: -10px;
  top: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111827;
}
