/* App screens rebuilt from the primitives in ui.css, at the app's own sizes (1 CSS px = 1 dp).
   Everything inside .phone is an illustration: the wrapper carries role="img" and a text alternative. */

.phone {
  --pad: 20px;
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; max-width: 375px;
  background: var(--color-bg);
  box-shadow: var(--shadow-lg);
  font-size: 15px; line-height: 1.4;
  text-align: left;
}
@media (max-width: 400px) { .phone { --pad: 16px; } }
.phone .btn-ghost { color: var(--color-accent); }
.phone .screen { flex: 1; display: flex; flex-direction: column; padding: 8px var(--pad) 24px; min-width: 0; }
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  height: 30px; padding: 0 var(--pad); font-size: 13px; color: var(--color-neutral-800);
}
.phone-status .bars { display: flex; gap: 2px; align-items: flex-end; height: 10px; }
.phone-status .bars i { display: block; width: 3px; background: var(--color-neutral-800); }
.phone-status .bars i:nth-child(1) { height: 4px; }
.phone-status .bars i:nth-child(2) { height: 6px; }
.phone-status .bars i:nth-child(3) { height: 8px; }
.phone-status .bars i:nth-child(4) { height: 10px; }

.m-title { font-family: var(--font-heading); font-weight: 600; font-size: 40px; line-height: 44px; letter-spacing: -0.01em; }
.m-sub { font-size: 14px; color: var(--color-neutral-700); }
.m-h2 { font-family: var(--font-heading); font-weight: 600; font-size: 34px; line-height: 38px; letter-spacing: -0.01em; }
.m-note { font-size: 14px; color: var(--color-neutral-700); }
.m-kicker { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-700); }
.m-section { font-weight: 500; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); margin: 22px 0 2px; }

/* — Owner home (OwnerHome.tsx) — */
.oh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.oh-head .btn { flex: none; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--color-divider); margin-top: 18px; }
.summary > div { padding: 10px 12px; }
.summary > div + div { border-left: 1px solid var(--color-divider); }
.summary b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 30px; line-height: 30px; }
.summary span { font-size: 12px; }
.summary .is-overdue { background: var(--color-accent-900); color: var(--color-bg); }
.summary .is-due-soon { background: var(--color-accent-100); color: var(--color-accent-900); }
.phone .chips { margin-top: 14px; }

