/* A section of the portal: the search, the switches, the heading of a list, the folded rows, the
   states, the table and the two fields in a row - by the approved samples
   (макети/нов-вид-2026-10-14/portal-plochki.html, макети/акаунти-2026-10-20/edin-portal.html);
   drawn by HVAC CRM, classes HVAC_New_Portal and HVAC_New_Portal_List. */
.ovemo-search { display: grid; gap: 6px; max-width: 560px; width: 100%; margin: 0 auto; }
.ovemo-search label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ovemo-muted); font-weight: 600; }
.ovemo-search input { font: inherit; font-size: 15px; padding: 11px 14px; border: 1px solid var(--ovemo-line); border-radius: 10px; background: var(--ovemo-card); color: var(--ovemo-fg); box-shadow: var(--ovemo-shadow); }
.ovemo-search input:focus { outline: 2px solid var(--ovemo-accent); outline-offset: 1px; border-color: var(--ovemo-accent); }

.ovemo-tabs { display: flex; flex-wrap: wrap; justify-content: center; border-bottom: 1px solid var(--ovemo-line); }
.ovemo-tab { border-bottom: 2px solid transparent; padding: 10px 18px; font-size: 14px; color: var(--ovemo-muted); text-decoration: none; }
.ovemo-tab:hover { color: var(--ovemo-accent); }
.ovemo-tab.is-active { color: var(--ovemo-accent); border-bottom-color: var(--ovemo-accent); font-weight: 700; }
.ovemo-tab:focus-visible { outline: 2px solid var(--ovemo-accent); }

.ovemo-list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.ovemo-list-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.ovemo-list-head span { color: var(--ovemo-muted); font-size: 13px; }

.ovemo-empty { margin: 0; padding: 28px; text-align: center; color: var(--ovemo-muted); }

/* The folded rows: one column per value of the closed row, the arrow on the right. */
.ovemo-rows { overflow: hidden; }
.ovemo-rows-head,
.ovemo-row > summary { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 34px 11px 14px; }
.ovemo-rows-head { padding-block: 9px; background: var(--ovemo-tile); border-bottom: 1px solid var(--ovemo-line); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ovemo-muted); }
.ovemo-row + .ovemo-row { border-top: 1px solid var(--ovemo-line); }
/* A heading over the rows of one group (the site of the devices in "Passports"). */
.ovemo-rows-group { margin: 0; padding: 10px 14px 6px; font-size: 14px; font-weight: 600; color: var(--ovemo-fg); }
.ovemo-row + .ovemo-rows-group { border-top: 1px solid var(--ovemo-line); margin-top: 6px; }
.ovemo-row > summary { position: relative; cursor: pointer; list-style: none; }
.ovemo-row > summary::-webkit-details-marker { display: none; }
.ovemo-row > summary::after { content: "▸"; position: absolute; right: 14px; top: 11px; color: var(--ovemo-muted); }
.ovemo-row[open] > summary::after { content: "▾"; }
.ovemo-row > summary:hover { background: var(--ovemo-tile); }
.ovemo-row > summary:focus-visible { outline: 2px solid var(--ovemo-accent); outline-offset: -2px; }
.ovemo-row > summary > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ovemo-row > summary > .is-first { font-weight: 600; }
.ovemo-row.is-opened { box-shadow: inset 3px 0 0 var(--ovemo-accent); }
.ovemo-row-body { display: grid; gap: 6px; padding: 4px 14px 14px; background: var(--ovemo-tile); }
.ovemo-line,
.ovemo-portal .hvac-portal-card-meta { margin: 0; color: var(--ovemo-muted); font-size: 13px; line-height: 1.45; }
/* What the modules add under an opened row - every part on its own, without the paragraph gaps. */
.ovemo-row-extra { display: grid; gap: 12px; }
.ovemo-row-extra p { margin: 0; }
.ovemo-row-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 6px; }
.ovemo-btn-small { display: inline-block; padding: 4px 10px; border: 1px solid var(--ovemo-accent); border-radius: 4px; color: var(--ovemo-accent); font-size: 12px; text-decoration: none; background: var(--ovemo-card); }
.ovemo-btn-small:is(:hover, :focus, :active) { background: var(--ovemo-tile-hover); color: var(--ovemo-accent); }
.ovemo-phone-only { display: none; }

