/* Tundaa Admin App mockup (Home → Ask Tunda AI), extracted from
   "Mobile Admin Panel.html". Light theme only, every class prefixed tm- so it
   never collides with the site styles. The phone is authored at its native
   414×868 size; .tm sets the on-page size and tundaa-mock.js scales .tm-phone
   to fit it. The chat is display-only: the page scroll drives it. */
.tm {
  --tm-screen: #f6f3ec;
  --tm-card: #fdfbf6;
  --tm-line: #e7e1d4;
  --tm-text: #1c2a22;
  --tm-muted: #7c837b;
  --tm-brand: #0f4a33;
  --tm-brand-2: #2e8b3e;
  --tm-btn: #0f4a33;
  --tm-soft: #e3eedc;
  --tm-soft-text: #0f4a33;
  --tm-good: #2e8b3e;
  --tm-bad: #c0392b;
  --tm-frame: #1b1d1c;
  position: relative;
  height: var(--phone-h, 42rem);
  aspect-ratio: 414 / 868;
  color: var(--tm-text);
  font-family: "DM Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
  user-select: none;
}
.tm *, .tm *::before, .tm *::after { box-sizing: border-box; }

.tm-phone {
  position: absolute; top: 0; left: 0;
  width: 414px; height: 868px;
  padding: 12px;
  border-radius: 62px;
  background: var(--tm-frame);
  box-shadow: 0 0 0 2px #3a3d3b, 0 34px 60px rgba(13, 51, 44, .26), inset 0 0 0 1px rgba(255, 255, 255, .06);
  transform-origin: 0 0;
  transform: scale(var(--tm-scale, 1));
}
.tm-phone::before, .tm-phone::after { content: ""; position: absolute; width: 4px; border-radius: 3px; background: #2b2e2c; }
.tm-phone::before { left: -5px; top: 170px; height: 64px; box-shadow: 0 84px 0 #2b2e2c; }
.tm-phone::after { right: -5px; top: 210px; height: 96px; }

.tm-screen { position: relative; width: 390px; height: 844px; overflow: hidden; border-radius: 50px; background: var(--tm-screen); }
.tm-island { position: absolute; z-index: 30; top: 11px; left: 50%; width: 122px; height: 35px; border-radius: 20px; background: #000; transform: translateX(-50%); }
.tm-status { position: absolute; z-index: 25; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 36px; background: var(--tm-screen); font-size: 15px; font-weight: 700; }
.tm-status::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(var(--tm-screen), rgba(246, 243, 236, 0)); }
.tm-status__icons { display: flex; align-items: center; gap: 6px; }
.tm-status__icons svg { display: block; }

/* The screen never scrolls by touch or wheel, so it can't capture the page
   scroll. JS sets scrollTop to move the view from the KPIs down to the chat. */
.tm-content { position: absolute; top: 0; left: 0; right: 0; bottom: 82px; overflow: hidden; padding: 58px 16px 24px; }

.tm-head { display: flex; justify-content: space-between; align-items: flex-start; margin: 8px 0 14px; }
.tm-eyebrow { color: var(--tm-muted); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.tm-title { margin: 2px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -.6px; line-height: 1.2; }
.tm-sub { margin-top: 2px; color: var(--tm-muted); font-size: 12.5px; }
.tm-logo { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.tm-logo svg { width: 30px; height: 30px; }
.tm-logo span { color: var(--tm-brand); font-size: 19px; font-weight: 800; letter-spacing: -.3px; }

.tm-seg { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--tm-line); border-radius: 14px; background: var(--tm-card); }
.tm-seg span { flex: 1; padding: 9px 0; border-radius: 10px; color: var(--tm-muted); font-size: 13px; font-weight: 700; text-align: center; }
.tm-seg span.is-on { background: var(--tm-btn); color: #fff; }

.tm-card { padding: 14px; border: 1px solid var(--tm-line); border-radius: 16px; background: var(--tm-card); }
.tm-kpi-hero { margin-top: 14px; padding: 16px; border: 0; background: var(--tm-soft); }
.tm-kpi-hero .tm-kpi-label { color: var(--tm-soft-text); opacity: .8; }
.tm-kpi-hero .tm-kpi-value { color: var(--tm-soft-text); font-size: 30px; }
.tm-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tm-kpi-grid .tm-card { padding: 13px; }
.tm-kpi-label { color: var(--tm-muted); font-size: 12px; font-weight: 700; }
.tm-kpi-value { margin-top: 6px; overflow: hidden; font-size: 17px; font-weight: 800; letter-spacing: -.3px; text-overflow: ellipsis; white-space: nowrap; }
.tm-kpi-delta { margin-top: 6px; font-size: 11.5px; font-weight: 700; }
.tm-kpi-delta.up { color: var(--tm-good); }
.tm-kpi-delta.down { color: var(--tm-bad); }
.tm-kpi-delta span { margin-left: 2px; color: var(--tm-muted); font-weight: 500; }

.tm-label { margin: 18px 2px 8px; color: var(--tm-muted); font-size: 12.5px; font-weight: 700; }

/* The chat card has a fixed height, so once the screen is scrolled to the
   bottom it fills the view under the last KPI row. */
.tm-chat { display: flex; flex-direction: column; height: 586px; padding: 0; overflow: hidden; }
.tm-chat__head { display: flex; flex: none; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--tm-line); }
.tm-bot { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--tm-soft); color: var(--tm-soft-text); }
.tm-chat__title { font-size: 14px; font-weight: 800; }
.tm-chat__sub { color: var(--tm-muted); font-size: 11px; }
.tm-ghost { margin-left: auto; padding: 6px 11px; border: 1px solid var(--tm-line); border-radius: 99px; background: var(--tm-screen); font-size: 12px; font-weight: 700; }
.tm-chat__body { display: flex; flex: 1; flex-direction: column; gap: 9px; min-height: 0; overflow: hidden; padding: 12px; }
.tm-msg { flex: none; max-width: 84%; padding: 9px 12px; border-radius: 16px; font-size: 13px; line-height: 1.42; }
.tm-msg b { font-weight: 800; }
.tm-msg--user { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--tm-btn); color: #fff; }
.tm-msg--bot { align-self: flex-start; border: 1px solid var(--tm-line); border-bottom-left-radius: 5px; background: var(--tm-screen); }
.tm-msg.is-new { animation: tm-in .35s cubic-bezier(.23, 1, .32, 1) both; }
@keyframes tm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tm-typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.tm-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--tm-muted); animation: tm-blink 1s infinite; }
.tm-typing i:nth-child(2) { animation-delay: .15s; }
.tm-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tm-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.tm-chips { display: flex; flex: none; gap: 6px; overflow: hidden; padding: 0 12px 10px; }
.tm-chip { flex: none; padding: 7px 11px; border: 1px solid var(--tm-line); border-radius: 99px; background: var(--tm-screen); color: var(--tm-brand); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tm-input { display: flex; flex: none; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--tm-line); }
.tm-input__field { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--tm-line); border-radius: 99px; background: var(--tm-screen); color: var(--tm-muted); font-size: 13px; }
.tm-send { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tm-btn); color: #fff; }

.tm-tabbar { position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; height: 82px; display: flex; align-items: flex-start; justify-content: space-around; padding: 8px 10px 0; border-top: 1px solid var(--tm-line); background: var(--tm-card); }
.tm-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; padding: 4px 0; color: var(--tm-muted); font-size: 11px; font-weight: 600; }
.tm-tab svg { width: 24px; height: 24px; }
.tm-tab.is-on { color: var(--tm-brand); font-weight: 800; }
.tm-tab.is-on::before { content: ""; position: absolute; top: -9px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--tm-brand-2); }
.tm-home-ind { position: absolute; z-index: 21; bottom: 8px; left: 50%; width: 134px; height: 5px; border-radius: 3px; background: var(--tm-text); opacity: .85; transform: translateX(-50%); }

/* The phone is drawn smaller on phones and tablets, so the chat text is set
   larger to stay readable once scaled down. */
@media (max-width: 959px) {
  .tm-msg { max-width: 88%; font-size: 16px; line-height: 1.38; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-msg.is-new { animation: none; }
}
