/* Live recreations of the two product screenshots on /plataforma/: the
   clients list and the ticket detail. Same pattern as the hero panel on the
   home page (inicio.css): each mock is laid out exactly once at its fixed
   1060px design width and the frame scales that finished layout as a
   transform — proportional shrink, never a reflow, the same semantics as the
   images they replace. The scale factor is frame-width ÷ 1060 via
   tan(atan2(length, length)).

   Both source screenshots were 1600×849 viewport crops, so each mock root is
   a fixed 1060×562 crop (1060 × 849 / 1600 ≈ 562) with overflow hidden:
   content that grows during an animation phase slides past the bottom clip
   and the root's natural height is 562px in every phase by construction.

   Prefixes: am- is the app chrome shared by both mocks (sidebar, top bar,
   avatars, motion); cl- is the clients screen; tk- is the ticket screen.
   Nothing here reuses pd-, mock-, or any plataforma.css class.

   The mocks are decorative (aria-hidden, described by a visually-hidden
   paragraph each), so nothing inside is focusable and type may run smaller
   than the page's body-text floor: illustrations of a UI, not UI. */

.cl-frame,
.tk-frame {
  aspect-ratio: 1060 / 562;
  container-type: inline-size;
  overflow: hidden;
  background: #fbfbfb;
}

.am-demo {
  --am-ink: #17172a;
  --am-mut: #6d6d80;
  --am-dim: #9a9aa8;
  --am-line: #ececf1;
  --am-faint: #f3f3f6;
  --am-canvas: #fbfbfb;
  --am-side: #f3f3f5;
  --am-blue: #5666f2;
  --am-soft: #f2f2f4;
  display: flex;
  width: 1060px;
  height: 562px;
  overflow: hidden;
  transform-origin: top left;
  scale: tan(atan2(100cqw, 1060px));
  background: var(--am-canvas);
  color: var(--am-ink);
  line-height: 1.35;
  cursor: default;
  user-select: none;
}

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

/* site.css gives p a 1em block margin; inside the fixed-height mock every
   paragraph is positioned by its container, so the page rhythm must not
   leak in. :where() keeps specificity at one class so the component rules
   below can re-add intentional margins. */
.am-demo :where(p) {
  margin: 0;
}

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

.am-side {
  display: flex;
  flex-direction: column;
  flex: 0 0 200px;
  padding: 14px 10px 12px;
  border-right: 1px solid var(--am-line);
  background: var(--am-side);
  font-size: 13px;
}

.am-brand {
  padding: 2px 8px 12px;
}

.am-brand img {
  display: block;
  width: auto;
  height: 20px;
}

.am-label {
  margin: 9px 8px 4px;
  color: var(--am-dim);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

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

.am-item svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.am-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.am-item.is-active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--am-blue);
}

.am-badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e7e7ec;
  color: var(--am-mut);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

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

.am-user-name {
  font-size: 11.5px;
  font-weight: 600;
}

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

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

/* ---------- avatars ---------- */

