/* The shared layout loads this stylesheet in the installed touch viewport. */
.portal-body {
    --portal-ink: #111827;
    --portal-muted: #6b7280;
    --portal-border: #e5e7eb;
    --portal-primary: #2563eb;
    --portal-background: #f2f2f7;
    --portal-soft: #eff6ff;
}

.portal-body:not(.portal-trackers) .portal-topbar {
    display: grid;
    grid-template-columns: minmax(82px, 1fr) minmax(0, 2fr) minmax(82px, 1fr);
    gap: 4px;
    height: 54px;
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
}

.portal-topbar-leading { display: contents; }

.portal-topbar .portal-menu-toggle {
    grid-column: 1;
    justify-self: start;
    gap: 5px;
    width: auto;
    min-height: 44px;
    padding: 0 3px;
    border: 0;
    background: transparent;
    color: var(--portal-primary);
    font-size: 14px;
    font-weight: 600;
}

.portal-topbar .portal-menu-toggle::after { content: "Разделы"; }
.portal-topbar .portal-menu-toggle .portal-icon { width: 18px; height: 18px; flex-basis: 18px; }

.portal-topbar .portal-breadcrumb {
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
    overflow: hidden;
    color: var(--portal-ink);
    font-size: 17px;
    font-weight: 650;
    text-align: center;
}

.portal-topbar .portal-breadcrumb > :is(a, .portal-icon) { display: none; }
.portal-topbar .portal-breadcrumb > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-topbar-user { grid-column: 3; grid-row: 1; justify-self: end; }
.portal-topbar-user > span:first-child { display: none; }

.portal-body .portal-dashboard .portal-module-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
    gap: 12px;
}

.portal-body .portal-dashboard .portal-module-card {
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 104px;
    padding: 14px;
    border-radius: 16px;
}

.portal-dashboard .portal-module-icon {
    color: var(--portal-primary);
    background: var(--portal-soft);
    border: 0;
}

.portal-dashboard .portal-module-arrow { display: none; }
.portal-body .portal-dashboard .portal-module-card h3 { margin: 0; font-size: 15px; font-weight: 650; }
.portal-body:not(.portal-trackers) main.portal-main { padding: 20px 16px 28px; min-height: calc(100dvh - 54px); }
.portal-body .portal-footer { display: none; }
.portal-body.portal-public .portal-content .portal-topbar { display: none; }
.portal-body.portal-public main.portal-main { min-height: 100dvh; }
.portal-body.portal-public .ios-login-page { padding-top: 32px; }
