/* Member Portal - generic layout styles (mobile-first) */

:root {
  --mp-navy: #46527a;
  --mp-navy-dark: #3a4468;
  --mp-blue: #4a6da8;
  --mp-blue-dark: #3d5c92;
  --mp-border: #e2e5ec;
  --mp-bg: #f2f4f8;
  --mp-text: #333333;
  --mp-muted: #666666;
  --mp-green: #3c9a5f;
  --mp-red: #c0392b;
  --mp-ticker-blue: #4aa3e0;
  --mp-nav-bg: #5c68a0;
  --mp-nav-active: #565e93;
  --mp-name-gold: #f5efc8;
  --mp-step-orange: #e6922e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--mp-bg);
  color: var(--mp-text);
}

a { text-decoration: none; color: inherit; }

.mp-link {
  color: var(--mp-blue);
  font-weight: 600;
}

.mp-link:hover { text-decoration: underline; }

/* ---------- Top notice ticker ---------- */
.mp-ticker {
  background: #fbfcfe;
  border-bottom: 1px solid var(--mp-border);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: space-between;
  align-items: center;
  color: var(--mp-ticker-blue);
}

.mp-ticker__right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mp-ticker__mail {
  font-size: 20px;
  line-height: 1;
  position: relative;
  top: -2px;
}

@media (min-width: 640px) {
  .mp-ticker {
    padding-left: 2in;
    padding-right: 2in;
  }
}


/* ---------- Brand header ---------- */
.mp-header {
  background: #fff;
  padding: 14px 16px;
  min-height: 103px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--mp-border);
}

@media (min-width: 640px) {
  .mp-header {
    padding-left: 2in;
  }
}

.mp-header__logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mp-header__mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mp-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 15px;
  flex-shrink: 0;
}

.mp-header__logo-img {
  height: 64px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex-shrink: 0;
}

.mp-header__title {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  color: #686868;
}

.mp-header__subtitle {
  font-size: 12px;
  color: var(--mp-muted);
  margin: 2px 0 0;
}