.ovemo-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 400; background: var(--ovemo-chip); color: var(--ovemo-fg); }
.ovemo-pill.is-warn { background: var(--ovemo-warn-soft); color: var(--ovemo-warn); border: 1px solid rgba(179, 45, 46, .35); }
.ovemo-pill.is-ok { background: var(--ovemo-ok-soft); color: var(--ovemo-ok); }
.ovemo-pill.is-new { background: var(--ovemo-accent); color: #fff; }

/* Inside a card: two fields in a row, a table. */
.ovemo-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ovemo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ovemo-table th { text-align: left; color: var(--ovemo-muted); font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 8px; border-bottom: 1px solid var(--ovemo-line); }
.ovemo-table td { padding: 8px; border-bottom: 1px solid var(--ovemo-line); vertical-align: top; }
.ovemo-table tr:last-child td { border-bottom: 0; }

/* Read-only facts in a frame: the label on the left, the value on the right, no lines. */
.ovemo-info { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 10px 24px; margin: 0; font-size: 14px; }
.ovemo-info dt { color: var(--ovemo-muted); }
.ovemo-info dd { margin: 0; }

/* Phone: the closed row one value under another without the columns a phone hides; they come when opened. */

/* The work order of the contractor (sample maistor-plochki.html): the four boxes on top (also the
   sums of Payments - HVAC_Portal_Frame::boxes()), the sheet with the amounts on the right, the states,
   the signature, the folded "Decline" and the list of the states. */
.ovemo-wo { display: grid; gap: 18px; }
.ovemo-taskhead,
.ovemo-portal .hvac-portal-taskhead { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ovemo-taskhead > div,
.ovemo-portal .hvac-portal-taskhead > div { background: var(--ovemo-tile); border-radius: 10px; padding: 12px 14px; display: grid; gap: 3px; font-size: 13px; color: var(--ovemo-muted); }
.ovemo-taskhead b,
.ovemo-portal .hvac-portal-taskhead b { color: var(--ovemo-fg); font-size: 15px; }
.ovemo-taskhead-label,
.ovemo-portal .hvac-portal-taskhead-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.ovemo-wo-sheet { max-width: none; }
.ovemo-wo-sheet h2 { letter-spacing: .04em; text-transform: uppercase; }
.ovemo-wo-sheet h3,
.ovemo-form h3 { margin: 0; font-size: 15px; color: var(--ovemo-navy); }
.ovemo-table .num { text-align: right; white-space: nowrap; }
.ovemo-table tfoot th,
.ovemo-table tfoot td { border-top: 1px solid var(--ovemo-line); border-bottom: 0; color: var(--ovemo-fg); font-size: 13px; letter-spacing: 0; text-transform: none; }
.ovemo-scroll { overflow-x: auto; }
.ovemo-wo-materials { margin: 0; padding-left: 18px; font-size: 13px; }
.ovemo-events { display: grid; gap: 6px; }
.ovemo-events ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ovemo-events li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; color: var(--ovemo-muted); }
.ovemo-events li.is-current { color: var(--ovemo-fg); font-weight: 600; }
.ovemo-events li.is-warning { color: var(--ovemo-warn); }
.ovemo-events-note { grid-column: 2; font-weight: 400; }
.ovemo-portal .hvac-signature-pad { width: 100%; max-width: 560px; height: auto; aspect-ratio: 560 / 160; border: 1px dashed var(--ovemo-line); border-radius: 8px; background: #fbfcfe; touch-action: none; cursor: crosshair; }
.ovemo-portal .hvac-signature-field { display: grid; gap: 8px; }
.ovemo-portal .hvac-signature-field p { margin: 0; }

@media (max-width: 720px) {
	.ovemo-rows-head { display: none; }
	.ovemo-row > summary { grid-auto-flow: row; grid-auto-columns: auto; gap: 2px; }
	.ovemo-row > summary > .is-desk { display: none; }
	.ovemo-phone-only { display: block; }
	.ovemo-tab { padding: 8px 10px; font-size: 13px; }
	.ovemo-two { grid-template-columns: 1fr; }
	.ovemo-info { grid-template-columns: 1fr; gap: 2px; }
	.ovemo-info dd + dt { margin-top: 8px; }
	.ovemo-table { display: block; overflow-x: auto; }
	/* A table of rows on a phone - one row under the other, like .ovemo-row above (no sliding sideways). */
	.ovemo-table.is-rows { overflow-x: visible; }
	.ovemo-table.is-rows thead { display: none; }
	.ovemo-table.is-rows tbody { display: block; }
	.ovemo-table.is-rows tr { display: grid; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--ovemo-line); }
	.ovemo-table.is-rows tr:last-child { border-bottom: 0; }
	.ovemo-table.is-rows td { display: block; padding: 0; border-bottom: 0; min-width: 0; overflow-wrap: anywhere; }
	.ovemo-table.is-rows td:first-child { font-weight: 600; }
}
