/* ccSidekick — iPhone mockups.
 *
 * Each `.phone` is drawn at a fixed 430×884 (a 6.7" iPhone at 1×: 390×844
 * screen plus the bezel) and scaled with `--s` by whoever places it, so the
 * same markup is a hero render at 0.72, a tile render at 0.6 and a 3× store
 * screenshot on the export page. Everything inside is HTML, not an image:
 * crisp at any DPI, and the copy can be changed without a repaint.
 *
 * The screens follow the app's Material 3 look (seed #2F80ED, tone colours
 * good/warn/bad) closely enough that a store reviewer will find the real
 * thing familiar; the data is fictional throughout.
 */

.phone-wrap {
    --s: 1;
    width: calc(430px * var(--s));
    height: calc(884px * var(--s));
    position: relative;
    flex: none;
}

.phone {
    --seed: #2f80ed;
    --good: #1a7f4b;
    --warn: #b26a00;
    --bad: #d13b3b;
    --good-bg: #e6f4ec;
    --warn-bg: #fbf0dc;
    --bad-bg: #fbe5e5;
    --bg: #f4f5f8;
    --card: #ffffff;
    --fg: #1a1c1e;
    --fg-2: #43474e;
    --muted: #74777f;
    --rule: #e2e2e6;
    --chip: #e8eef8;
    --bar: #ffffff;
    --nav: #f0f3f8;
    --nav-active: #d4e3fc;

    position: absolute;
    top: 0;
    left: 0;
    width: 430px;
    height: 884px;
    transform: scale(var(--s));
    transform-origin: top left;
    background: #0b0b0c;
    border-radius: 64px;
    padding: 20px;
    box-sizing: border-box;
    /* The one drop shadow in the system: the product resting on a surface. */
    box-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
    font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, Helvetica, Arial, sans-serif;
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
}

.phone.dark {
    --good: #5dd196;
    --warn: #e6b04a;
    --bad: #ef6b6b;
    --good-bg: #1c2f25;
    --warn-bg: #33291a;
    --bad-bg: #37201f;
    --bg: #111315;
    --card: #1c1e21;
    --fg: #e3e2e6;
    --fg-2: #c3c6cf;
    --muted: #8d9199;
    --rule: #2c2f34;
    --chip: #253246;
    --bar: #1c1e21;
    --nav: #181b1f;
    --nav-active: #2a4468;
}

.phone .screen {
    position: relative;
    width: 390px;
    height: 844px;
    border-radius: 46px;
    overflow: hidden;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

/* Dynamic Island. */
.phone .island {
    position: absolute;
    top: 11px;
    left: 50%;
    transform: translateX(-50%);
    width: 122px;
    height: 36px;
    border-radius: 999px;
    background: #000;
    z-index: 5;
}

.phone .status {
    height: 54px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 30px 6px;
    font-size: 15px;
    font-weight: 600;
    flex: none;
}

.phone .status .glyphs { display: flex; gap: 6px; align-items: center; }
.phone .status svg { height: 12px; width: auto; fill: currentColor; }

.phone .appbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 10px;
    background: var(--bar);
    flex: none;
}