/* ---------- Alert strip ---------- */
.mp-alert-strip {
  background: linear-gradient(90deg, var(--mp-navy) 0%, var(--mp-blue) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 0;
}

.mp-alert-strip__viewport {
  overflow: hidden;
  white-space: nowrap;
  margin: 0 24px;
}

@media (min-width: 640px) {
  .mp-alert-strip__viewport {
    margin: 0 1in;
  }
}

.mp-alert-strip__track {
  display: inline-block;
  padding-left: 100%;
  animation: mp-marquee 32s linear infinite;
}

.mp-alert-strip:hover .mp-alert-strip__track {
  animation-play-state: paused;
}

@keyframes mp-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------- Side social rail (decorative, generic) ---------- */
.mp-rail {
  position: fixed;
  left: 0;
  top: calc(180px + 0.5in);
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 5;
}

.mp-rail__item {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: bold;
}

.mp-rail__item:nth-child(1) { background: #c0392b; }
.mp-rail__item:nth-child(2) { background: #d17d3a; }
.mp-rail__item:nth-child(3) { background: #3d92c8; }
.mp-rail__item:nth-child(4) { background: #3b5998; }

@media (min-width: 900px) {
  .mp-rail { display: flex; }
}

/* ---------- Login page ---------- */
.mp-login-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px 0.5in;
}

.mp-card {
  background: #fff;
  border-radius: 3%;
  border: 2px solid var(--mp-border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 608px;
  overflow: hidden;
}

.mp-card__head {
  padding: 20px 28px;
  font-weight: bold;
  color: var(--mp-red);
  font-size: 16px;
}

.mp-card__accent {
  height: 10px;
  width: 0;
  background: linear-gradient(180deg, #b7bfd4, #eef0f5);
  animation: mp-accent-load 1s ease-out forwards;
}

@keyframes mp-accent-load {
  from { width: 0; }
  to { width: 100%; }
}

.mp-card__body {
  padding: 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mp-field {
  margin-bottom: 22px;
}

.mp-field label {
  display: block;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 6px;
}

.mp-field input,
.mp-field select,
.mp-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--mp-border);
  border-radius: 5px;
  font-size: 15px;
  font-family: inherit;
}

.mp-field textarea {
  resize: vertical;
}

/* ---------- Claim status badges (member side) ---------- */
.mp-claim-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.mp-claim-status--ok { background: #dff3e6; color: var(--mp-green); }
.mp-claim-status--danger { background: #fdecea; color: var(--mp-red); }
.mp-claim-status--review { background: #e5eefb; color: var(--mp-blue); }
.mp-claim-status--pending { background: #fdf3dd; color: #b9860c; }

.mp-claim-empty {
  color: var(--mp-muted);
  padding: 8px 0;
}

.mp-field--row-spacer {
  display: none;
}

@media (min-width: 560px) {
  .mp-field--row {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .mp-field--row label {
    width: 150px;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .mp-field--row input {
    flex: 1;
  }

  .mp-field--row-spacer {
    display: block;
    width: 150px;
    flex-shrink: 0;
  }
}

.mp-captcha-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.mp-captcha-box {
  position: relative;
  background: #fff;
  border: 1px solid var(--mp-border);
  padding: 14px 22px;
  border-radius: 5px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
}

.mp-captcha-box::before,
.mp-captcha-box::after {
  content: "";
  position: absolute;
  left: -15%;
  width: 130%;
  height: 2px;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.mp-captcha-box::before {
  top: 40%;
  transform: rotate(-9deg);
}

.mp-captcha-box::after {
  top: 65%;
  transform: rotate(6deg);
}

.mp-captcha-box__char {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 32px;
  color: #1a1a1a;
}

.mp-captcha-box__char:nth-child(1) { transform: rotate(-3deg); }
.mp-captcha-box__char:nth-child(2) { transform: rotate(2deg); }
.mp-captcha-box__char:nth-child(3) { transform: rotate(-2deg); }
.mp-captcha-box__char:nth-child(4) { transform: rotate(3deg); }
.mp-captcha-box__char:nth-child(5) { transform: rotate(-2deg); }
.mp-captcha-box__char:nth-child(6) { transform: rotate(2deg); }

.mp-captcha-refresh {
  font-size: 28px;
  color: var(--mp-blue);
  cursor: pointer;
}

.mp-captcha-input {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
}

@media (min-width: 560px) {
  .mp-captcha-input.mp-field--row input {
    flex: 0 0 auto;
    width: 220px;
  }
}

.mp-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--mp-blue);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
}

.mp-btn:hover { background: var(--mp-blue-dark); }

/* ---------- Footer ---------- */
.mp-footer {
  background: linear-gradient(90deg, var(--mp-blue) 0%, var(--mp-navy-dark) 100%);
  color: #cfd6e6;
  padding: 18px 20px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mp-footer__spacer {
  display: none;
}

.mp-footer__center {
  text-align: center;
}

.mp-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
  color: #fff;
}

.mp-footer__divider {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.mp-footer__copyright {
  color: #cfd6e6;
}

.mp-footer__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mp-footer__social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-footer__social-icon {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.mp-footer__social-icon--1 { background: #c0392b; }
.mp-footer__social-icon--2 { background: #d17d3a; }
.mp-footer__social-icon--3 { background: #3d92c8; }
.mp-footer__social-icon--4 { background: #3b5998; }

.mp-footer__version {
  font-size: 11px;
  color: #9aa4bd;
}

@media (min-width: 768px) {
  .mp-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 20px;
  }

  .mp-footer__spacer {
    display: block;
  }

  .mp-footer__side {
    flex-direction: row;
    justify-self: end;
    padding-right: 1in;
  }
}

/* ---------- App nav bar ---------- */
.mp-nav {
  background: rgba(63, 77, 143, 0.85);
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

@media (min-width: 900px) {
  .mp-nav {
    padding-left: 2in;
    padding-right: 2in;
  }
}

.mp-nav__items {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
}

.mp-nav__item {
  padding: 16px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.mp-nav__item.is-active {
  background: var(--mp-nav-active);
}

.mp-nav__item.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: #e8a94a;
}

.mp-nav__dropdown { position: relative; }

.mp-nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  color: var(--mp-text);
  min-width: 180px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  border-radius: 0 0 4px 4px;
  z-index: 20;
}

.mp-nav__dropdown:hover .mp-nav__dropdown-menu,
.mp-nav__dropdown:focus-within .mp-nav__dropdown-menu {
  display: block;
}

.mp-nav__dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: normal;
}

.mp-nav__dropdown-menu a:hover { background: var(--mp-bg); }

.mp-nav__user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 15px 16px;
  font-size: 14px;
  font-weight: 600;
}

.mp-nav__user-name { color: var(--mp-name-gold); font-weight: normal; }

.mp-logout-form { display: inline; }

.mp-logout-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 720px) {
  .mp-nav__items { order: 2; width: 100%; }
  .mp-nav__user { order: 1; width: 100%; justify-content: space-between; }
}

/* ---------- Page shell ---------- */
.mp-page {
  padding: 2% 7% 40px;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - 320px);
}

.mp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .mp-grid--2col {
    grid-template-columns: 1fr 1fr;
  }

  .mp-grid--profile {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }
}

.mp-panel {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  padding: 16px;
}

.mp-page > .mp-panel + .mp-panel {
  margin-top: 16px;
}

.mp-subcard {
  border: 1px solid var(--mp-border);
  border-radius: 6px;
  padding: 22px;
  margin-top: 20px;
}

.mp-panel--slim {
  padding-top: 10px;
  padding-bottom: 10px;
}

.mp-toolbar--flush {
  margin-bottom: 0;
}

.mp-panel__title {
  font-size: 15px;
  font-weight: bold;
  color: var(--mp-navy-dark);
  margin: 0 0 4px;
}

.mp-panel__title--lg {
  font-size: 24px;
}

.mp-panel__underline {
  width: 8ch;
  height: 3px;
  background: #e8a94a;
  margin-bottom: 16px;
  animation: mp-underline-load 0.6s ease-out;
}

@keyframes mp-underline-load {
  from { width: 0; }
  to { width: 8ch; }
}

.mp-panel__hint {
  font-size: 13px;
  color: var(--mp-muted);
}

.mp-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--mp-border);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
}

.mp-stat-row + .mp-stat-row { margin-top: 10px; }
.mp-stat-row--spaced { margin-top: 14px; }

.mp-stat-row--plain {
  border: none;
  padding: 0 17px;
}

.mp-pill {
  background: var(--mp-border);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
}

.mp-pill--ok { background: #dff3e6; color: var(--mp-green); }

.mp-balance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  font-size: 13px;
}

.mp-balance-row + .mp-balance-row { margin-top: 12px; }

.mp-balance-row__num {
  font-weight: bold;
  color: var(--mp-muted);
}

.mp-balance-row__id {
  background: #8a8f98;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.mp-balance-row__id--ok { background: #4a9a6a; }

.mp-balance-row__refresh {
  color: var(--mp-muted);
  cursor: pointer;
}

.mp-balance-row__amount { margin-left: auto; }

.mp-error-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ff0000;
  font-size: 12px;
  font-weight: normal;
  white-space: nowrap;
}

.mp-detail-list dt {
  font-size: 12px;
  color: var(--mp-muted);
  margin-top: 12px;
}

.mp-detail-list dt:first-child { margin-top: 0; }

.mp-detail-list dd {
  margin: 4px 0 12px;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mp-border);
}

.mp-detail-list--row {
  display: grid;
  grid-template-columns: 25% 75%;
  column-gap: 0;
}

.mp-detail-list--row dt {
  grid-column: 1;
  font-size: 14px;
  font-weight: bold;
  color: var(--mp-text);
  margin: 0;
  padding: 18px 24px 18px 0;
  border-bottom: 1px solid var(--mp-border);
}

.mp-detail-list--row dd {
  grid-column: 2;
  font-size: 14px;
  font-weight: normal;
  color: #6c757d;
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--mp-border);
  text-align: left;
}

.mp-detail-value--box {
  display: inline-block;
  border: 1px solid var(--mp-border);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--mp-text);
  font-weight: normal;
  font-size: 14px;
  text-align: left;
}

.mp-detail-list--overview {
  display: grid;
  grid-template-columns: 150px 1fr;
  column-gap: 20px;
  row-gap: 18px;
  align-items: center;
}

.mp-detail-list--overview dt {
  grid-column: 1;
  font-size: 14px;
  font-weight: bold;
  color: var(--mp-text);
  margin: 0;
  padding: 0;
  border: 0;
}

.mp-detail-list--overview dd {
  grid-column: 2;
  margin: 0;
  padding: 0;
  border: 0;
}

.mp-verified-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--mp-border);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--mp-green);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Profile ---------- */
.mp-avatar-card {
  text-align: center;
}

.mp-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #b7c2d6;
  color: #fff;
  font-size: 38px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.mp-avatar-card__name {
  font-size: 24px;
  font-weight: bold;
  color: #222;
  margin-bottom: 20px;
}

.mp-flash {
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
}

.mp-flash--ok { background: #dff3e6; color: var(--mp-green); }
.mp-flash--err { background: #fdecea; color: var(--mp-red); }

.mp-edit {
  margin-top: 16px;
  text-align: left;
}

.mp-edit__toggle {
  cursor: pointer;
  color: var(--mp-blue);
  font-weight: 600;
  font-size: 13px;
  list-style: none;
}

.mp-edit__toggle::-webkit-details-marker { display: none; }

.mp-edit__form {
  margin-top: 14px;
}

.mp-edit__field {
  margin-bottom: 12px;
}

.mp-edit__field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 5px;
}

.mp-edit__field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--mp-border);
  border-radius: 4px;
  font-size: 14px;
}

.mp-edit .mp-btn {
  width: auto;
  display: inline-block;
  padding: 8px 20px;
  font-size: 14px;
}

.mp-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  text-align: center;
  color: var(--mp-text);
}

.mp-chip__icon {
  color: var(--mp-muted);
  width: 16px;
  text-align: center;
}

.mp-chip__label {
  background: #eaf2ff;
  color: var(--mp-blue);
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
}

.mp-badge {
  display: inline-block;
  background: var(--mp-red);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 3px;
}

/* ---------- Passbook ---------- */
.mp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.mp-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--mp-border);
  border-radius: 4px;
}