.am-ava {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.am-ava.is-em { background: #23233c; }
.am-ava.is-ai { background: #58a12f; }
.am-ava.is-di { background: #df5658; }
.am-ava.is-gc { background: #7f6bd9; }
.am-ava.is-hi { background: #c99df2; }
.am-ava.is-ki { background: #c7a1f0; }
.am-ava.is-lu { background: #cb4891; }
.am-ava.is-nv { background: #7cc0f8; }
.am-ava.is-pi { background: #98cbf4; }
.am-ava.is-qi { background: #679d3f; }
.am-ava.is-ac { background: #3fb2a2; }

/* ---------- main column + top bar ---------- */

.am-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  font-size: 13px;
}

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

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

.am-top-title {
  font-size: 12.5px;
  font-weight: 700;
}

.am-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 280px;
  padding: 4px 10px;
  border: 1px solid var(--am-line);
  border-radius: 9px;
  background: #fff;
  color: var(--am-dim);
  font-size: 11px;
}

.am-search span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.am-kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--am-line);
  border-radius: 5px;
  background: var(--am-soft);
  font-size: 9px;
}

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

.am-bell {
  position: relative;
}

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

/* ---------- shared body + reset fade ---------- */

.cl-body,
.tk-body {
  transition: opacity 0.22s ease;
}

.am-demo.is-reset .cl-body,
.am-demo.is-reset .tk-body {
  opacity: 0.3;
}

/* ================= clients list ================= */

.cl-body {
  padding: 10px 18px;
}

.cl-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

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

.cl-sub {
  margin-top: 2px;
  color: var(--am-mut);
  font-size: 10.5px;
}

.cl-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.cl-btn {
  padding: 5px 11px;
  border: 1px solid #e4e4ea;
  border-radius: 8px;
  background: var(--am-soft);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.cl-btn.is-primary {
  border-color: var(--am-blue);
  background: var(--am-blue);
  color: #fff;
}

.cl-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.cl-card {
  border: 1px solid var(--am-line);
  border-radius: 11px;
  background: #fff;
}

.cl-kpi {
  padding: 8px 11px;
}

.cl-kpi-label {
  min-height: 22px;
  color: var(--am-dim);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cl-kpi-value {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---------- table toolbar ---------- */

.cl-table {
  margin-top: 8px;
}

.cl-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--am-line);
}

.cl-tb-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #eef0fd;
  color: #5661d6;
}

.cl-tb-icon svg {
  width: 13px;
  height: 13px;
}

.cl-tb-title {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.am-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: #f0f0f4;
  color: var(--am-mut);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cl-tb-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 170px;
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: var(--am-canvas);
  color: var(--am-dim);
  font-size: 10px;
}

.cl-tb-search svg,
.cl-select svg {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  color: var(--am-dim);
}

.cl-tb-search span,
.cl-select span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-select {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: var(--am-soft);
  font-size: 10px;
  font-weight: 500;
}

/* The status filter is truncated in the real app at this width — the cap
   reproduces the "Todos los esta…" cut from the screenshot. */
.cl-select.is-narrow span {
  max-width: 68px;
}

.cl-tb-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.cl-tb-btn svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: var(--am-mut);
}

/* ---------- table grid ---------- */

.cl-tr {
  display: grid;
  grid-template-columns:
    20px 24px minmax(0, 1.35fr) minmax(0, 0.75fr) minmax(0, 1.9fr)
    66px 38px minmax(0, 1.25fr) 50px;
  gap: 8px;
  align-items: center;
  padding: 4px 12px;
  border-top: 1px solid var(--am-faint);
  font-size: 9.5px;
}

.cl-thead {
  border-top: 0;
  padding-top: 4px;
  padding-bottom: 4px;
  background: #f6f6f6;
  color: var(--am-mut);
  font-size: 9px;
  font-weight: 600;
}

.cl-sort {
  margin-left: 3px;
  color: var(--am-dim);
  font-size: 8px;
}

.cl-sort.is-asc {
  color: var(--am-ink);
}

.cl-end {
  text-align: right;
}

.cl-check {
  width: 12px;
  height: 12px;
  border: 1px solid #d6d6de;
  border-radius: 4px;
  background: #fff;
}

.cl-num {
  color: var(--am-mut);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.cl-co {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 600;
}

.cl-co .am-ava {
  width: 19px;
  height: 19px;
  font-size: 7px;
}

.cl-co span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-mail {
  color: var(--am-blue);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.cl-tel {
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.cl-dash {
  color: var(--am-dim);
}

.cl-tgl {
  position: relative;
  display: block;
  width: 26px;
  height: 15px;
  border-radius: 999px;
  background: var(--am-blue);
  transition: background 0.25s ease;
}

.cl-tgl::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 13px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.25s ease;
}

.cl-tr.is-off .cl-tgl {
  background: #d8d8e0;
}

.cl-tr.is-off .cl-tgl::after {
  left: 2px;
}

.cl-type {
  justify-self: start;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid #e9e9ee;
  border-radius: 999px;
  background: #f4f4f6;
  color: var(--am-mut);
  font-size: 8.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-date {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* The arriving client row: both ends are classes with explicit display so
   the row cannot half-exist, and the entrance animates transform/opacity
   only. The root is a fixed 562px crop, so the row below the fold slides
   past the clip instead of growing the mock. */
.cl-row-new {
  display: none;
}

.am-demo.has-new .cl-row-new {
  display: grid;
  animation: am-in 0.32s ease-out;
}

/* ================= ticket detail ================= */

.tk-body {
  padding: 12px 16px;
}

.tk-crumb {
  margin-bottom: 8px;
  color: var(--am-blue);
  font-size: 10.5px;
  font-weight: 600;
}

.tk-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 228px;
  gap: 14px;
  align-items: start;
}

.tk-card {
  border: 1px solid var(--am-line);
  border-radius: 11px;
  background: #fff;
}

.tk-card + .tk-card {
  margin-top: 8px;
}

.tk-headcard {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
}

.tk-id {
  flex: 0 0 auto;
  color: var(--am-dim);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tk-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tk-state {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.tk-state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.tk-state-open {
  background: #e1f0fe;
  color: #2f6db8;
}

.tk-state-answered {
  background: #e3ecfd;
  color: #2b62d9;
}

.am-demo:not(.is-answered) .tk-state-open,
.am-demo.is-answered .tk-state-answered {
  display: inline-flex;
}

.tk-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.tk-btn {
  padding: 4px 8px;
  border: 1px solid #e4e4ea;
  border-radius: 8px;
  background: var(--am-soft);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.tk-btn.is-primary {
  border-color: var(--am-blue);
  background: var(--am-blue);
  color: #fff;
}

.tk-btn.is-press {
  animation: am-press 0.5s ease-out;
}

/* ---------- tabs ---------- */

.tk-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 7px 14px;
}

.tk-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  color: var(--am-mut);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tk-tab.is-active {
  color: var(--am-ink);
  font-weight: 700;
}

.tk-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--am-blue);
}

/* ---------- description ---------- */

.tk-sect {
  padding: 7px 14px;
  border-bottom: 1px solid var(--am-line);
  color: var(--am-mut);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tk-desc {
  padding: 8px 14px 10px;
  font-size: 10.5px;
  line-height: 1.5;
}

/* ---------- reply editor ---------- */

.tk-reply-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--am-line);
}

.tk-canned {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 0;
}

.tk-dd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--am-line);
  border-radius: 999px;
  background: var(--am-soft);
  color: var(--am-dim);
  font-size: 9.5px;
  white-space: nowrap;
}

.tk-dd i {
  color: var(--am-dim);
  font-style: normal;
}

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

.tk-editor {
  margin: 7px 14px 0;
  border: 1px solid var(--am-line);
  border-radius: 9px;
}

.tk-editor-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--am-faint);
  color: var(--am-mut);
}

.tk-editor-bar b {
  font-size: 10px;
  font-weight: 700;
}

.tk-editor-bar i {
  font-size: 10px;
  font-weight: 600;
}

.tk-editor-bar svg {
  width: 11px;
  height: 11px;
}

.tk-editor-area {
  height: 56px;
}

.tk-reply-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 9px;
}

.tk-attach {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--am-mut);
  font-size: 9.5px;
}

.tk-attach svg {
  width: 11px;
  height: 11px;
}

.tk-foot-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--am-mut);
  font-size: 9.5px;
}

/* ---------- conversation ---------- */

.tk-conv-label {
  margin: 10px 0 6px;
  color: var(--am-mut);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tk-msg {
  padding: 8px 12px 10px;
}

.tk-msg + .tk-msg {
  margin-top: 8px;
}

.tk-msg-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tk-msg-who {
  font-size: 10.5px;
  font-weight: 700;
}

.tk-chip {
  padding: 1px 7px;
  border-radius: 999px;
  background: #f0f0f4;
  color: var(--am-mut);
  font-size: 8.5px;
  font-weight: 600;
}

.tk-chip.is-client {
  background: #fdf0f7;
  color: #b23a80;
}

.tk-msg-time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--am-dim);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.tk-msg-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--am-dim);
}