.tri-row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--color-divider); }
.tri-text { flex: 1; min-width: 0; }
.tri-name {
  font-family: var(--font-heading); font-weight: 600; font-size: 20px; line-height: 23px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tri-place { font-size: 13px; color: var(--color-neutral-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tri-count { display: flex; flex-direction: column; align-items: flex-end; }
.tri-count b { font-family: var(--font-heading); font-weight: 600; font-size: 30px; line-height: 30px; }
.tri-count span { font-size: 11px; color: var(--color-neutral-700); }
.tri-count.is-overdue b { color: var(--status-overdue-number); }
.tri-count.is-due-soon b { color: var(--status-due-soon-number); }

/* — Tab bar (84px, raised 72×60 Scan button) — */
.tabbar {
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: center;
  height: var(--tab-bar-height); padding-bottom: 14px; border-top: 1px solid var(--color-divider);
}
.tabbar > span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--color-neutral-700); }
.tabbar > span.is-active { color: var(--color-accent-700); }
.tabbar svg { width: 24px; height: 24px; }
.tabbar .scan {
  justify-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 72px; height: 60px; margin-top: calc(var(--scan-raise) * -1);
  background: var(--color-accent); color: var(--color-bg);
  font-family: var(--font-heading); font-weight: 600; font-size: 13px;
}
.tabbar .scan svg { width: 26px; height: 26px; }

/* — Tenant home — */
.phone .status-block { margin-top: 18px; }
.phone .btn-block { margin-top: 18px; }
.phone .btn-ghost.btn-block { margin-top: 10px; }
.m-foot { margin-top: 14px; text-align: center; font-size: 13px; color: var(--color-neutral-700); }

/* — Flow screens: step header, Scan, Confirm, Done — */
.step-head { display: flex; align-items: center; justify-content: space-between; height: 56px; font-size: 15px; color: var(--color-neutral-700); }
.step-head svg { width: 24px; height: 24px; color: var(--color-text); }
.flow-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.flow-bottom { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 8px; }

.scan-target { position: relative; width: 200px; height: 200px; margin: 12px auto 0; color: var(--color-accent); }
.scan-target i { position: absolute; inset: 0; border: 1px solid var(--color-accent); opacity: 0; }
.scan-target svg { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; }
@media (prefers-reduced-motion: no-preference) {
  .scan-target i { animation: pulse 2.4s ease-out infinite; }
  .scan-target i:nth-child(2) { animation-delay: 0.8s; }
  .scan-target i:nth-child(3) { animation-delay: 1.6s; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-target i:nth-child(1) { opacity: 0.5; transform: scale(0.72); }
  .scan-target i:nth-child(2) { opacity: 0.25; }
}
@keyframes pulse {
  from { transform: scale(0.5); opacity: 0.9; }
  to { transform: scale(1.3); opacity: 0; }
}
.flow-center .m-h2 { margin-top: 28px; }
.flow-center .m-copy { font-size: 16px; color: var(--color-neutral-700); margin-top: 8px; }

.m-confirm { display: flex; flex-direction: column; gap: 18px; padding-top: 12px; }

.done-mark { --bp-border: var(--color-accent); display: grid; place-items: center; width: 120px; height: 120px; margin: 28px auto 0; color: var(--color-accent); }
.done-mark svg { width: 56px; height: 56px; }
.done-mark.is-small { width: 72px; height: 72px; margin-top: 8px; }
.done-mark.is-small svg { width: 34px; height: 34px; }
.flow-center .m-done { font-family: var(--font-heading); font-weight: 600; font-size: 40px; line-height: 44px; margin-top: 32px; }
.flow-center .m-body { font-size: 17px; color: var(--color-neutral-700); max-width: 280px; margin-top: 8px; }
.flow-center .m-queued { font-weight: 500; font-size: 15px; color: var(--color-accent-700); max-width: 300px; margin-top: 16px; }

/* — System detail header and Tags tab — */
.sys-head { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.sys-head > svg { width: 24px; height: 24px; flex: none; margin: 0 8px 0 2px; }
.sys-head > svg.settings { margin: 0 2px 0 auto; }
.sys-head .name { font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 1.1; }
.sys-head .place { font-size: 12px; color: var(--color-neutral-700); }
.phone .tabs { margin-top: 18px; }
.tag-help { font-size: 13px; color: var(--color-neutral-700); padding: 14px 0 6px; }
.tag-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-divider); }
.tag-row b { display: block; font-weight: 500; }
.tag-row span { font-size: 13px; color: var(--color-neutral-700); }
.phone .btn-secondary.btn-block { margin-top: 14px; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--color-divider); }
.hist-row b { display: block; font-weight: 500; font-size: 16px; }
.hist-row span { font-size: 14px; color: var(--color-neutral-700); }

/* — Specimens: framed fragments of app screens used in the feature grid — */
.specimen { padding: 24px 20px; background: var(--color-bg); font-size: 15px; line-height: 1.4; }
.specimen .btn-ghost { color: var(--color-accent); }
.code-box { --bp-border: var(--color-divider); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; text-align: center; }
.code-box b { font-family: var(--font-heading); font-weight: 600; font-size: 44px; line-height: 1; letter-spacing: 0.06em; }
.code-box span { font-size: 14px; color: var(--color-neutral-700); }
.specimen .btn-block { margin-top: 18px; }
.specimen .reader-note { font-size: 13px; color: var(--color-neutral-700); margin-top: 10px; }
.specimen .summary { margin-top: 0; }
.specimen .chips { margin-top: 14px; }
.specimen .toast { margin-top: 20px; }