.mp-toolbar__spacer { flex: 1; }

.mp-toolbar--end { justify-content: flex-end; }

.mp-toolbar--between {
  justify-content: space-between;
  margin-bottom: 16px;
}

.mp-panel__title--flex {
  flex: 1;
  margin: 0;
}

.mp-passbook-caption {
  font-size: 14px;
  color: var(--mp-text);
  margin: 0;
}

.mp-summary-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  color: #fff;
}

.mp-summary-badge--red { background: var(--mp-red); }
.mp-summary-badge--green { background: var(--mp-green); }
.mp-summary-badge--blue { background: var(--mp-ticker-blue); }

.mp-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--mp-muted);
  margin-top: 16px;
}

.mp-btn-outline {
  border: 1px solid var(--mp-navy);
  color: var(--mp-navy);
  background: #fff;
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.mp-btn-fill {
  display: inline-block;
  border: none;
  color: #fff;
  background: var(--mp-blue);
  padding: 9px 14px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.mp-btn-fill:hover { background: var(--mp-blue-dark); }

.mp-btn-nav {
  min-width: 72px;
  font-size: 16px;
}

.mp-fy-select {
  min-width: 420px;
  flex: 1;
  max-width: 560px;
}

.mp-btn-fill--muted {
  background: #7a828f;
}

.mp-btn-fill--muted:hover { background: #626973; }
.mp-btn-fill--muted.is-active { background: var(--mp-navy-dark); }

.mp-table-scroll { overflow-x: auto; }

.mp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

.mp-table th, .mp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--mp-border);
  text-align: right;
  white-space: nowrap;
}

.mp-table th:first-child, .mp-table td:first-child,
.mp-table th:nth-child(2), .mp-table td:nth-child(2),
.mp-table th:nth-child(4), .mp-table td:nth-child(4) {
  text-align: left;
}

.mp-table thead th {
  background: #f6f7fa;
  font-weight: bold;
}

.mp-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.mp-tag--credit { background: var(--mp-green); }
.mp-tag--debit { background: var(--mp-red); }

.mp-table tfoot td {
  font-weight: bold;
  border-bottom: none;
}

/* ---------- Passbook table ---------- */
.mp-passbook-table { min-width: 900px; }

.mp-passbook-table th,
.mp-passbook-table td { padding: 5px 12px; }

.mp-passbook-table th:nth-child(1),
.mp-passbook-table td:nth-child(1),
.mp-passbook-table th:nth-child(3),
.mp-passbook-table td:nth-child(3),
.mp-passbook-table th:nth-child(5),
.mp-passbook-table td:nth-child(5),
.mp-passbook-table th:nth-child(6),
.mp-passbook-table td:nth-child(6),
.mp-passbook-table th:nth-child(7),
.mp-passbook-table td:nth-child(7),
.mp-passbook-table th:nth-child(8),
.mp-passbook-table td:nth-child(8),
.mp-passbook-table th:nth-child(9),
.mp-passbook-table td:nth-child(9) {
  text-align: right;
}

.mp-passbook-table th:nth-child(2),
.mp-passbook-table td:nth-child(2),
.mp-passbook-table th:nth-child(4),
.mp-passbook-table td:nth-child(4) {
  text-align: left;
}

.mp-pb-summary-head th {
  background: #eef0f5;
}

.mp-pb-summary-head th:first-child { text-align: left; }
.mp-pb-summary-head th:nth-child(n+2) { text-align: right; }

.mp-pb-ob-row td {
  background: #fff;
  font-weight: 600;
}

.mp-pb-ob-row td:first-child { text-align: left; }
.mp-pb-ob-row td:nth-child(n+2) { text-align: right; }

.mp-pb-col-head th {
  background: #f6f7fa;
  vertical-align: bottom;
}

.mp-pb-pct {
  display: block;
  font-weight: normal;
  color: var(--mp-muted);
  font-size: 12px;
}

.mp-pb-pdf {
  margin-left: 6px;
  color: var(--mp-red);
}

.mp-passbook-table tfoot td:nth-child(n+2) { text-align: right; }
.mp-pb-foot-label { text-align: right; }
.mp-pb-foot-label--left { text-align: left; }
.mp-passbook-table tfoot td:first-child { text-align: right; }
.mp-passbook-table tfoot td.mp-pb-foot-label--left { text-align: left; }
.mp-pb-red { color: var(--mp-red); }

.mp-passbook-table tfoot td {
  border-bottom: 1px solid var(--mp-border);
}

/* ---------- Service history ---------- */
.mp-chart-box {
  position: relative;
  min-height: 120px;
  margin-top: 8px;
}

.mp-chart-box--pie {
  height: 300px;
  margin-top: 24px;
}

/* ---------- Calculator ---------- */
.mp-calc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 900px) {
  .mp-calc {
    grid-template-columns: 1fr 1fr;
  }

  .mp-calc__result {
    border-left: 2px solid var(--mp-blue);
    padding-left: 28px;
  }
}

