:root {
  color: #13213a;
  background: linear-gradient(135deg, #fff8fb 0%, #ffeef5 48%, #ffffff 100%);
  font-family: Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

/* Keep any small height gap below a service iframe on the same light page background. */
html,
body,
.service-frame-shell,
.service-frame {
  background: linear-gradient(135deg, #fff8fb 0%, #ffeef5 48%, #ffffff 100%);
}

body {
  background: linear-gradient(135deg, #fff8fb 0%, #ffeef5 48%, #ffffff 100%);
}

.page-container {
  width: min(calc(100% - 24px), 1120px);
  max-width: 100%;
  margin-inline: auto;
}

.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;
}

.service-toolbar {
  position: relative;
  z-index: 2;
  display: block;
  min-height: 0;
  padding: clamp(20px, 3vw, 34px) clamp(22px, 3vw, 38px) clamp(24px, 3vw, 34px);
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(154, 184, 210, .5);
  border-radius: 22px;
  box-shadow: 0 7px 20px rgba(45, 94, 125, .08);
}

.service-heading {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: clamp(18px, 2.5vw, 28px);
  justify-items: center;
}

.service-heading h1 {
  margin: 0;
  color: #102c54;
  font-size: clamp(18px, 3.6vw, 42px);
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

.back-link {
  position: absolute;
  top: clamp(12px, 1.8vw, 22px);
  left: clamp(12px, 2vw, 26px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: clamp(40px, 4.5vw, 52px);
  min-height: clamp(40px, 6vw, 52px);
  border: 1px solid #0b6078;
  border-radius: 12px;
  background: #0d7890;
  color: #fff;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(7, 88, 112, .14);
}

.version-picker {
  display: none;
}

.view-selector {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.7vw, 18px);
  margin-top: clamp(14px, 2vw, 20px);
}

.view-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, .5vw, 6px);
  min-width: 0;
  min-height: clamp(58px, 7vw, 76px);
  padding: 8px clamp(8px, 1.3vw, 16px);
  border: 1px solid #c6dff0;
  border-radius: 18px;
  background: #fff;
  color: #12637a;
  font: inherit;
  font-size: clamp(15px, 2.3vw, 22px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.view-button-title,
.view-button-label,
.view-button-description {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.view-button-title {
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.view-button-label {
  color: #5f7087;
  font-size: clamp(15px, 2.7vw, 27px);
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.view-button-description {
  color: #7d8997;
  font-size: clamp(11px, 1.5vw, 15px);
  font-weight: 600;
  line-height: 1.1;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.view-button:hover { transform: translateY(-1px); }

.view-button.is-active {
  border-color: #0797ad;
  background: linear-gradient(135deg, #0b9fb2, #18aeb4);
  color: #fff;
}

.view-button.is-active .view-button-description {
  color: rgba(255, 255, 255, .78);
}

.view-button.is-active .view-button-label {
  color: rgba(255, 255, 255, .94);
}

.view-button:focus-visible {
  outline: 3px solid rgba(7, 151, 173, .25);
  outline-offset: 2px;
}

.version-picker select {
  width: 100%;
  min-width: 0;
  min-height: clamp(48px, 8vw, 68px);
  padding: 8px clamp(12px, 2vw, 22px);
  border: 1px solid #b7d4e5;
  border-radius: 18px;
  background: #fff;
  color: #12637a;
  font: inherit;
  font-size: clamp(12px, 2.2vw, 17px);
  font-weight: 800;
  text-align: center;
  text-align-last: center;
  box-shadow: 0 3px 9px rgba(50, 105, 136, .06);
}

.service-frame-shell {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding-bottom: clamp(4px, 0.6vw, 8px);
  overflow: visible;
  background: transparent;
}

.service-initial-screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  padding: clamp(12px, 2.5vw, 28px);
  background: linear-gradient(145deg, #f7fbfc 0%, #edf8ff 52%, #fff7fb 100%);
  opacity: 1;
  transition: opacity .18s ease;
  pointer-events: none !important;
}

/* Keep only a neutral table skeleton while the real interface initializes. */
.service-initial-screen > .initial-service-header,
.service-initial-screen > .initial-service-views,
.service-initial-screen .initial-service-card-title,
.service-initial-screen .initial-service-total,
.service-initial-screen .initial-service-groups,
.service-initial-screen .initial-service-actions {
  display: none !important;
}

.service-frame-shell.is-ready .service-initial-screen {
  opacity: 0;
  pointer-events: none;
}

.initial-service-header,
.initial-service-views,
.initial-service-card {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.initial-service-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 36px);
  min-height: clamp(70px, 11vw, 122px);
  color: #12335d;
  text-align: center;
}

.initial-service-header h2 {
  margin: 0;
  font-size: clamp(25px, 4.8vw, 48px);
  line-height: 1;
}

.initial-service-header p {
  margin: 8px 0 0;
  color: #718299;
  font-size: clamp(11px, 1.8vw, 18px);
}

.initial-service-back {
  display: grid;
  place-items: center;
  width: clamp(44px, 7vw, 68px);
  height: clamp(44px, 7vw, 68px);
  border-radius: 17px;
  background: #0d7890;
  color: #fff;
  font-size: clamp(27px, 4.5vw, 42px);
  line-height: 1;
}

.initial-service-views {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 16px);
  margin-block: clamp(8px, 1.6vw, 18px);
}

.initial-service-view {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: clamp(58px, 8vw, 78px);
  padding: 8px 10px;
  border: 1px solid #c6dff0;
  border-radius: 18px;
  background: #fff;
  color: #5f7087;
  text-align: center;
}

.initial-service-view strong {
  display: block;
  font-size: clamp(14px, 2.4vw, 24px);
  line-height: 1.05;
}

.initial-service-view small {
  display: block;
  margin-top: 4px;
  color: #7d8997;
  font-size: clamp(9px, 1.35vw, 14px);
  line-height: 1.1;
}

.initial-service-view.is-active {
  border-color: #0797ad;
  background: linear-gradient(135deg, #0b9fb2, #18aeb4);
  color: #fff;
}

.initial-service-view.is-active small {
  color: rgba(255, 255, 255, .8);
}

.initial-service-card {
  padding: clamp(10px, 1.8vw, 20px);
  border: 1px solid #d2e7eb;
  border-radius: 22px;
  background: rgba(255, 255, 255, .84);
}

.initial-service-card-title {
  width: fit-content;
  margin: 0 auto clamp(8px, 1.5vw, 16px);
  padding: 7px clamp(18px, 3vw, 40px);
  border: 1px solid #c6e3e7;
  border-radius: 14px;
  color: #0b6076;
  font-size: clamp(14px, 2.2vw, 23px);
  font-weight: 900;
}

.initial-service-table {
  overflow: hidden;
  border: 1px solid #cfe0e7;
  border-radius: 16px;
}

.initial-service-table-head,
.initial-service-table-row {
  display: grid;
  grid-template-columns: minmax(58px, 12%) repeat(8, minmax(0, 1fr));
}

.initial-service-table-head > *,
.initial-service-table-row > * {
  min-width: 0;
  min-height: clamp(26px, 4.8vw, 54px);
  border-inline-end: 1px solid #d5e1e7;
  border-bottom: 1px solid #d5e1e7;
}

.initial-service-table-head > * {
  display: grid;
  place-items: center;
  padding: 3px;
  background: #e5f2ff;
  color: #12335d;
  font-size: clamp(7px, 1.25vw, 13px);
  line-height: 1.05;
  text-align: center;
}

.initial-service-table-head > *:nth-child(n+6) {
  background: #f5f7df;
}

.initial-service-table-row > * {
  min-height: clamp(42px, 8vw, 86px);
}

.initial-service-table-row strong {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 3px;
  background: #f2f8fa;
  color: #12335d;
  font-size: clamp(7px, 1.25vw, 13px);
  text-align: center;
  white-space: nowrap;
}

.initial-service-table-row i {
  background: linear-gradient(135deg, rgba(235, 245, 255, .65), rgba(255, 255, 255, .9));
}

.initial-service-table-row i:nth-child(n+6) {
  background: linear-gradient(135deg, rgba(242, 248, 224, .72), rgba(255, 255, 255, .9));
}

.initial-service-table-head > *:nth-child(5),
.initial-service-table-row > *:nth-child(5) {
  border-inline-end: 2px solid #193d68;
}

.initial-service-table-head > *:last-child,
.initial-service-table-row > *:last-child {
  border-inline-end: 0;
}

.initial-service-table-row:last-child > * {
  border-bottom: 0;
}

.initial-service-total,
.initial-service-actions {
  display: grid;
  place-items: center;
  text-align: center;
}

.initial-service-total {
  min-height: clamp(38px, 6vw, 58px);
  margin-top: clamp(8px, 1.5vw, 16px);
  border: 1px solid #c6e3e7;
  border-radius: 16px;
  background: #f1fbfa;
  color: #12335d;
  font-size: clamp(11px, 1.8vw, 18px);
  font-weight: 800;
}

.initial-service-total b {
  margin-left: 4px;
  color: #0b8297;
}

.initial-service-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, 1.2vw, 14px);
  margin-top: clamp(8px, 1.5vw, 16px);
}

.initial-service-groups span,
.initial-service-actions span {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: clamp(36px, 5.5vw, 58px);
  padding: 6px;
  border: 1px solid #c8dcec;
  border-radius: 14px;
  background: #f0f6ff;
  color: #12335d;
  font-size: clamp(8px, 1.45vw, 15px);
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.initial-service-groups span:nth-child(2) {
  border-color: #c7e6d1;
  background: #f0fbf2;
}

.initial-service-groups span:nth-child(3) {
  border-color: #f2d997;
  background: #fff9e5;
}

.initial-service-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 16px);
  margin-top: clamp(8px, 1.5vw, 16px);
}

.initial-service-actions span:last-child {
  border-color: #b8d9f0;
  background: #edf7ff;
}

.service-bottom-ribbon {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 88px;
  margin-top: -18px;
  margin-bottom: 18px;
  padding: 18px 72px;
  border: 1px solid #d6ecea;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f6fbfa 100%);
  color: #8793a1;
  box-shadow: 0 5px 16px rgba(27, 91, 94, .09), inset 0 1px 0 #ffffff;
  font: 400 clamp(11px, 1.2vw, 15px)/1.25 Tahoma, "Segoe UI", Arial, sans-serif;
  text-align: center;
}

.service-bottom-ribbon-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  fill: none;
  color: #8793a1;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-bottom-ribbon span {
  display: block;
}

#service-frame,
.service-frame {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 760px;
  min-height: 0;
  border: 0;
  background: #f7fbfc;
  visibility: visible;
  opacity: 1;
  transition: none;
}

#service-frame.is-ready,
.service-frame.is-ready {
  visibility: visible;
  opacity: 1;
}

.service-frame[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .service-toolbar {
    padding: 14px 10px 16px;
    border-radius: 18px;
  }

  .back-link {
    top: 12px;
    left: 10px;
    width: 38px;
    min-height: 38px;
    border-radius: 11px;
    font-size: 24px;
  }

  .service-heading {
    gap: 14px;
    padding-top: 2px;
  }

  .view-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .view-button {
    min-height: clamp(58px, 14vw, 70px);
    padding: 6px 4px;
    border-radius: 14px;
    font-size: clamp(13px, 3.6vw, 17px);
  }

  .view-button-title {
    font-size: clamp(13px, 3.6vw, 17px);
  }

  .view-button-label {
    font-size: clamp(12px, 3.8vw, 17px);
  }

  .view-button-description {
    font-size: clamp(8px, 2.3vw, 10px);
  }

  .service-frame-shell {
    min-height: 0;
    height: auto;
    padding-bottom: 4px;
  }

  .service-initial-screen {
    padding: 8px;
  }

  .initial-service-header {
    gap: 10px;
  }

  .initial-service-header h2 {
    font-size: clamp(23px, 7vw, 34px);
  }

  .initial-service-header p {
    margin-top: 5px;
    font-size: 10px;
  }

  .initial-service-views {
    gap: 7px;
    margin-block: 8px;
  }

  .initial-service-view {
    min-height: 60px;
    padding: 6px 4px;
    border-radius: 14px;
  }

  .initial-service-view strong {
    font-size: clamp(12px, 3.8vw, 17px);
  }

  .initial-service-view small {
    font-size: clamp(8px, 2.3vw, 10px);
  }

  .initial-service-card {
    padding: 7px;
    border-radius: 16px;
  }

  .initial-service-card-title {
    margin-bottom: 7px;
    padding: 5px 16px;
    border-radius: 11px;
    font-size: 14px;
  }

  .initial-service-table {
    border-radius: 12px;
  }

  .initial-service-table-head > * {
    min-height: 25px;
    font-size: clamp(6px, 1.8vw, 9px);
  }

  .initial-service-table-row > * {
    min-height: 37px;
  }

  .initial-service-table-row strong {
    font-size: clamp(6px, 1.8vw, 9px);
  }

  .initial-service-total {
    min-height: 38px;
    margin-top: 7px;
    font-size: 11px;
  }

  .initial-service-groups,
  .initial-service-actions {
    gap: 7px;
    margin-top: 7px;
  }

  .initial-service-groups span,
  .initial-service-actions span {
    min-height: 38px;
    padding: 4px 2px;
    border-radius: 11px;
    font-size: clamp(7px, 2vw, 10px);
  }

  .service-bottom-ribbon {
    width: calc(100% - 24px);
    min-height: 72px;
    margin-top: -18px;
    margin-bottom: 14px;
    padding: 14px 20px;
    gap: 12px;
    border-radius: 15px;
    font-size: 11px;
  }

  .service-bottom-ribbon-icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  #service-frame {
    height: 680px;
    min-height: 0;
  }
}
