/* Agent · Dashboard for every product. Builds on base.css + flight.css. Product colours:
   Flights #3965fa · Hotels #f0885a · eSIM #55c43a · Transport #949cf6 (also in home.js D_PRODUCTS). */

/* Split bar inside a number tile */
.d-split {
  display: flex;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 6px;
  gap: 2px;
}
.d-split i {
  display: block;
  height: 100%;
}
.d-split i:first-child {
  border-radius: 6px 0 0 6px;
}
.d-split i:last-child {
  border-radius: 0 6px 6px 0;
}

/* Chart: stacked columns + legend */
.d-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
}
.d-chart .d-col {
  transition: opacity 0.25s var(--ease);
}
.d-chart .d-col.is-mtd {
  opacity: 0.45;
}
.d-chart.is-hovering .d-col:not(.is-hover) {
  opacity: 0.3;
}
.d-chart.is-hovering .d-col.is-hover {
  opacity: 1;
}
.d-tipline {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.d-tipline i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.d-tipline b {
  margin-left: auto;
  padding-left: 12px;
  color: #fff;
  font-weight: 600;
}

/* Product icon tile */
.d-pic {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--pc) 14%, #fff);
  color: var(--pc);
}
.d-pic .icon {
  width: 18px;
  height: 18px;
}
.d-pic--sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.d-pic--sm .icon {
  width: 16px;
  height: 16px;
}

/* Needs action today */
.d-todo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.d-todo:first-child {
  padding-top: 0;
  border-top: 0;
}
.d-todo__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}
.d-todo__body b {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-todo__body span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-todo__right {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.d-todo__right .btn {
  white-space: nowrap;
}
.d-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.d-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}
.d-more .icon {
  width: 14px;
  height: 14px;
}

/* Travelling this week */
.d-day + .d-day {
  margin-top: 14px;
}
.d-day h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}
.d-day h3 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.d-trip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  color: var(--ink);
}
.d-trip:hover b {
  color: var(--primary);
}
.d-dot {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pc) 14%, #fff);
  color: var(--pc);
}
.d-dot .icon {
  width: 14px;
  height: 14px;
}
.d-trip__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}
.d-trip__body b {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-trip__body span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-trip em {
  flex: none;
  color: var(--ink-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

/* Top destinations */
.d-dests {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.d-dest {
  display: flex;
  align-items: center;
  gap: 10px;
}
.d-noflag {
  display: grid;
  width: 20px;
  height: 14px;
  place-items: center;
  color: var(--muted);
}
.d-noflag .icon {
  width: 14px;
  height: 14px;
}
.d-dest__body {
  min-width: 0;
  flex: 1;
}
.d-dest__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 13px;
}
.d-dest__top b {
  font-weight: 600;
}
.d-dest__top span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.d-stack {
  display: flex;
  min-width: 12px;
  height: 8px;
  overflow: hidden;
  border-radius: 6px;
  gap: 2px;
}
.d-stack i {
  display: block;
  height: 100%;
}

/* Recent bookings rows open the booking */
.d-recent tbody tr {
  cursor: pointer;
}
.d-recent tbody tr:hover {
  background: var(--page);
}

@media (max-width: 640px) {
  .d-legend {
    justify-content: flex-start;
  }
  .d-todo {
    flex-wrap: wrap;
  }
  .d-todo__right {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-left: 48px;
  }
}
/* Countdown sits under the title, so long hotel names have room */
.d-todo__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}
.d-todo__meta > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-todo__meta .countdown,
.d-todo__meta .d-tag {
  flex: none;
}
@media (max-width: 640px) {
  .d-todo {
    flex-wrap: nowrap;
  }
  .d-todo__right {
    width: auto;
    padding-left: 0;
  }
  .d-todo__meta {
    flex-wrap: wrap;
    gap: 2px 8px;
  }
}
/* Grid cells may shrink below their content, so long rows never widen the page */
body[data-page='dashboard'] .grid-2 > *,
body[data-page='dashboard'] .grid-3 > * {
  min-width: 0;
}
