html[data-portal-pwa="true"] .pwa-home {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-block: 8px 16px;
    color: var(--portal-ink);
}

.pwa-home .pwa-home-greeting {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-home-greeting img {
    display: block;
    flex: none;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

html[data-portal-pwa="true"] .pwa-home .pwa-home-greeting h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}

.pwa-home-greeting p {
    margin: 4px 0 0;
    color: var(--portal-muted);
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.pwa-home a {
    color: inherit;
    text-decoration: none;
}

.pwa-home a:focus-visible,
.pwa-home button:focus-visible {
    outline: 2px solid var(--portal-primary);
    outline-offset: 2px;
}

.pwa-home-persons {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgb(37 99 235 / 18%);
    border-radius: 18px;
    background: var(--portal-surface, #fff);
}

.pwa-home-persons-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: rgb(37 99 235 / 10%);
    color: var(--portal-primary);
}

.pwa-home .pwa-home-persons-icon .portal-icon { width: 24px; height: 24px; }
.pwa-home-persons-text { display: grid; flex: 1; gap: 5px; min-width: 0; line-height: 1.2; }
.pwa-home-persons-text strong { font-size: 17px; font-weight: 600; }
.pwa-home-persons-text > span { color: var(--portal-muted); font-size: 15px; }
.pwa-home-persons .pwa-home-chevron { color: var(--portal-primary); }

.pwa-home-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pwa-home-section h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 600;
}

.pwa-home-section-heading p {
    margin: 3px 0 0;
    color: var(--portal-muted);
    font-size: 12px;
    line-height: 1.35;
}

.pwa-home-overview {
    padding-bottom: 4px;
    border-radius: 16px;
    background: var(--portal-surface, #fff);
}

.pwa-home-metric + .pwa-home-metric { position: relative; }
.pwa-home-metric + .pwa-home-metric::before {
    position: absolute;
    inset: 0 0 auto 16px;
    border-top: 1px solid var(--portal-border);
    content: "";
}

.pwa-home-metric-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 16px;
    border-radius: 12px;
    font-size: 17px;
    line-height: 1.2;
}

.pwa-home-metric-link > :nth-child(2) { flex: 1; }
.pwa-home-metric-icon,
.pwa-home-shortcut-icon {
    display: grid;
    flex: 0 0 24px;
    place-items: center;
    color: var(--portal-primary);
}

.pwa-home .pwa-home-metric-icon .portal-icon { width: 20px; height: 20px; }
.pwa-home-chevron { display: flex; flex: none; color: var(--portal-muted); }
.pwa-home .pwa-home-chevron .portal-icon { width: 13px; height: 13px; stroke-width: 2; }
.pwa-home-number { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

.pwa-home-spinner {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--portal-border);
    border-top-color: var(--portal-primary);
    border-radius: 50%;
    animation: pwa-home-spin .75s linear infinite;
}

@keyframes pwa-home-spin { to { transform: rotate(360deg); } }

.pwa-home-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    color: var(--portal-muted);
    font-size: 12px;
}

.pwa-home-error button {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--portal-primary);
    font: inherit;
}

.pwa-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr));
    gap: 12px;
}

.pwa-home-shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px;
    border-radius: 16px;
    background: var(--portal-surface, #fff);
    font-size: 15px;
    line-height: 1.25;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pwa-home-shortcut-icon { flex-basis: 28px; }
.pwa-home .pwa-home-shortcut-icon :is(.portal-icon, .bi) { width: 20px; height: 20px; font-size: 20px; }
.pwa-home :is(.pwa-home-persons, .pwa-home-shortcut):active { transform: scale(.98); opacity: .85; }
.pwa-home [hidden] { display: none; }
.pwa-home .pwa-home-spinner[hidden] { display: block; visibility: hidden; animation: none; }

@media (prefers-reduced-motion: reduce) {
    .pwa-home-spinner { animation: none; }
    .pwa-home :is(.pwa-home-persons, .pwa-home-shortcut):active { transform: none; }
}
