/* Live recreation of the client-portal home shown on this page. It replaces
   the screen-portal.png capture with DOM, following the hero-panel pattern
   from inicio.css: the mock is laid out exactly once at its fixed 1060px
   design width and the frame scales that finished layout proportionally —
   it never reflows. The scale factor is frame-width ÷ 1060 via
   tan(atan2(length, length)), CSS's way of dividing two lengths.

   The frame's aspect ratio is the mock's measured natural size. Every
   animation phase keeps that height: the toast is absolutely positioned,
   status chips swap in place, and the progress bar only changes width.
   If the content changes, re-measure and update the ratio.

   Decorative (aria-hidden, described by .po-sr): nothing inside is
   focusable, and its type may run smaller than the page's body-text floor —
   it is an illustration of a UI, not UI. */

.po-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.po-frame {
  aspect-ratio: 1060 / 569;
  container-type: inline-size;
  overflow: hidden;
  background: #fbfbfb;
}

.po-demo {
  --po-ink: #17172a;
  --po-mut: #6d6d80;
  --po-dim: #9a9aa8;
  --po-line: #ececf1;
  --po-canvas: #fbfbfb;
  --po-red: #c9333f;
  --po-green: #197d47;
  --po-green-soft: #e5f6ec;
  --po-blue: #4a5cf2;
  width: 1060px;
  transform-origin: top left;
  scale: tan(atan2(100cqw, 1060px));
  display: flex;
  background: var(--po-canvas);
  color: var(--po-ink);
  line-height: 1.35;
  cursor: default;
  user-select: none;
}

.po-demo * {
  min-width: 0;
}

/* The mock is laid out in px by design; the page's default paragraph margins
   (1em of each paragraph's own size) would inflate it unpredictably. */
.po-demo p {
  margin: 0;
}

/* ---------- sidebar ---------- */

.po-side {
  display: flex;
  flex-direction: column;
  flex: 0 0 190px;
  padding: 14px 10px 12px;
  border-right: 1px solid var(--po-line);
  background: #f4f4f6;
}

.po-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 8px 14px;
  font-size: 12px;
  font-weight: 700;
}

.po-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.po-brand-mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #e9503e;
}

.po-item {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--po-mut);
  font-size: 12.5px;
  font-weight: 500;
}

.po-item svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.po-item.is-active {
  background: #e8e8ec;
  color: var(--po-ink);
  font-weight: 600;
}

.po-item.is-active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #45b0f5;
}

.po-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 8px 0;
  border-top: 1px solid var(--po-line);
}

.po-ava {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e3e3e8;
  color: #55555e;
  font-size: 9px;
  font-weight: 700;
}

.po-user-name {
  font-size: 11px;
  font-weight: 600;
}

.po-user-role {
  color: var(--po-dim);
  font-size: 10px;
}

.po-chev {
  margin-left: auto;
  color: var(--po-dim);
}

/* ---------- main column ---------- */

.po-main {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.po-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--po-line);
  background: #fff;
}

.po-top svg {
  width: 15px;
  height: 15px;
  color: var(--po-dim);
}

.po-top-title {
  font-size: 13px;
  font-weight: 700;
}

.po-top-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.po-bell {
  position: relative;
}

.po-bell-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e23c4f;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.5;
}

/* ---------- content ---------- */

.po-body {
  padding: 18px 18px 40px;
  transition: opacity 0.22s ease;
}

.po-demo.is-reset .po-body {
  opacity: 0.3;
}

.po-h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.po-sub {
  margin-top: 2px;
  color: var(--po-mut);
  font-size: 12px;
}

.po-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.po-card {
  border: 1px solid var(--po-line);
  border-radius: 12px;
  background: #fff;
}

.po-kpi {
  position: relative;
  padding: 12px 14px;
}

.po-kpi > svg {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 14px;
  height: 14px;
  color: var(--po-dim);
}

.po-kpi-label {
  color: var(--po-mut);
  font-size: 11.5px;
  font-weight: 500;
}

.po-kpi-value {
  margin-top: 7px;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.po-kpi-value.po-due {
  color: var(--po-red);
}

.po-demo.is-paid .po-kpi-value.po-due {
  color: var(--po-green);
}

.po-kpi-foot {
  margin-top: 5px;
  color: var(--po-dim);
  font-size: 10.5px;
}

.po-foot-paid {
  display: none;
}

.po-demo.is-paid .po-foot-open {
  display: none;
}

.po-demo.is-paid .po-foot-paid {
  display: inline;
}

/* ---------- stacked cards ---------- */

.po-block {
  margin-top: 12px;
}

.po-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--po-line);
}

.po-block-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #eef0fd;
  color: #5661d6;
}

.po-block-icon svg {
  width: 14px;
  height: 14px;
}

.po-block-title {
  font-size: 13px;
  font-weight: 700;
}

.po-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.po-link {
  color: var(--po-blue);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- paid-billing progress ---------- */

.po-progress {
  padding: 12px 14px 14px;
}

.po-progress-meta {
  color: var(--po-mut);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.po-bar {
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: #f0f0f3;
  overflow: hidden;
}

.po-bar-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--po-green);
  transition: width 0.9s ease;
}

.po-demo.is-filled .po-bar-fill {
  width: 96%;
}

.po-demo.is-full .po-bar-fill {
  width: 100%;
}

/* ---------- pending row ---------- */

.po-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.po-row.is-viewing {
  background: #f7f8ff;
}

.po-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.po-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.po-chip-fact {
  background: #faf0dc;
  color: #966c33;
}

.po-chip-paid {
  display: none;
  background: var(--po-green-soft);
  color: var(--po-green);
}

.po-demo.is-paid .po-chip-fact {
  display: none;
}

.po-demo.is-paid .po-chip-paid {
  display: inline-flex;
}

.po-row-end {
  margin-left: auto;
  color: var(--po-mut);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- contact row ---------- */

.po-contact {
  display: flex;
  gap: 22px;
  padding: 13px 14px;
  font-size: 11.5px;
}

.po-contact .po-link {
  font-weight: 500;
}

.po-contact-phone {
  color: var(--po-ink);
}

/* ---------- toast ---------- */

.po-toast {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 9px;
  width: 250px;
  padding: 10px 12px;
  border: 1px solid var(--po-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 30px -12px rgb(14 14 26 / 25%);
  font-size: 11.5px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.28s ease-out, transform 0.28s ease-out;
}

.po-toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.po-toast-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #27a25c;
}

.po-toast b {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.po-toast small {
  display: block;
  margin-top: 1px;
  color: var(--po-mut);
  font-size: 10.5px;
}

/* ---------- motion accents ---------- */

.po-pop {
  animation: po-pop 0.45s ease-out;
}

.po-ring {
  animation: po-ring 0.7s ease-in-out;
  transform-origin: top center;
}

@keyframes po-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

@keyframes po-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(13deg); }
  45% { transform: rotate(-11deg); }
  70% { transform: rotate(6deg); }
}
