/* The tenant's own pages (#/m/... the readings of the meters, #/i/... their invoices): a phone first, in the
   program's own colours, with no menu of the program around them. Loaded after app.css: what is here wins. */
.tenant-page {
  --accent: #1f5fbf; --accent-text: #ffffff; --accent-soft: #e7effb; --t-line: #e3e6e8; --t-warn: #b4621b; --t-warn-soft: #fdf1e4;
  max-width: 30rem; margin: 0 auto; padding: 0 0 6.5rem; min-height: 100vh; background: #f3f5f9; color: #1d2330;
}
.tenant-page .muted { color: #6b7370; }
.tenant-page button.primary, .tenant-page a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.tenant-page button.primary:not(:disabled):hover, .tenant-page a.button.primary:hover { background: #1a52a6; border-color: #1a52a6; }
.tenant-page button.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.tenant-page .wide { display: block; width: 100%; text-align: center; }
.tenant-page button.primary.wide, .tenant-page a.button.wide { padding: .9rem 1rem; font-size: 1.05rem; font-weight: 600; border-radius: 12px; }

/* the top: the name and the languages, LV RU EN, the one shown underlined */
.tenant-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; background: #fff; border-bottom: 1px solid var(--t-line); font-size: 1.15rem; }
/* the head and what is under it stay on top while the page scrolls; the premises beside the program's name */
.tenant-sticky { position: sticky; top: 0; z-index: 20; }
.tenant-title { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.tenant-place { font-size: .95rem; color: #6b7370; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the tenant's premises to choose among, in the head */
.tenant-place-pick { font: inherit; font-size: .95rem; width: auto; max-width: 13rem; padding: .25rem .4rem; border-radius: 8px; }
.tenant-under { background: #f3f5f9; padding: .6rem 1.1rem .1rem; border-bottom: 1px solid var(--t-line); }
.tenant-under .tenant-progress { margin-bottom: .5rem; }
/* the meter one by one in a card of its colour, as the cards of all of them */
.tenant-meter.one { padding: .2rem 1rem 1rem; margin: .4rem 0 .9rem; }
.tenant-meter.one > h1 { margin-top: .6rem; }
/* another Android browser than Chrome: the way to open the page in Chrome */
.tenant-chrome { background: #fff3e6; }
/* the app's settings in a block of their own */
.tenant-settings { background: #fff; border: 1px solid var(--t-line); border-radius: 14px; padding: .2rem 1rem 1rem; margin: 1.2rem 0 1rem; }
.tenant-settings > h2 { font-size: 1.1rem; margin: .8rem 0 .2rem; }
.tenant-langs { display: flex; gap: .2rem; }
.tenant-langs button { border: 0; background: none; padding: .3rem .5rem; color: #6b7370; font: inherit; font-size: .95rem; border-bottom: 2px solid transparent; border-radius: 0; }
.tenant-langs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* the page itself */
.tenant-card { padding: 1rem 1.1rem 0; }
.tenant-card h1 { font-size: 1.6rem; line-height: 1.25; margin: .3rem 0 .6rem; color: #17201d; }
.tenant-premises { color: #6b7370; margin: .2rem 0 0; }
.tenant-top { display: grid; grid-template-columns: 2.5rem 1fr 2.5rem; align-items: center; text-align: center; margin: 0 -.3rem .4rem; }
.tenant-top button.icon { border: 0; background: none; padding: .3rem; color: inherit; }

/* a meter on the screen of all of them */
.tenant-meter { background: #fff; border: 1px solid var(--t-line); border-radius: 14px; padding: .9rem 1rem; margin: .8rem 0; }
.tenant-meter > b { font-size: 1.05rem; }
.tenant-meter-input { display: flex; gap: .6rem; margin-top: .55rem; }
.tenant-meter-input input { flex: 1; min-width: 0; }
.reading-input { font-size: 1.6rem; font-weight: 600; letter-spacing: .1em; padding: .6rem .8rem; border: 1.5px solid #c9cfcc; border-radius: 10px; font-variant-numeric: tabular-nums; }
.reading-input::placeholder { color: #a2aaa6; font-weight: 500; letter-spacing: .04em; }
.reading-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 95, 191, .18); }
.reading-input.good { border-color: var(--accent); }
.reading-input.warn { border-color: var(--t-warn); background: var(--t-warn-soft); }
.reading-input.big { display: block; width: 100%; font-size: 2.1rem; text-align: right; padding: .75rem 1rem; margin: .35rem 0 .3rem; }
.reading-use { color: var(--accent); font-weight: 700; margin: .45rem 0 0; font-size: 1.05rem; }
.photo-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 3.4rem; border: 1.5px solid #c9cfcc; border-radius: 10px; background: #fff; color: #2b3330; }
.photo-button.wide { display: flex; width: 100%; padding: .8rem 1rem; margin-top: .9rem; font-size: 1rem; }

/* one meter a step */
.tenant-step label { font-weight: 600; margin-top: .6rem; display: block; }
.tenant-progress { display: flex; gap: .35rem; margin: .3rem 0 1rem; }
.tenant-progress i { flex: 1; height: 4px; border-radius: 2px; background: #dfe3e1; }
.tenant-progress i.on { background: var(--accent); }
.meter-drum-box { text-align: center; margin: .5rem 0 .2rem; }
/* the meter's casing, in the colour of what it measures (cold water blue, hot red, electricity yellow, gas orange - as the suppliers' cards of the lease), its window dark */
.meter-drum { display: inline-flex; gap: .25rem; padding: .45rem .5rem; border-radius: 14px; background: #2a2f2d; border: 9px solid #59615e;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .15); }
.meter-drum.cold-water { border-color: #2f74e0; }
.meter-drum.hot-water { border-color: #d23c2f; }
.meter-drum.gas { border-color: #e8780c; }
.meter-drum.electricity { border-color: #e0b400; }
.meter-drum i { font-style: normal; width: 1.55rem; line-height: 2rem; border-radius: 4px; background: #fff; color: #1c2321; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.meter-drum i.red { background: #c23b30; color: #fff; }
.meter-drum-box p { margin: .25rem 0 0; }

/* the field of one meter a step: the digits at the right as numbers stand (they do not jump when the use comes), the use
   inside it at the left, the button to go on right under it - both seen with
   the phone's keyboard up */
.reading-field { position: relative; }
.reading-input.big.with-use { padding-left: 10rem; }
.reading-badge { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 1rem; padding: .3rem .6rem; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.tenant-next { margin-top: .7rem; }
.tenant-step .photo-button.wide { margin-top: .6rem; padding: .55rem .8rem; font-size: .95rem; border-style: dashed; }

/* a word on a reading: much use, a digit missed */
.reading-warn { display: flex; gap: .6rem; align-items: flex-start; background: var(--t-warn-soft); border-radius: 12px; padding: .8rem .9rem; margin: .7rem 0 0; color: #4a3a2a; }
.reading-warn-icon { color: var(--t-warn); flex: none; margin-top: .05rem; }
.reading-warn b { display: block; color: #2c2219; margin-bottom: .15rem; }
.reading-warn button.link { padding: 0; margin-top: .45rem; }
.tenant-view { display: block; margin: 1.1rem auto 0; }

/* the look over them before sending */
.tenant-review { background: #fff; border: 1px solid var(--t-line); border-radius: 14px; margin: .8rem 0; }
.tenant-review-row { display: flex; justify-content: space-between; gap: .7rem; align-items: center; padding: .9rem 1rem; }
.tenant-review-row + .tenant-review-row { border-top: 1px solid var(--t-line); }
.tenant-review-row > div > b { font-size: 1.02rem; }
.tenant-digits { color: #17201d; font-variant-numeric: tabular-nums; }

/* the button at the foot of the screen */
.tenant-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--t-line); padding: .8rem 1.1rem calc(.8rem + env(safe-area-inset-bottom)); text-align: center; }
.tenant-bar > * { max-width: 27.8rem; margin-left: auto; margin-right: auto; }
.tenant-bar p { margin: .45rem auto 0; }

/* the thanks */
.tenant-done { text-align: center; padding-top: 2rem; }
.tenant-tick { width: 5.2rem; height: 5.2rem; margin: 0 auto 1rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.tenant-done h1 { font-size: 1.75rem; }
.tenant-sent { text-align: left; background: #eaeef5; border-radius: 12px; padding: .4rem 1rem; margin: 1.1rem 0; }
.tenant-sent > div { display: flex; justify-content: space-between; gap: .7rem; padding: .45rem 0; }
.tenant-sent b { font-variant-numeric: tabular-nums; }
.tenant-invoices-link { margin: 1.1rem 0 .8rem; }

/* the tenant's invoices */
.tenant-invoice { background: #fff; border: 1px solid var(--t-line); border-radius: 14px; padding: 1rem; margin: .8rem 0; }
.tenant-invoice.due, .tenant-invoice.late { border: 1.5px solid var(--accent); }
.tenant-invoice-head { display: flex; justify-content: space-between; gap: .7rem; align-items: baseline; }
.tenant-sum { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.tenant-state { display: inline-block; margin: .5rem 0 .2rem; padding: .2rem .65rem; border-radius: 999px; font-size: .88rem; font-weight: 600; }
.tenant-state::before { content: "● "; }
.tenant-state.paid { background: var(--accent-soft); color: var(--accent); }
.tenant-state.due { background: #fdf1e4; color: #a35a17; }
.tenant-state.late { background: #fbe6e3; color: #b3261e; }
.tenant-invoice .button { margin-top: .7rem; }
.tenant-top h1 { font-size: 1.1rem; margin: 0; }
.tenant-top button.icon.forward svg { transform: scaleX(-1); }
.tenant-top button.icon:disabled { opacity: .3; }

/* larger everywhere: the page is read on a phone, often at arm's length; the small grey lines are read too */
.tenant-page { font-size: 1.1rem; line-height: 1.45; }
.tenant-page .small { font-size: 1rem; }
.tenant-page .muted { color: #4f5754; }
.tenant-top h1 { font-size: 1.3rem; }
.tenant-review-row { padding: 1.05rem 1.1rem; }
.tenant-review-row > div > b { font-size: 1.2rem; }
.tenant-review-row .muted.small { font-size: 1.05rem; margin-top: .2rem; }
.tenant-review-row .tenant-digits { font-size: 1.15rem; }
.tenant-review-row button.link { font-size: 1.15rem; padding: .4rem .2rem; }
.tenant-page button.primary.wide, .tenant-page a.button.wide { font-size: 1.2rem; padding: 1rem 1rem; }
.tenant-bar p { font-size: 1rem; color: #3d4441; line-height: 1.4; }
.tenant-meter > b { font-size: 1.2rem; }
.tenant-langs button { font-size: 1.05rem; }

/* the review: the digits typed and the use counted from them, large - they are what the tenant checks */
.tenant-review-digits { margin-top: .3rem; font-size: 1.15rem; line-height: 1.3; }
.tenant-review-digits .tenant-digits { font-size: 1.9rem; letter-spacing: .02em; }
.tenant-review-use { margin-top: .25rem; color: var(--accent); font-weight: 700; font-size: 1.45rem; line-height: 1.25; }
/* the digits typed in a field and the use under it, larger still */
.reading-input { font-size: 2rem; }
.reading-badge { font-size: 1.15rem; }
.reading-input.big.with-use { padding-left: 11rem; }
.reading-use { font-size: 1.45rem; }
/* the review's rows in the colour of the meter, as its casing on the step: cold water blue, hot red, electricity yellow, gas orange */
.tenant-review { overflow: hidden; }
.tenant-review-row { border-left: 6px solid transparent; }
.tenant-review-row.cold-water { border-left-color: #2f74e0; background: #eef4fd; }
.tenant-review-row.hot-water { border-left-color: #d23c2f; background: #fdf0ee; }
.tenant-review-row.gas { border-left-color: #e8780c; background: #fff3e6; }
.tenant-review-row.electricity { border-left-color: #e0b400; background: #fffbe6; }
/* the cards of the screen of all the meters, in the same colours */
.tenant-meter { border-left: 6px solid var(--t-line); }
.tenant-meter.cold-water { border-left-color: #2f74e0; background: #eef4fd; }
.tenant-meter.hot-water { border-left-color: #d23c2f; background: #fdf0ee; }
.tenant-meter.gas { border-left-color: #e8780c; background: #fff3e6; }
.tenant-meter.electricity { border-left-color: #e0b400; background: #fffbe6; }
/* the screen of all the meters: the digits at the right of the field, the use inside it at the left, its word over it */
.tenant-meter-input .reading-field { flex: 1; min-width: 0; }
.tenant-meter-input .reading-input { width: 100%; text-align: right; }
.tenant-meter-input .reading-input.with-use { padding-left: 6.8rem; }
.reading-badge.two { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; font-size: 1.15rem; padding: .25rem .55rem; }
.reading-badge.two small { font-size: .72rem; font-weight: 600; opacity: .85; }

/* the tenant's app: the way back to it, the sum to pay, its two buttons, its blocks; the payment copied line by line */
.tenant-back { display: inline-flex; align-items: center; gap: .25rem; margin: .5rem 0 0 .75rem; }
.tenant-due { font-size: 1.15rem; font-weight: 600; margin: .25rem 0 1rem; }
.tenant-due.late { color: #b3261e; }
.tenant-app-buttons { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
.tenant-app-buttons .button { font-size: 1.15rem; padding: 1rem; }
.tenant-block { border-top: 1px solid #e3e8f3; padding: .9rem 0; display: grid; gap: .5rem; }
.tenant-block p { margin: 0; }
.tenant-pay { display: grid; gap: .35rem; margin: .5rem 0; padding: .5rem .75rem; background: #f6f8fc; border-radius: 10px; }
.tenant-copy { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .5rem; }
.tenant-copy .muted { grid-column: 1 / -1; }
.tenant-copy b { overflow-wrap: anywhere; }

/* the readings by their own address: the app offered on top */
.tenant-install { display: flex; align-items: center; gap: .75rem; margin: .5rem .75rem 0; padding: .6rem .8rem; border-radius: 12px; background: #eaf1ff; }
.tenant-install span { flex: 1; font-size: .92rem; }

/* how to let the notifications through on the phone: the makes to choose from, the steps */
.push-help { margin-top: .5rem; }
.push-help summary { cursor: pointer; color: var(--link, #1f5fbf); }
.push-makes { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.push-makes button { padding: .3rem .6rem; border-radius: 999px; border: 1px solid #c9d3e6; background: #fff; font-size: .85rem; }
.push-makes button.on { background: #1f5fbf; border-color: #1f5fbf; color: #fff; }
.push-help ol { margin: .25rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
/* the page scrolled: the head casts a shadow over what went under it (see scrolled.ts) */
.tenant-sticky { transition: box-shadow .15s; }
html.scrolled .tenant-sticky { box-shadow: 0 6px 14px rgba(16, 32, 64, .14); }
