/* R84. Loaded after R81 and page stylesheet bundles. Only R84 scope overrides. */

/* Board: foot-waybill beside the driver's name; ID and live count below. */
.plan-board-page .plan-board-lane-wrap__head--driver.has-foot-waybill {
  padding-right: 8px;
}
.plan-board-page .plan-board-lane-wrap__head--driver .plan-board-lane-driver {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.plan-board-page .plan-board-lane-wrap__head--driver .plan-board-lane-wrap__title {
  min-width: 0;
  flex: 1 1 auto;
}
.plan-board-page .plan-board-lane-wrap__head--driver .plan-board-lane-wrap__meta-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  width: 100%;
  margin-top: 4px;
}
.plan-board-page .plan-board-lane-wrap__head--driver .plan-board-lane-wrap__sub {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-board-page .plan-board-lane-wrap__head--driver .plan-board-lane-wrap__count {
  flex: 0 0 auto;
}
.plan-board-page .plan-board-lane-wrap__head--driver .plan-board-lane-wrap__actions {
  flex: 0 0 auto;
  margin-top: 5px;
}
.plan-board-page .plan-board-lane-wrap__head--driver button.btn-plan.plan-board-lane-foot-waybill {
  position: static;
  inset: auto;
  transform: none;
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 24px !important;
  padding: 0 !important;
}
.plan-board-page .plan-board-lane-wrap__head--driver button.btn-plan.plan-board-lane-foot-waybill:active {
  transform: translateY(1px);
}

/* Mobile driver's Other menu opens from the right. Preserve existing z-index/inert. */
@media (max-width: 1024px) {
  html.aic-layout-refactor body.aic-driver-mobile-nav.r68-has-mini-sidebar #dashboardMiniSidebar {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    transform: translateX(calc(100% + 20px));
    transform-origin: center right;
    border-right: 0;
    border-left: 1px solid var(--ui-color-border, #dce3ed);
    box-shadow: -2px 0 14px rgba(15,23,42,.12);
    padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right))
             calc(12px + var(--safe-bottom)) 12px;
  }
  html.aic-layout-refactor body.aic-driver-mobile-nav.r68-has-mini-sidebar #dashboardMiniSidebar.is-open {
    transform: translateX(0);
  }
}

/* Staff account list ONLY, PC table unchanged. */
@media (max-width: 760px) {
  html.aic-layout-refactor .accounts .office-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 5px;
  }
  html.aic-layout-refactor .accounts .office-head__left {
    min-width: 0;
    max-width: 100%;
  }
  html.aic-layout-refactor .accounts .office-head__name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  html.aic-layout-refactor .accounts .mobile-account-main-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }
  html.aic-layout-refactor .accounts .mobile-account-person {
    display: flex;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
    align-items: baseline;
    justify-content: flex-start;
    gap: 4px 6px;
    overflow: visible;
  }
  html.aic-layout-refactor .accounts .mobile-account-id {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
    color: var(--ui-color-muted, #64748b);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }
  html.aic-layout-refactor .accounts .mobile-account-name,
  html.aic-layout-refactor .accounts .mobile-account-kana {
    flex: 0 1 auto;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
}

/* System announcement: unframed new bell and right-side category. */
.system-announcement-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.system-announcement-modal__header-main {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}
.system-announcement-modal__header-icon {
  position: relative;
  display: inline-flex;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  flex: 0 0 auto;
}
.system-announcement-modal__new-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  right: -1px;
  top: -2px;
  border-radius: 50%;
  background: currentColor;
}
.system-announcement-modal__header-types {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  margin-left: auto;
}
.system-announcement-modal__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Match the receiver's header in the developer preview, keep severity separate. */
.announcement-preview .announcement-preview__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
}
.announcement-preview .announcement-preview__heading {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.announcement-preview .announcement-preview__icon {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--ui-color-text);
  font-size: 17px;
}
.announcement-preview .announcement-preview__type {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  margin-left: auto;
}
.announcement-preview .announcement-preview__type .system-announcement-badge {
  font-size: 11px;
  font-weight: 600;
}
@media (max-width: 640px) {
  .system-announcement-modal__header {
    display: flex;
  }
  .system-announcement-modal__header-icon {
    width: auto;
    height: auto;
    border-radius: 0;
  }
  .system-announcement-modal__header-types {
    max-width: 100%;
  }
}