.mp-calc__row {
  display: grid;
  grid-template-columns: 1fr 310px;
  align-items: center;
  gap: 16px;
  margin-bottom: 7px;
}

.mp-calc__label {
  font-size: 14px;
  color: var(--mp-text);
}

.mp-calc__static {
  font-weight: 600;
  color: var(--mp-text);
}

.mp-calc__input {
  padding: 5px 10px;
  border: 1px solid var(--mp-border);
  border-radius: 4px;
  font-size: 14px;
  text-align: right;
  width: 100%;
}

.mp-calc__input--readonly {
  background: #eef0f5;
  color: var(--mp-muted);
}

.mp-calc__actions {
  margin-top: 16px;
}

.mp-calc__actions .mp-btn {
  display: inline-block;
  width: auto;
  padding: 5px 16px;
  font-size: 14px;
}

.mp-calc__result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--mp-border);
  border-radius: 6px;
  padding: 14px 16px;
  font-weight: 600;
}

.mp-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.mp-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.mp-bar-row__label { overflow-wrap: anywhere; }

.mp-bar-track {
  background: var(--mp-border);
  border-radius: 3px;
  height: 14px;
  overflow: hidden;
}

.mp-bar-fill {
  height: 100%;
  background: var(--mp-navy);
}

.mp-bar-fill--35 { width: 35%; }
.mp-bar-fill--80 { width: 80%; }
.mp-bar-fill--05 { width: 5%; }