.tk-msg-tools svg {
  width: 10px;
  height: 10px;
}

.tk-msg-text {
  margin-top: 5px;
  font-size: 10.5px;
  line-height: 1.45;
}

/* Staged messages: newest lands on top; the fixed 562px root crop swallows
   whatever gets pushed past the bottom edge. */
.tk-msg-reply,
.tk-msg-answer {
  display: none;
}

.am-demo.has-reply .tk-msg-reply,
.am-demo.has-answer .tk-msg-answer {
  display: block;
  animation: am-in 0.32s ease-out;
}

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

.tk-scard + .tk-scard {
  margin-top: 8px;
}

.tk-sbody {
  padding: 8px 12px 9px;
}

.tk-client {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
}

.tk-client-name {
  color: var(--am-blue);
}

.tk-key {
  margin: 6px 0 3px;
  color: var(--am-dim);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tk-key:first-child {
  margin-top: 0;
}

.tk-val {
  font-size: 10.5px;
}

.tk-val.is-link {
  color: var(--am-blue);
}

.tk-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: var(--am-soft);
  font-size: 10px;
}

.tk-field.is-input {
  background: #fff;
  color: var(--am-dim);
}

.tk-field .am-chev {
  font-size: 10px;
}

.tk-field svg {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-left: auto;
  color: var(--am-mut);
}

.tk-opt-open,
.tk-opt-answered {
  display: none;
}

.am-demo:not(.is-answered) .tk-opt-open,
.am-demo.is-answered .tk-opt-answered {
  display: revert;
}

.tk-field.is-flash {
  animation: am-flash 1.1s ease-out;
}

/* The card that only peeks past the bottom edge of the crop, as in the
   original screenshot. */
.tk-peek {
  height: 60px;
}

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

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

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

@keyframes am-in {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes am-flash {
  0% { background: #eef4ff; }
  100% { background: var(--am-soft); }
}

@keyframes am-press {
  0% { transform: scale(1); }
  35% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