.phone .appbar img { width: 30px; height: 30px; border-radius: 8px; }
.phone .appbar .brand { font-size: 21px; font-weight: 600; letter-spacing: -0.3px; }
.phone .appbar .brand b { color: var(--seed); font-weight: 600; }
.phone .cc { color: #e0202e; }
.phone .appbar .spacer { flex: 1; }
.phone .appbar .glyph { width: 24px; height: 24px; color: var(--fg-2); }

.phone .content {
    flex: 1;
    overflow: hidden;
    padding: 12px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Company header. */
.phone .company h2 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.3px; }
.phone .company .sub { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.phone .company .strip { font-size: 12.5px; color: var(--fg-2); margin-top: 6px; line-height: 1.5; }
.phone .company .strip b { color: var(--fg); }

/* Cards. */
.phone .card {
    background: var(--card);
    border-radius: 14px;
    border-top: 4px solid var(--rule);
    padding: 12px 14px 8px;
    flex: none;
}

.phone .card.good { border-top-color: var(--good); }
.phone .card.warn { border-top-color: var(--warn); }
.phone .card.bad { border-top-color: var(--bad); }
.phone .card.blue { border-top-color: var(--seed); }

.phone .card h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 2px;
}

.phone .card .value { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.phone .card.good .value { color: var(--good); }
.phone .card.warn .value { color: var(--warn); }
.phone .card.bad .value { color: var(--bad); }
.phone .card .sub { font-size: 12.5px; color: var(--fg-2); margin: 2px 0 8px; }

.phone .rows { margin: 0; padding: 0; list-style: none; }
.phone .rows li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-top: 1px solid var(--rule);
    font-size: 14px;
}
.phone .rows .val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.phone .rows .val small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.phone .rows li.good .val { color: var(--good); }
.phone .rows li.warn .val { color: var(--warn); }
.phone .rows li.bad .val { color: var(--bad); }

/* Bucket grid on the delinquency screen. */
.phone .buckets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phone .bucket { background: var(--card); border-radius: 12px; padding: 10px 12px; }
.phone .bucket .lbl { font-size: 12px; color: var(--muted); }
.phone .bucket .amt { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.phone .bucket .cnt { font-size: 11.5px; color: var(--muted); }
.phone .bucket.warn .amt { color: var(--warn); }
.phone .bucket.bad .amt { color: var(--bad); }

.phone .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.phone .chip {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--rule);
    color: var(--fg-2);
    background: var(--card);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.phone .chip.on { background: var(--nav-active); border-color: transparent; color: var(--fg); font-weight: 600; }
.phone .chip .n { background: var(--chip); border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 600; }

/* Lists of tenants. */
.phone .list { display: flex; flex-direction: column; gap: 8px; }
.phone .row {
    background: var(--card);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.phone .row .name { font-weight: 600; font-size: 15px; }
.phone .row .name small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.phone .row .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.phone .row .meta .st { font-weight: 600; margin-right: 6px; }
.phone .row .meta .st.good { color: var(--good); }
.phone .row .meta .st.bad { color: var(--bad); }
.phone .row .right { text-align: right; flex: none; }
.phone .row .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.phone .row .amt.bad { color: var(--bad); }
.phone .row .amt.warn { color: var(--warn); }
.phone .row .gate { font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.phone .row .code { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.phone .pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 3px;
}
.phone .pill.bad { background: var(--bad-bg); color: var(--bad); }
.phone .pill.warn { background: var(--warn-bg); color: var(--warn); }
.phone .pill.good { background: var(--good-bg); color: var(--good); }
.phone .row .chev { color: var(--muted); font-size: 18px; margin-left: 6px; }

.phone .search {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 11px 14px;
    color: var(--muted);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.phone .search svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.phone .fetched { font-size: 12px; color: var(--muted); }
.phone .count { font-size: 12.5px; color: var(--muted); }

/* Tenant detail. */
.phone .detail-head h2 { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.3px; }
.phone .detail-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.phone .actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.phone .action {
    background: var(--card);
    border-radius: 14px;
    padding: 12px 6px 10px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--seed);
}
.phone .action svg { width: 26px; height: 26px; display: block; margin: 0 auto 4px; stroke: var(--seed); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.phone .action.primary { background: var(--seed); color: #fff; }
.phone .action.primary svg { stroke: #fff; }
.phone .section-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 4px 0 -4px; }
.phone .invoice { display: flex; justify-content: space-between; background: var(--card); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.phone .invoice .l small { display: block; font-size: 12px; color: var(--muted); }
.phone .invoice .r { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.phone .invoice .r small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }

/* Sign-in. */
.phone .signin { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding-bottom: 60px; }
.phone .signin img { width: 108px; height: 108px; border-radius: 26px; margin-bottom: 8px; }
.phone .signin h1 { font-size: 30px; font-weight: 700; margin: 0; letter-spacing: -0.4px; }
.phone .signin h1 b { color: var(--seed); font-weight: 700; }
.phone .signin .tag { font-style: italic; color: var(--muted); font-size: 14px; margin-top: -6px; }
.phone .signin .co { font-size: 16px; font-weight: 600; margin-top: 22px; }
.phone .signin .btn {
    margin-top: 6px;
    background: var(--seed);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 999px;
    padding: 14px 26px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.phone .signin .btn svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.phone .signin .link { color: var(--seed); font-size: 14px; margin-top: 8px; }
.phone .signin .foot { position: absolute; bottom: 44px; left: 0; right: 0; font-size: 12px; color: var(--muted); }

/* Bottom tab bar. */
.phone .tabs {
    flex: none;
    height: 84px;
    background: var(--nav);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 10px 6px 0;
    border-top: 1px solid var(--rule);
}
.phone .tab { text-align: center; font-size: 11.5px; color: var(--fg-2); width: 68px; }
.phone .tab .ic {
    width: 56px;
    height: 30px;
    border-radius: 999px;
    margin: 0 auto 4px;
    display: grid;
    place-items: center;
}
.phone .tab.on { color: var(--fg); font-weight: 600; }
.phone .tab.on .ic { background: var(--nav-active); }
.phone .tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.phone .tab.on svg { fill: currentColor; fill-opacity: .15; }

/* Home indicator. */
.phone .home {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    border-radius: 999px;
    background: var(--fg);
    opacity: .9;
}

/* Fade at the bottom of a list that runs off the screen. */
.phone .content::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 84px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}

/* ---- join: "Does this look right?" ---- */
.phone .join { flex: 1; display: flex; flex-direction: column; padding: 28px 18px 0; gap: 12px; }
.phone .join h1 { font-size: 17px; font-weight: 600; text-align: center; margin: 6px 0 0; }
.phone .join .box { background: var(--chip); border-radius: 12px; padding: 14px; }
.phone .join .row { display: flex; gap: 10px; font-size: 14px; padding: 2px 0; }
.phone .join .row span { flex: 0 0 64px; color: var(--muted); font-size: 12px; padding-top: 2px; }
.phone .join .row b { flex: 1; text-align: left; font-weight: 500; }
.phone .join .blurb { font-size: 12px; color: var(--fg-2); margin-top: 8px; }
.phone .join .buttons { display: flex; gap: 12px; margin-top: 6px; }
.phone .join .buttons div { flex: 1; text-align: center; padding: 14px 0; border-radius: 10px; font-size: 15px; font-weight: 500; }
.phone .join .no { border: 1px solid var(--rule); color: var(--seed); }
.phone .join .yes { flex: 2 !important; background: var(--seed); color: #fff; }
.phone .join .back { text-align: center; color: var(--seed); font-size: 14px; }
