/* Animated partner-portal mock-up (portal-demo.js). Self-contained: every class is pd- prefixed and the
   root resets the type styles it could inherit from the host page. Fixed 1120 x 680 stage, scaled by JS. */

.pd-root {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1120 / 680;
  overflow: hidden;
  background: #e6edf4;
  color: #16242f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  text-indent: 0;
  white-space: normal;
  word-spacing: 0;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.pd-root *,
.pd-root *::before,
.pd-root *::after { box-sizing: border-box; }

.pd-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1120px;
  height: 680px;
  transform-origin: 0 0;
}
.pd-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ---- caption chip above the frames ---- */
.pd-chip {
  position: absolute;
  left: 24px;
  top: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px 0 11px;
  border-radius: 15px;
  background: #fff;
  color: #0f6fb5;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 42, 67, .14);
  transition: color .3s ease-out;
}
.pd-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.pd-chip--vendor { color: #0a4a7a; }
.pd-chip.pd-swap { animation: pd-swap .45s ease-out; }
@keyframes pd-swap {
  0%   { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: none; }
}

/* ---- browser-like frame ---- */
.pd-frame {
  position: absolute;
  left: 24px;
  top: 52px;
  width: 1072px;
  height: 612px;
  overflow: hidden;
  border-radius: 14px;
  background: #f3f6fa;
  box-shadow: 0 1px 2px rgba(16, 42, 67, .1), 0 10px 28px rgba(16, 42, 67, .14);
  transition: transform .6s cubic-bezier(.22, .61, .36, 1), opacity .5s ease-out;
}
.pd-frame--a.pd-is-out {
  opacity: 0;
  transform: translateX(-1120px);
}
.pd-frame--b {
  opacity: 0;
  transform: translateX(1120px);
}
.pd-frame--b.pd-is-in {
  opacity: 1;
  transform: none;
}

.pd-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 36px;
  padding: 0 14px;
  background: #dfe6ee;
}
.pd-bar-dots {
  display: flex;
  gap: 6px;
}
.pd-bar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b9c5d1;
}
.pd-url {
  display: flex;
  flex: 0 1 520px;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff;
  color: #46586a;
  font-size: 14px;
  white-space: nowrap;
}
.pd-url-lock {
  flex: none;
  width: 11px;
  height: 11px;
  fill: #7b8b9a;
}

/* ---- portal header bar ---- */
.pd-head {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 54px;
  padding: 0 24px;
  background: #0f6fb5;
  color: #fff;
  white-space: nowrap;
}
.pd-head--vendor { background: #0a4a7a; }
.pd-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
}
.pd-brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  border-radius: 7px;
  background: #fff;
}
.pd-brand-mark::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 7px;
  border: solid #0f6fb5;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 7px;
}
.pd-head--vendor .pd-brand-mark::before { border-color: #0a4a7a; }
.pd-brand-name { font-weight: 700; }
.pd-brand-sub { opacity: .88; }
.pd-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}
.pd-nav-item {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 13px;
  border-radius: 16px;
  font-size: 14.5px;
  opacity: .86;
}
.pd-nav-item.pd-is-active {
  background: rgba(255, 255, 255, .2);
  font-weight: 600;
  opacity: 1;
}
.pd-user {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}
.pd-user-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #0a4a7a;
  font-size: 12px;
  font-weight: 700;
}
.pd-bell {
  position: relative;
  width: 24px;
  height: 24px;
  margin-right: -8px;
  transform-origin: 50% 10%;
}
.pd-bell-svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: #fff;
}
.pd-bell-dot {
  position: absolute;
  right: 0;
  top: 0;
  width: 11px;
  height: 11px;
  border: 2px solid #0a4a7a;
  border-radius: 50%;
  background: #e5484d;
  opacity: 0;
  transform: scale(.3);
  transition: opacity .2s ease-out, transform .2s ease-out;
}
.pd-bell.pd-has-dot .pd-bell-dot {
  opacity: 1;
  transform: none;
}
.pd-bell.pd-shake { animation: pd-shake .6s ease-out; }
@keyframes pd-shake {
  0%   { transform: rotate(0); }
  20%  { transform: rotate(-16deg); }
  40%  { transform: rotate(13deg); }
  60%  { transform: rotate(-8deg); }
  80%  { transform: rotate(4deg); }
  100% { transform: rotate(0); }
}

/* ---- page body ---- */
.pd-page { padding: 18px 24px 0; }
.pd-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: -.01em;
}
.pd-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pd-count {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 13px;
  background: #fdecc8;
  color: #7a4a00;
  font-size: 14px;
  font-weight: 600;
}
.pd-count.pd-pop { animation: pd-pop .35s ease-out; }
@keyframes pd-pop {
  0%   { transform: scale(.8); }
  60%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.pd-card {
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px #e1e8ef, 0 2px 6px rgba(16, 42, 67, .05);
}

/* ---- Scene A: two columns ---- */
.pd-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 468px;
  gap: 20px;
  align-items: start;
  margin-top: 14px;
}
.pd-cols > .pd-card {
  display: flex;
  flex-direction: column;
  min-height: 434px;
  padding: 18px 20px;
}