.mp-timeline {
  position: relative;
  padding-left: 34px;
}

.mp-timeline::before {
  content: "";
  position: absolute;
  left: 10.5px;
  top: -8px;
  bottom: 6px;
  width: 3px;
  background: var(--mp-blue);
}

.mp-timeline-entry {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--mp-border);
}

.mp-timeline-entry:last-child {
  margin-bottom: 16px;
}

.mp-timeline-entry::before {
  content: attr(data-step);
  position: absolute;
  left: -36px;
  top: 0;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--mp-blue);
  color: var(--mp-step-orange);
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-timeline-entry__range {
  display: inline-block;
  background: var(--mp-bg);
  border: 1px solid var(--mp-border);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.mp-timeline-entry__org {
  font-weight: bold;
  margin-bottom: 8px;
}

.mp-timeline-entry__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 24px;
  font-size: 14px;
}

@media (min-width: 640px) {
  .mp-timeline-entry__grid { grid-template-columns: 1fr 1fr; }
}

.mp-timeline-entry__grid dt { color: var(--mp-muted); display: inline-block; min-width: 90px; }
.mp-timeline-entry__grid dd { display: inline; margin: 0; font-weight: normal; color: var(--mp-muted); }
.mp-timeline-entry__grid > div { padding-bottom: 4px; }