.pd-drop {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 104px;
  border: 2px dashed #b4c4d3;
  border-radius: 12px;
  background: #f7fafc;
  color: #33475a;
  font-size: 15px;
  font-weight: 600;
  transition: background-color .2s ease-out, border-color .2s ease-out;
}
.pd-drop.pd-is-over {
  border-color: #0f6fb5;
  background: #e6f2fb;
}
.pd-drop-icon {
  width: 26px;
  height: 26px;
  fill: #0f6fb5;
}

/* file chips: each grows in, shows a short progress bar, then a tick */
.pd-file {
  max-height: 0;
  opacity: 0;
  transform: translateY(-14px);
  transition: max-height .28s ease-out, opacity .25s ease-out, transform .28s ease-out;
}
.pd-file.pd-is-in {
  max-height: 44px;
  opacity: 1;
  transform: none;
}
.pd-file-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  margin-top: 8px;
  padding: 0 12px;
  overflow: hidden;
  border-radius: 10px;
  background: #eef3f8;
  font-size: 14.5px;
}
.pd-file-glyph {
  flex: none;
  width: 15px;
  height: 19px;
  border-radius: 3px;
  background: linear-gradient(#fff, #fff) 3px 5px / 9px 2px no-repeat,
              linear-gradient(#fff, #fff) 3px 9px / 9px 2px no-repeat,
              linear-gradient(#fff, #fff) 3px 13px / 6px 2px no-repeat,
              #0f6fb5;
}
.pd-file--mail .pd-file-glyph {
  height: 14px;
  background: linear-gradient(#fff, #fff) 3px 4px / 9px 2px no-repeat,
              linear-gradient(#fff, #fff) 3px 8px / 6px 2px no-repeat,
              #6b7fd6;
}
.pd-file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-file-tick {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1f9d61;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s ease-out, transform .2s ease-out;
}
.pd-file-tick::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.pd-file.pd-is-done .pd-file-tick {
  opacity: 1;
  transform: none;
}
.pd-prog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  height: 3px;
  background: #d5dfe9;
}
.pd-file.pd-is-loading .pd-prog { display: block; }
.pd-prog-bar {
  display: block;
  width: 0;
  height: 100%;
  background: #0f6fb5;
}
.pd-file.pd-is-loading .pd-prog-bar { animation: pd-load .85s ease-out forwards; }
@keyframes pd-load {
  to { width: 100%; }
}

.pd-label {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
}
.pd-area {
  height: 92px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1.5px solid #c5d1dc;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.pd-area.pd-is-focus {
  border-color: #0f6fb5;
  box-shadow: 0 0 0 3px rgba(15, 111, 181, .2);
}
.pd-caret {
  display: none;
  width: 1.5px;
  height: 18px;
  margin-left: 1px;
  vertical-align: -3px;
  background: #16242f;
  animation: pd-blink 1s steps(1) infinite;
}
.pd-area.pd-is-focus .pd-caret { display: inline-block; }
@keyframes pd-blink {
  50% { opacity: 0; }
}

/* ---- Scene A: registration details ---- */
.pd-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
}
.pd-status {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  margin-top: 2px;
  color: #6b7c8c;
  font-size: 14px;
}
.pd-spark {
  display: none;
  flex: none;
  width: 15px;
  height: 15px;
  fill: #0f6fb5;
}
.pd-status.pd-is-busy,
.pd-status.pd-is-ready {
  color: #0f6fb5;
  font-weight: 600;
}
.pd-status.pd-is-busy .pd-spark,
.pd-status.pd-is-ready .pd-spark { display: block; }
.pd-status.pd-is-busy .pd-spark { animation: pd-spark 1s ease-in-out infinite; }
@keyframes pd-spark {
  0%, 100% { opacity: .45; transform: scale(.78) rotate(0); }
  50%      { opacity: 1; transform: scale(1.12) rotate(45deg); }
}
.pd-status.pd-is-busy .pd-status-text {
  background: linear-gradient(90deg, #0f6fb5 0%, #0f6fb5 35%, #8cc4ec 50%, #0f6fb5 65%, #0f6fb5 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pd-shimmer 1.4s linear infinite;
}
@keyframes pd-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -66% 0; }
}

.pd-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.pd-field {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pd-field-label {
  flex: none;
  width: 116px;
  color: #46586a;
  font-size: 14px;
}
.pd-field-box {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid #dbe3eb;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .25s ease-out;
}
/* empty state: a soft placeholder bar */
.pd-field-box::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 96px;
  height: 8px;
  margin-top: -4px;
  border-radius: 4px;
  background: #e6ecf2;
}
.pd-field:nth-child(even) .pd-field-box::before { width: 140px; }
.pd-is-reading .pd-field-box::before { animation: pd-pulse .9s ease-in-out infinite; }
@keyframes pd-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}
.pd-field.pd-is-filled .pd-field-box { border-color: #b9d6ec; }
.pd-field.pd-is-filled .pd-field-box::before { display: none; }
.pd-field-box.pd-flash { animation: pd-flash 1s ease-out; }
@keyframes pd-flash {
  0%   { background-color: #cfe6f7; }
  100% { background-color: #fff; }
}
.pd-field-text { animation: pd-rise .25s ease-out; }
@keyframes pd-rise {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.pd-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 14px;
}
.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 22px;
  background: #0f6fb5;
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 111, 181, .3);
}
.pd-btn.pd-is-pressed { animation: pd-press .22s ease-out; }
@keyframes pd-press {
  0%   { transform: scale(1); }
  40%  { transform: scale(.95); filter: brightness(.9); }
  100% { transform: scale(1); }
}

/* ---- Scene B: registrations table ---- */
.pd-table {
  margin-top: 14px;
  overflow: hidden;
}
.pd-row {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr) minmax(0, 1.25fr) 100px 142px 226px;
  align-items: center;
  height: 62px;
  padding: 0 20px;
  border-top: 1px solid #e8eef3;
  font-size: 15px;
}
.pd-row--head {
  height: 46px;
  border-top: 0;
  background: #f7fafc;
  color: #5a6c7d;
  font-size: 14px;
  font-weight: 600;
}
.pd-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-right: 10px;
  white-space: nowrap;
}
.pd-cell-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-row:not(.pd-row--head) .pd-cell--0 { color: #0f6fb5; font-weight: 600; }
.pd-row:not(.pd-row--head) .pd-cell--1 { font-weight: 600; }
.pd-row:not(.pd-row--head) .pd-cell--5 { color: #5a6c7d; }
.pd-state {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 13px;
  background: #fdecc8;
  color: #7a4a00;
  font-size: 14px;
  font-weight: 600;
}
.pd-state--ok {
  background: #d9f2e3;
  color: #14693f;
}

/* the new row grows in at the top of the table */
.pd-slot {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .32s ease-out, opacity .3s ease-out;
}
.pd-slot.pd-is-in {
  max-height: 62px;
  opacity: 1;
}
.pd-row--new {
  background: #e8f3fb;
  box-shadow: inset 4px 0 0 #0f6fb5;
}
.pd-slot.pd-is-in .pd-row--new { animation: pd-arrive .5s ease-out; }
@keyframes pd-arrive {
  from { transform: translateY(-18px); background-color: #cfe6f7; }
  to   { transform: none; background-color: #e8f3fb; }
}
.pd-new {
  flex: none;
  padding: 2px 8px;
  border-radius: 9px;
  background: #0f6fb5;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}
.pd-synced {
  display: none;
  flex: none;
  padding: 3px 9px;
  border-radius: 11px;
  background: #d9f2e3;
  color: #14693f;
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
}
.pd-row.pd-is-synced .pd-synced {
  display: inline-block;
  animation: pd-tag .3s ease-out;
}
@keyframes pd-tag {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: none; }
}

/* ---- toasts ---- */
.pd-toasts {
  position: absolute;
  left: 0;
  right: 0;
  top: 96px;
  display: flex;
  justify-content: center;
}
.pd-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 24px 0 14px;
  border-radius: 25px;
  background: #12293b;
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(16, 42, 67, .3);
  animation: pd-toast .28s ease-out;
}
@keyframes pd-toast {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}
.pd-toast-tick {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1f9d61;
}
.pd-toast-tick::after {
  content: "";
  position: absolute;
  left: 8.5px;
  top: 5px;
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---- cursor + click ring ---- */
.pd-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 24px;
  margin: -2px 0 0 -2px;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1), opacity .3s ease-out;
}
.pd-cursor.pd-is-gone { opacity: 0; }
.pd-cursor-svg {
  display: block;
  width: 20px;
  height: 24px;
  fill: #111;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3));
}
.pd-ring {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 2px solid #0f6fb5;
  border-radius: 50%;
  opacity: 0;
}
.pd-ring.pd-is-on { animation: pd-ring .42s ease-out; }
@keyframes pd-ring {
  from { opacity: .7; transform: scale(.3); }
  to   { opacity: 0; transform: scale(1.15); }
}

/* ---- veil: the loop restart ---- */
.pd-veil {
  position: absolute;
  inset: 0;
  background: #e6edf4;
  opacity: 0;
  transition: opacity .3s ease-out;
}
.pd-veil.pd-is-on { opacity: 1; }

/* ---- static frame (prefers-reduced-motion): no cursor, no motion ---- */
.pd-is-static .pd-cursor,
.pd-is-static .pd-ring,
.pd-is-static .pd-veil,
.pd-is-static .pd-frame--a { display: none; }
.pd-is-static *,
.pd-is-static *::before,
.pd-is-static *::after {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .pd-root *,
  .pd-root *::before,
  .pd-root *::after {
    animation: none !important;
    transition: none !important;
  }
  .pd-cursor,
  .pd-ring { display: none; }
}
