/* ---------------------------------------------------------------------------
 * Intake v2 -- the shared look of the redesigned intake page (Features:IntakeV2).
 *
 * Everything is prefixed iv2- and is unused until a page opts in, so loading this file changes
 * nothing for a tenant with the switch off. Tenant fonts and colours still come from
 * --font-body, --font-scale and --primary-color.
 *
 * Contrast (WCAG 2.1 AA): text 4.5:1 or better on white; field borders 3:1 (1.4.11) --
 * read-only fields too, because they still take focus.
 * ------------------------------------------------------------------------- */
:root {
    --iv2-ink: #1F3443;
    --iv2-ink-2: #3c4655;
    --iv2-muted: #5A6B7C;
    --iv2-line: #DCE5EE;
    --iv2-field-border: #7C8A99;          /* 3.4:1 */
    --iv2-field-border-hover: #4F6175;
    --iv2-readonly-border: #82909F;       /* 3.06:1 */
    --iv2-readonly-fill: #F6F8FA;
    --iv2-fill: #EEF3F8;
    --iv2-primary: var(--primary-color, #1B4F89);
    --iv2-focus-ring: 0 0 0 3px rgba(27, 79, 137, 0.35);
    --iv2-warn: #b45309;
    --iv2-warn-ink: #8a3f06;
    --iv2-warn-soft: #fff4e5;
    --iv2-warn-line: #e6a85c;
    --iv2-ok: #1f7a3f;
    --iv2-ok-soft: #f0faf3;
    --iv2-danger: #b42318;
    --iv2-danger-line: #f0b8b2;
    --iv2-danger-soft: #fdecea;
    --iv2-info-ink: #1747c0;
    --iv2-info-soft: #e8f0fe;
}

/* Card ------------------------------------------------------------------- */
.iv2-card {
    background: #fff;
    border: 1px solid var(--iv2-line);
    border-radius: 12px;
    color: var(--iv2-ink);
    font-family: var(--font-body, Arial, Helvetica, sans-serif);
}

/* Field: label above, outlined input, helper and error under it ----------- */
.iv2-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.iv2-label {
    font-size: calc(13px * var(--font-scale, 1));
    font-weight: 600;
    color: var(--iv2-ink-2);
}

.iv2-required {
    color: var(--iv2-danger);
    margin-left: 2px;
}

.iv2-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--iv2-field-border);
    border-radius: 8px;
    background: #fff;
    color: var(--iv2-ink);
    font: inherit;
    font-size: calc(15px * var(--font-scale, 1));
}

.iv2-input:hover:not([readonly]):not(:disabled) {
    border-color: var(--iv2-field-border-hover);
}

.iv2-input:focus-visible {
    outline: 2px solid transparent;   /* keeps a ring in forced-colors mode */
    border-color: var(--iv2-primary);
    box-shadow: var(--iv2-focus-ring);
}

.iv2-input[readonly],
.iv2-input.is-readonly {
    border-color: var(--iv2-readonly-border);
    background: var(--iv2-readonly-fill);
    color: var(--iv2-ink);              /* read-only, not greyed: it must stay readable */
}

.iv2-input[aria-invalid="true"] {
    border: 2px solid var(--iv2-danger);
}

.iv2-help,
.iv2-error {
    margin: 0;
    font-size: calc(13px * var(--font-scale, 1));
}

.iv2-help { color: var(--iv2-muted); }
.iv2-error { color: var(--iv2-danger); font-weight: 600; }

/* Buttons ---------------------------------------------------------------- */
.iv2-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--iv2-field-border);
    border-radius: 8px;
    background: #fff;
    color: var(--iv2-ink);
    font: inherit;
    font-size: calc(15px * var(--font-scale, 1));
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.iv2-btn:hover { background: var(--iv2-fill); }
.iv2-btn:focus-visible { outline: 2px solid transparent; box-shadow: var(--iv2-focus-ring); }

.iv2-btn--primary {
    border-color: var(--iv2-primary);
    background: var(--iv2-primary);
    color: #fff;
}

.iv2-btn--primary:hover { filter: brightness(0.92); background: var(--iv2-primary); }

.iv2-btn--danger {
    border-color: var(--iv2-danger-line);
    color: var(--iv2-danger);
}

.iv2-btn--ghost {
    border-color: transparent;
    background: transparent;
    color: var(--iv2-ink-2);
    padding: 0 12px;
}

.iv2-btn--icon {
    width: 40px;
    padding: 0;
}

/* Disabled-with-a-reason: aria-disabled keeps it focusable so the reason can be read. */
.iv2-btn[aria-disabled="true"] {
    border-color: #e6eaf0;
    background: #e6eaf0;
    color: var(--iv2-muted);
    cursor: not-allowed;
    filter: none;
}

/* Chips: a dot AND a word -- never colour alone (1.4.1) ------------------- */
.iv2-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 13px;
    font-size: calc(13px * var(--font-scale, 1));
    font-weight: 700;
    white-space: nowrap;
}

.iv2-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.iv2-chip--inprogress { background: #eef1f6; color: #33415c; }
.iv2-chip--submitted  { background: var(--iv2-info-soft); color: var(--iv2-info-ink); }
.iv2-chip--revision   { background: var(--iv2-warn-soft); color: var(--iv2-warn-ink); }
.iv2-chip--denied     { background: var(--iv2-danger-soft); color: var(--iv2-danger); }
.iv2-chip--accepted,
.iv2-chip--ok         { background: #e9f6ee; color: var(--iv2-ok); }

/* Touch targets on small screens (2.5.5 is AAA; 44px is the portal's own floor). */
@media (max-width: 767.98px) {
    .iv2-input { min-height: 44px; }
    .iv2-btn { min-height: 44px; }
    .iv2-btn--icon { width: 44px; }
}

/* Header (piece 1) ------------------------------------------------------- */
.iv2-btn--link {
    min-height: 32px;
    padding: 0 8px;
    border-color: transparent;
    background: transparent;
    color: #0B5CAD;
    text-decoration: underline;
    white-space: nowrap;
}

.iv2-hdr { margin: 4px 0 16px; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06); }

.iv2-hdr-top {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 18px;
}

.iv2-hdr-main { flex: 1 1 320px; min-width: 0; }

.iv2-eyebrow {
    margin: 0 0 4px;
    font-size: calc(13px * var(--font-scale, 1));
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--iv2-muted);
}

.iv2-title {
    margin: 0 0 12px;
    font-family: var(--font-heading, var(--font-body, Arial, Helvetica, sans-serif));
    font-size: calc(26px * var(--font-scale, 1));
    line-height: 1.25;
    font-weight: 700;
    color: var(--iv2-ink);
    overflow-wrap: anywhere;
}

.iv2-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.iv2-meta > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.iv2-meta dt { font-size: calc(14px * var(--font-scale, 1)); font-weight: 400; color: var(--iv2-muted); }
.iv2-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Timeline: a row of dots on a line; each event is a label, a date and a time. */
.iv2-tl-wrap { flex: none; max-width: 100%; overflow-x: auto; padding: 4px 6px 6px; }
.iv2-tl { display: flex; margin: 0; padding: 0; list-style: none; }
.iv2-tl-item { position: relative; flex: 0 0 112px; text-align: center; }
.iv2-tl-item + .iv2-tl-item::before { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: #8794a3; }
.iv2-tl-dot {
    position: relative;
    z-index: 1;
    display: block;
    width: 10px;
    height: 10px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--iv2-primary);
    box-shadow: 0 0 0 2px #fff;
}
.iv2-tl-item--revision .iv2-tl-dot { background: var(--iv2-warn); }
.iv2-tl-item--denied .iv2-tl-dot { background: var(--iv2-danger); }
.iv2-tl-item--accepted .iv2-tl-dot { background: var(--iv2-ok); }
.iv2-tl-item--current .iv2-tl-dot { width: 12px; height: 12px; margin-top: -1px; box-shadow: 0 0 0 2px #fff, 0 0 0 5px #d6e2fd; }
.iv2-tl-item--revision.iv2-tl-item--current .iv2-tl-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #fde7cc; }
.iv2-tl-item--denied.iv2-tl-item--current .iv2-tl-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #f7cfca; }
.iv2-tl-item--accepted.iv2-tl-item--current .iv2-tl-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #c9ead4; }
.iv2-tl-item--more .iv2-tl-dot,
.iv2-tl-item--draft .iv2-tl-dot { background: #fff; border: 2px solid var(--iv2-field-border); width: 10px; height: 10px; }
.iv2-tl-item--draft::before { background: repeating-linear-gradient(90deg, #8794a3 0 4px, transparent 4px 8px) !important; }
.iv2-tl p { margin: 0; font-size: calc(13px * var(--font-scale, 1)); line-height: 16px; }
.iv2-tl-label { margin-top: 6px !important; font-weight: 700; color: var(--iv2-ink); }
.iv2-tl-item--revision .iv2-tl-label { color: var(--iv2-warn-ink); }
.iv2-tl-item--draft .iv2-tl-label { color: var(--iv2-ink-2); font-weight: 600; }
.iv2-tl-date { color: var(--iv2-ink-2); }
.iv2-tl-time { color: var(--iv2-muted); font-size: calc(12px * var(--font-scale, 1)) !important; }
.iv2-tl-more {
    min-height: 24px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 700;
    color: #0B5CAD;
    text-decoration: underline;
    cursor: pointer;
}
.iv2-tl-more:focus-visible { outline: 2px solid transparent; box-shadow: var(--iv2-focus-ring); border-radius: 4px; }

/* Action bar */
.iv2-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-top: 1px solid var(--iv2-line);
    background: #fbfcfd;
    border-radius: 0 0 12px 12px;
}
.iv2-decide, .iv2-util { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.iv2-hint { font-size: calc(14px * var(--font-scale, 1)); font-weight: 600; color: var(--iv2-warn-ink); }
.iv2-vr { width: 1px; height: 24px; background: var(--iv2-line); }
.iv2-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Required items: fold down under the action bar from "Show" beside the count. */
.iv2-req { padding: 4px 24px 16px; border-top: 1px dashed var(--iv2-warn-line); background: var(--iv2-warn-soft); }
.iv2-req[hidden] { display: none; }
.iv2-req:not([hidden]) { animation: iv2-fold 0.18s ease-out; transform-origin: top; }
@keyframes iv2-fold { from { opacity: 0; transform: scaleY(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .iv2-req:not([hidden]) { animation: none; } }
.iv2-req:focus-visible { outline: 3px solid #1B4F89; outline-offset: -3px; }
.iv2-bar:has(+ .iv2-req:not([hidden])) { border-radius: 0; }
.iv2-req-toggle { min-height: 36px; padding: 0 6px; font-weight: 700; }
/* Both labels are rendered; aria-expanded picks one. The width is the longer label's, so the count and
   toggle do not jump to a new line when "Show" becomes "Show less" on a phone. */
.iv2-req-toggle { display: inline-grid; justify-items: start; }
/* Staff "Comments": a bordered button with a count, not the underlined "Show" link. Its labels are not in
   .iv2-req-more/.iv2-req-less, so it lays out as a row. Defined after .iv2-req-toggle so it wins. */
.iv2-cmt-toggle { display: inline-flex; min-height: 40px; padding: 0 12px; font-weight: 600; text-decoration: none; }
.iv2-cmt-count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--iv2-warn-soft);
    color: var(--iv2-warn-ink);              /* 7.5:1 on the soft fill */
    box-shadow: inset 0 0 0 1px var(--iv2-warn-line);
    font-size: calc(13px * var(--font-scale, 1));
    font-weight: 700;
    line-height: 1;
}
.iv2-cmt-caret { flex: none; transition: transform 0.18s ease-out; }
.iv2-cmt-toggle[aria-expanded="true"] .iv2-cmt-caret { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .iv2-cmt-caret { transition: none; } }
.iv2-req-more, .iv2-req-less { grid-area: 1 / 1; }
.iv2-req-toggle[aria-expanded="true"] .iv2-req-more, .iv2-req-toggle[aria-expanded="false"] .iv2-req-less { visibility: hidden; }
.iv2-req-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px; margin-top: 10px; }
.iv2-req-groups h3 { margin: 0 0 4px; font-size: calc(12px * var(--font-scale, 1)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--iv2-ink-2); }
.iv2-req-groups ul { list-style: none; margin: 0; padding: 0; }
.iv2-req-groups li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink); }

/* Help dialog: a native <dialog>; a full-screen sheet on a phone. */
dialog.iv2-dlg {
    width: min(760px, 94vw);
    max-height: 90vh;
    padding: 0;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(16, 24, 40, 0.28);
    color: var(--iv2-ink);
    font-family: var(--font-body, Arial, Helvetica, sans-serif);
    overflow: hidden;
}
dialog.iv2-dlg::backdrop { background: rgba(16, 24, 40, 0.45); }
.iv2-dlg-in { display: flex; flex-direction: column; max-height: 90vh; }
.iv2-dlg-h { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px 8px; }
.iv2-dlg-h h2 { margin: 0 0 4px; font-size: calc(20px * var(--font-scale, 1)); font-family: var(--font-heading, var(--font-body, Arial, Helvetica, sans-serif)); }
.iv2-dlg-h p { margin: 0; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-muted); }
.iv2-dlg-b { padding: 4px 24px 12px; overflow: auto; }
.iv2-dlg-f { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--iv2-line); background: #fbfcfd; }
.iv2-help-body { font-size: calc(15px * var(--font-scale, 1)); line-height: 1.6; }
.iv2-help-body ol, .iv2-help-body ul { padding-left: 22px; }
.iv2-help-body a { color: #0B5CAD; text-decoration: underline; }
.iv2-help-body:focus-visible { outline: 3px solid #1B4F89; outline-offset: -3px; }

@media (max-width: 767.98px) {
    .iv2-hdr-top { padding: 16px; }
    .iv2-bar { padding: 12px 16px; }
    .iv2-title { font-size: calc(21px * var(--font-scale, 1)); }
    .iv2-util { width: 100%; justify-content: space-between; }
    .iv2-btn--link, .iv2-tl-more { min-height: 44px; }
    .iv2-tl-more { min-width: 44px; }
    .iv2-req-toggle { min-height: 44px; }
    dialog.iv2-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
    .iv2-dlg-in { height: 100dvh; max-height: 100dvh; }
    .iv2-dlg-b { flex: 1 1 auto; }
}

/* ---------------------------------------------------------------------------
 * Piece 2a: General Information and Details fields.
 * ------------------------------------------------------------------------- */

/* A responsive grid, capped at three columns: each track is at least 240px and at least a third of
   the row less the gaps, so a wide panel stops at three and a narrow one drops to two, then one. */
.iv2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(max(240px, calc((100% - 40px) / 3)), 1fr));
    gap: 12px 20px;
}
.iv2-grid > .iv2-span { grid-column: 1 / -1; }

/* A field cell: label row (label left, deny control top-right), the input, then help and error. */
.iv2-cell {
    position: relative;
    min-width: 0;
    padding: 8px 10px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background-color 0.12s ease;
}
.iv2-cell:not(.is-readonly):hover { background: #F7FAFC; }
.iv2-field-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 24px; }
.iv2-field-top .iv2-label { margin: 0; }
.iv2-deny-slot { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-top: -4px; }
.iv2-deny-slot:empty { display: none; }
.iv2-deny-slot img { cursor: pointer; }

/* Syncfusion inputs in a v2 cell take the shared outlined look. The Syncfusion disabled state is
   not used for display (the fields render readonly); a control the page still disables gets the
   read-only look, never the greyed one. */
.iv2-cell .e-input-group,
.iv2-cell .e-input-group.e-control-wrapper {
    min-height: 38px;
    margin: 0;
    border: 1px solid var(--iv2-field-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}
.iv2-cell .e-input-group:not(.e-disabled):not(.e-read-only):hover { border-color: var(--iv2-field-border-hover); }
.iv2-cell .e-input-group:focus-within,
.iv2-cell .e-input-group.e-input-focus {
    border-color: var(--iv2-primary);
    box-shadow: var(--iv2-focus-ring);
}
.iv2-cell .e-input-group input.e-input,
.iv2-cell .e-input-group textarea.e-input,
.iv2-cell .e-input-group.e-control-wrapper input.e-input {
    min-height: 36px;
    padding: 6px 12px;
    color: var(--iv2-ink);
    font-family: var(--font-body, Arial, Helvetica, sans-serif);
    font-size: calc(15px * var(--font-scale, 1));
}
.iv2-cell .e-input-group.e-read-only,
.iv2-cell .e-input-group.e-disabled,
.iv2-cell .e-input-group.e-control-wrapper.e-disabled {
    border-color: var(--iv2-readonly-border);
    background: var(--iv2-readonly-fill);
    opacity: 1;
}
.iv2-cell .e-input-group.e-read-only input.e-input,
.iv2-cell .e-input-group.e-disabled input.e-input,
.iv2-cell .e-input-group.e-disabled .e-input {
    background: transparent;
    color: var(--iv2-ink);
    -webkit-text-fill-color: var(--iv2-ink);
    opacity: 1;
}
.iv2-cell .e-input-group.e-error { border: 2px solid var(--iv2-danger); }
.iv2-cell input[aria-invalid="true"] { border-color: var(--iv2-danger); }
.iv2-cell .d-flex { gap: 8px; align-items: center; }
.iv2-cell .e-btn.e-link { min-height: 36px; }

/* Details (PermitDatas): one card per custom form, a grid of cells in the form's component order. */
.iv2-det { padding: 16px 20px 20px; }
.iv2-det-title {
    margin: 0 0 12px;
    font-family: var(--font-heading, var(--font-body, Arial, Helvetica, sans-serif));
    font-size: calc(17px * var(--font-scale, 1));
    font-weight: 700;
    color: var(--iv2-ink);
}
.containerCol.iv2-det-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(max(240px, calc((100% - 40px) / 3)), 1fr));
    gap: 12px 20px;
}
.containerCol.iv2-det-grid > .wrapperCol-full,
.containerCol.iv2-det-grid > .iv2-span,
.containerCol.iv2-det-grid > .layout-page-header,
.containerCol.iv2-det-grid > .layout-section-header { grid-column: 1 / -1; }
/* The old wrapperCol is a bordered, shadowed box; in v2 it is a plain cell. */
.containerCol.iv2-det-grid > .iv2-cell { padding: 8px 10px 10px; border: 1px solid transparent; background: transparent; box-shadow: none; }
.containerCol.iv2-det-grid .pf-field-label {
    float: none;
    width: auto;
    margin: 0 36px 6px 0;
    color: var(--iv2-ink-2);
    font-family: var(--font-body, Arial, Helvetica, sans-serif);
    font-size: calc(13px * var(--font-scale, 1));
    font-weight: 600;
}
.containerCol.iv2-det-grid .pf-field-required { color: var(--iv2-danger); font-weight: 700; }
/* The deny icons are positioned inside the cell by the per-type markup; this anchors them to the
   cell's top-right, level with the label. */
.containerCol.iv2-det-grid .iv2-cell > .pf-field-content img[width="30"],
.containerCol.iv2-det-grid .iv2-cell > .pf-field-content span[style*="position: absolute"] { position: absolute !important; top: -30px !important; right: 0 !important; bottom: auto !important; left: auto !important; }
.containerCol.iv2-det-grid .iv2-cell > .pf-field-content span[style*="position: absolute"] img[width="30"] { position: static !important; }
.containerCol.iv2-det-grid .iv2-cell > .pf-field-content { margin-top: 0; }

@media (max-width: 767.98px) {
    .iv2-grid, .containerCol.iv2-det-grid { grid-template-columns: minmax(0, 1fr); }
    .iv2-det { padding: 12px; }
    .iv2-cell .e-input-group input.e-input { min-height: 42px; }
}

.iv2-ok-note { margin: 4px 0 0; font-size: calc(13px * var(--font-scale, 1)); font-style: italic; color: var(--iv2-ok); font-weight: 600; }

/* ---------------------------------------------------------------------------
 * Piece 2b: People and Contractors -- section header, summary rows, nested subs.
 * ------------------------------------------------------------------------- */
.iv2-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 10px; }
/* "+ Add another contractor": under the rows, quieter than the rows' own Select buttons. */
.iv2-add-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; }
.iv2-btn--dashed { border-style: dashed; }
.iv2-add-more-note { margin: 0; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-muted); }
.iv2-count { margin: 0; font-size: calc(14px * var(--font-scale, 1)); font-weight: 600; color: var(--iv2-ink-2); }
.iv2-save { display: flex; justify-content: flex-end; margin-top: 12px; }
.iv2-btn--sm { min-height: 36px; padding: 0 12px; }
.iv2-btn--sm.iv2-btn--icon { width: 36px; padding: 0; }
.iv2-btn--icon img { width: 18px; height: 18px; }

.iv2-row {
    position: relative;
    margin-bottom: 8px;
    padding: 8px 12px;
    border: 1px solid var(--iv2-line);
    border-radius: 10px;
    background: #fff;
    color: var(--iv2-ink);
    font-family: var(--font-body, Arial, Helvetica, sans-serif);
}
.iv2-row:hover { background: #FBFCFE; }
.iv2-row-sum { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.iv2-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--iv2-fill);
    color: var(--iv2-primary);
    font-size: calc(13px * var(--font-scale, 1));
    font-weight: 700;
    letter-spacing: 0.02em;
}
.iv2-avatar--sub { background: #E6F4FB; color: #0D4E6C; }
.iv2-row-main { flex: 1 1 260px; min-width: 0; }
.iv2-row-main p { margin: 0; }
.iv2-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: calc(14px * var(--font-scale, 1)); font-weight: 700; line-height: 1.3; }
.iv2-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--iv2-fill); color: var(--iv2-ink-2); font-size: calc(11px * var(--font-scale, 1)); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.iv2-tag--sub { background: #E6F4FB; color: #0D4E6C; }
.iv2-row-sub { font-size: calc(13.5px * var(--font-scale, 1)); overflow-wrap: anywhere; }
.iv2-row-sub strong { font-weight: 600; }
.iv2-dot { margin: 0 6px; color: var(--iv2-muted); }
.iv2-muted { color: var(--iv2-muted); }
.iv2-row-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); overflow-wrap: anywhere; }
.iv2-row-chip { flex: none; }
.iv2-row-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; }
.iv2-row-act img { cursor: pointer; }
.iv2-row-body { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--iv2-line); }
.iv2-row-body .creation-item-fields { margin: 0 0 8px; }
.iv2-row-bodyact { display: flex; justify-content: flex-end; margin-top: 12px; }

/* Nested subcontractors: indented under their lead with a hairline. */
.iv2-subs { margin: 4px 0 0 18px; padding-left: 16px; border-left: 1px solid var(--iv2-line); }
.iv2-subs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 6px 0 8px; }
.iv2-subhead { margin: 0; font-size: calc(12px * var(--font-scale, 1)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--iv2-ink-2); }
.iv2-row--sub::before { content: ""; position: absolute; left: -17px; top: 34px; width: 16px; border-top: 1px solid var(--iv2-line); }

/* The existing edit form, in the v2 field look and grid, inside a row body. */
.iv2-pform.person-edit-shell { padding: 0; border: 0; border-radius: 0; background: transparent; }
.iv2-pform .person-edit-title, .iv2-pform .person-edit-helptext { display: none; }
.iv2-pform .fieldLabel { padding-top: 0 !important; margin: 6px 0 6px; font-size: calc(13px * var(--font-scale, 1)); font-weight: 600; color: var(--iv2-ink-2); line-height: 1.3; }
/* Compact field rhythm (Daniel, 2026-10-21: too much white space; WCAG 2.1 AA sets no minimum gap
   between fields). The extra .person-edit-shell outranks the component's scoped .fieldLabel, whose
   padding-top/-bottom (5px, one !important) and portal.css's 25px stacked above every label. */
.iv2-pform.person-edit-shell .fieldLabel { display: block; padding: 0 !important; margin: 10px 0 4px; }
.iv2-pform.person-edit-shell .e-input-group, .iv2-pform.person-edit-shell .e-input-group.e-control-wrapper { margin-bottom: 0; }
.iv2-pform > div:not(.row):not(.iv2-pactions) { margin-bottom: 0; }
.iv2-pform .e-input-group, .iv2-pform .e-input-group.e-control-wrapper { min-height: 38px; border: 1px solid var(--iv2-field-border); border-radius: 8px; background: #fff; box-shadow: none; }
.iv2-pform .e-input-group:hover { border-color: var(--iv2-field-border-hover); }
.iv2-pform .e-input-group:focus-within { border-color: var(--iv2-primary); box-shadow: var(--iv2-focus-ring); }
.iv2-pform .e-input-group input.e-input { padding: 6px 12px; color: var(--iv2-ink); font-size: calc(15px * var(--font-scale, 1)); }
.iv2-pform .d-flex { gap: 4px 20px; }
.iv2-pactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--iv2-line); }
.iv2-pactions .iv2-pspacer { flex: 1 1 auto; }
.iv2-pform .required-field-msg, .iv2-pform div[style*="font-style: italic"] { color: var(--iv2-danger) !important; font-style: normal !important; font-weight: 600; font-size: calc(13px * var(--font-scale, 1)) !important; }

/* Copy From: a button that opens a short menu of the permit's other roles. */
.iv2-menu { position: relative; display: inline-block; }
/* Syncfusion's accordion hides overflow on every direct child of a panel, which cut the Copy From
   menu off at the bottom of its person row (seen on phones, 2026-10-22). Same selector plus a class. */
.e-accordion .e-acrdn-item .e-acrdn-panel .e-acrdn-content > .iv2-row { overflow: visible; }
/* Copy From sits at the right edge and at the foot of the person form, and the accordion panel clips
   below its last row: open upward and leftward, over the form. */
.iv2-menu-list { position: absolute; z-index: 30; left: auto; right: 0; bottom: calc(100% + 4px); min-width: 220px; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--iv2-field-border); border-radius: 8px; box-shadow: 0 6px 20px rgba(16, 24, 40, 0.18); }
.iv2-menu-backdrop { position: fixed; inset: 0; z-index: 29; }
.iv2-menu-item { display: block; width: 100%; min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: none; text-align: left; font: inherit; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink); cursor: pointer; }
.iv2-menu-item:hover, .iv2-menu-item:focus-visible { background: var(--iv2-fill); outline: 2px solid transparent; box-shadow: inset 0 0 0 2px var(--iv2-primary); }
.iv2-menu-empty { padding: 8px 12px; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); }

/* Combobox + listbox (Copy from Org Member). */
.iv2-combo { margin-top: 12px; padding: 12px; max-width: 560px; border: 1px solid #b9c7da; border-radius: 10px; background: #F7FAFD; }
.iv2-combo-list--dlg { max-height: min(50vh, 420px) !important; }
.iv2-combo-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 220px; overflow: auto; border: 1px solid var(--iv2-field-border); border-radius: 8px; background: #fff; }
.iv2-combo-opt { display: grid; gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--iv2-line); cursor: pointer; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink); }
.iv2-combo-opt:last-child { border-bottom: 0; }
.iv2-combo-opt span { font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); }
.iv2-combo-opt[aria-selected="true"], .iv2-combo-opt:hover { background: #E8F0FC; box-shadow: inset 3px 0 0 var(--iv2-primary); }
.iv2-combo-note { padding: 12px; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); }

/* Modal dialogs for the Add person and contractor flows (a native <dialog>; the shell is .iv2-dlg). */
dialog.iv2-dlg--wide { width: min(820px, 94vw); }
.iv2-dlg-b .iv2-field-top { min-height: 0; }
.iv2-dlg-b .iv2-cell { padding-left: 0; padding-right: 0; }
.iv2-dlg-b .iv2-cell:hover { background: transparent; }
select.iv2-input { appearance: none; -webkit-appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%235A6B7C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 12px center / 12px 8px; }
.iv2-form-intro { margin: 0 0 12px; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-muted); }
.iv2-dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.iv2-dlg-b .iv2-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.iv2-dlg-b .iv2-grid2 > .iv2-full { grid-column: 1 / -1; }
.iv2-dlg-b .e-input-group, .iv2-dlg-b .e-input-group.e-control-wrapper { min-height: 38px; border: 1px solid var(--iv2-field-border); border-radius: 8px; background: #fff; box-shadow: none; }
.iv2-dlg-b .e-input-group:focus-within { border-color: var(--iv2-primary); box-shadow: var(--iv2-focus-ring); }
.iv2-dlg-b .e-input-group input.e-input { padding: 6px 12px; color: var(--iv2-ink); font-size: calc(15px * var(--font-scale, 1)); }

/* Contractor picker: search, type chips, a radio group of cards. */
.iv2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.iv2-chip-toggle { min-height: 36px; padding: 0 14px; border: 1px solid var(--iv2-field-border); border-radius: 999px; background: #fff; color: var(--iv2-ink); font: inherit; font-size: calc(13px * var(--font-scale, 1)); font-weight: 600; cursor: pointer; }
.iv2-chip-toggle:hover { border-color: var(--iv2-field-border-hover); }
.iv2-chip-toggle[aria-pressed="true"] { background: #1B4F89; border-color: #1B4F89; color: #fff; }
.iv2-chip-toggle:focus-visible { outline: 3px solid #1B4F89; outline-offset: 2px; }
.iv2-opts { display: flex; flex-direction: column; gap: 8px; max-height: min(46vh, 380px); overflow: auto; padding: 2px; margin: 0; border: 0; }
.iv2-opts legend { padding: 0; }
.iv2-opt { position: relative; display: grid; gap: 4px; margin: 0; padding: 10px 14px 10px 44px; border: 1px solid #A3B1BF; border-radius: 10px; background: #fff; cursor: pointer; }
.iv2-opt::before { content: ""; position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; border: 2px solid var(--iv2-field-border); border-radius: 50%; background: #fff; }
.iv2-opt:hover { border-color: var(--iv2-field-border-hover); background: #F7FAFC; }
.iv2-opt.is-sel { border-color: #1B4F89; background: #F3F7FC; box-shadow: 0 0 0 1px #1B4F89; }
.iv2-opt.is-sel::before { border-color: #1B4F89; background: radial-gradient(circle, #1B4F89 0 4px, #fff 5px); }
.iv2-opt:focus-within { outline: 3px solid #1B4F89; outline-offset: 2px; }
.iv2-opt-in { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.iv2-opt-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.iv2-opt-name { font-weight: 700; font-size: calc(15px * var(--font-scale, 1)); color: var(--iv2-ink); }
.iv2-opt-type { padding: 1px 8px; border-radius: 999px; background: var(--iv2-fill); color: var(--iv2-muted); font-size: calc(12px * var(--font-scale, 1)); font-weight: 700; }
.iv2-opt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); }
.iv2-empty { padding: 20px 12px; text-align: center; border: 1px dashed #A3B1BF; border-radius: 10px; color: var(--iv2-ink); }
.iv2-empty p { margin: 0 0 8px; }
.iv2-pick-foot { margin: 8px 0 0; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); }
.iv2-pick-sum { padding: 8px 24px; border-top: 1px solid var(--iv2-line); background: #F7FAFD; font-size: calc(14px * var(--font-scale, 1)); font-weight: 600; }
.iv2-pick-sum p { margin: 0; }
.iv2-dlg-f .iv2-reason { margin: 0 auto 0 0; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-ink-2); }

@media (max-width: 767.98px) {
    .iv2-row-sum { flex-wrap: wrap; align-items: flex-start; }
    .iv2-row-main { flex: 1 1 calc(100% - 60px); }
    .iv2-row-act { flex: 1 1 100%; margin-left: 0; justify-content: flex-start; padding-left: 48px; }
    .iv2-row-meta { flex-direction: column; }
    .iv2-subs { margin-left: 6px; padding-left: 10px; }
    .iv2-row--sub::before { left: -11px; width: 10px; }
    .iv2-btn--sm { min-height: 44px; }
    .iv2-btn--sm.iv2-btn--icon { width: 44px; }
    .iv2-chip-toggle { min-height: 44px; }
    .iv2-menu-item, .iv2-combo-opt { min-height: 44px; }
    .iv2-opts { max-height: none; overflow: visible; }
    .iv2-dlg-b .iv2-grid2 { grid-template-columns: minmax(0, 1fr); }
    .iv2-pactions .iv2-btn { flex: 1 1 100%; }
    dialog.iv2-dlg--wide { width: 100vw; }
    .iv2-pick-sum { padding: 8px 16px; }
}

/* ---------------------------------------------------------------------------
 * Piece 2c: Case Licenses (inline picker) and the staff attachment tools.
 * ------------------------------------------------------------------------- */
.iv2-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; margin: 0 0 12px; padding: 12px; border: 1px solid #b9c7da; border-radius: 10px; background: #F7FAFD; }
.iv2-picker-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.iv2-picker-act .iv2-reason { font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-ink-2); }
.iv2-att-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
@media (max-width: 767.98px) { .iv2-att-tools .iv2-btn { flex: 1 1 100%; } }

/* Deny / restore / comments: a real button around today's tenant image (v2 only). */
.iv2-deny-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.iv2-deny-btn:hover { background: var(--iv2-fill); }
.iv2-deny-btn:focus-visible { outline: 2px solid transparent; box-shadow: var(--iv2-focus-ring); }
.iv2-deny-btn img { display: block; }

/* Timeline on phones: stacked vertically, so there is no sideways scroller to reach by keyboard */
@media (max-width: 767.98px) {
    .iv2-tl-wrap { overflow-x: visible; padding: 4px 0 6px; }
    .iv2-tl { flex-direction: column; }
    .iv2-tl-item { flex: none; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; text-align: left; padding-bottom: 14px; }
    .iv2-tl-item + .iv2-tl-item::before { display: none !important; }
    .iv2-tl-item:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: -2px; width: 2px; background: #8794a3; }
    .iv2-tl-item .iv2-tl-dot { grid-column: 1; grid-row: 1 / span 4; margin: 4px 0 0 4px; }
    .iv2-tl-item > p { grid-column: 2; }
    .iv2-tl-item .iv2-tl-label { margin-top: 0 !important; }
}

/* 320px: nothing may need sideways scrolling, so buttons in dialogs and toolbars may wrap their text
   and a dialog footer stacks its buttons full width */
@media (max-width: 479.98px) {
    dialog.iv2-dlg .iv2-btn, .iv2-att-tools .iv2-btn, .iv2-sec-head .iv2-btn, .iv2-add-more .iv2-btn, .iv2-pactions .iv2-btn, .iv2-picker-act .iv2-btn, .iv2-dlg-actions .iv2-btn { white-space: normal; height: auto; padding-top: 6px; padding-bottom: 6px; text-align: center; }
    .iv2-dlg-f > .iv2-btn { flex: 1 1 100%; }
    .iv2-dlg-f .iv2-reason { flex: 1 1 100%; margin: 0; }
    .iv2-dlg-h, .iv2-dlg-b, .iv2-dlg-f { padding-left: 16px; padding-right: 16px; }
    .iv2-chip { white-space: normal; }
    .iv2-menu-list { min-width: 220px; max-width: calc(100vw - 48px); }
}

/* ===============================================================
   Piece 3: auto-save status, Continue buttons
   ====================================================================== */
/* The panel's save status sits over the accordion header's right side, left of the chevron. It is a sibling of the
   accordion (not inside the header, which is a button), so Retry is a real button of its own. */
.intake-panel.iv2-sv { display: grid; }
.intake-panel.iv2-sv > .iv2-savestatus { grid-area: 1 / 1; align-self: start; justify-self: end; z-index: 2; margin: 14px 56px 0 0; max-width: 55%; min-height: 20px; text-align: right; font-size: calc(13px * var(--font-scale, 1)); line-height: 1.3; }
.intake-panel.iv2-sv > :not(.iv2-savestatus) { grid-area: 1 / 1; min-width: 0; }
.iv2-sv { font-weight: 500; color: #3C4655; }
.iv2-sv--saved { color: #1D6B3A; }
.iv2-sv--failed, .iv2-sv--permissiondenied { color: #B42318; font-weight: 600; }
.iv2-linkbtn { display: inline; min-height: 24px; margin-left: 6px; padding: 0 2px; border: 0; background: none; color: #B42318; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.iv2-linkbtn:focus-visible { outline: 3px solid #1B4F89; outline-offset: 2px; }
.iv2-savesum { min-height: 20px; padding: 0 20px 12px; font-size: calc(13px * var(--font-scale, 1)); line-height: 1.3; text-align: right; }
.iv2-sv-note { display: block; color: #B42318; font-weight: 600; }
.iv2-continue { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--iv2-line, #DCE5EE); }
/* Request Additional Attachment dialog: one reason per requested document. */
.iv2-request-row { display: grid; gap: 6px; margin: 0 0 14px; }
.iv2-request-note { width: 100%; min-height: 56px; box-sizing: border-box; padding: 8px 10px; font: inherit; color: var(--iv2-ink); border: 1px solid var(--iv2-line, #DCE5EE); border-radius: 6px; resize: vertical; }
.iv2-picker-search { width: 100%; box-sizing: border-box; min-height: 40px; margin: 4px 0 6px; padding: 8px 10px; font: inherit; color: var(--iv2-ink); border: 1px solid var(--iv2-line, #DCE5EE); border-radius: 6px; }
.iv2-picker-results { display: grid; gap: 4px; margin: 8px 0 12px; }
.iv2-picker-option { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; font-size: calc(15px * var(--font-scale, 1)); color: var(--iv2-ink); cursor: pointer; }
.iv2-picker-option:hover { background: #F4F7FA; }
.iv2-picker-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.iv2-picker-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font: inherit; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink); background: #EAF2FA; border: 1px solid #b9c7da; border-radius: 999px; cursor: pointer; }
@media (max-width: 767.98px) {
    /* Narrow: the status becomes a row above the panel header instead of floating over it. */
    .intake-panel.iv2-sv { display: block; }
    .intake-panel.iv2-sv > .iv2-savestatus { margin: 0; max-width: none; padding: 8px 16px 0; text-align: left; }
    .iv2-savesum { padding: 0 16px 12px; text-align: left; }
    .iv2-continue .iv2-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .iv2-sv { transition: none; } }

/* Staff denial (piece 4) ---------------------------------------------------
 * The deny control is a real button: the tenant's deny image plus its DenyButtonText. A denied
 * item is "Staged - not sent yet" (a warm tag, always a word as well as a colour) with its note
 * under it until Send Comments. Outlines stay at 3:1 or better: the field border #7C8A99, the
 * read-only border #82909F, the denied border #b45309 (5.0:1).
 * ------------------------------------------------------------------------- */
.iv2-deny {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;                      /* 44px targets at every width (Daniel's rule) */
    padding: 0 12px 0 8px;
    border: 1px solid var(--iv2-field-border);
    border-radius: 6px;
    background: #fff;
    color: var(--iv2-ink);
    font: inherit;
    font-size: calc(13px * var(--font-scale, 1));
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}
.iv2-deny:hover { border-color: var(--iv2-field-border-hover); background: var(--iv2-fill); }
.iv2-deny:focus-visible { outline: 2px solid transparent; box-shadow: var(--iv2-focus-ring); }
.iv2-deny[aria-expanded="true"] { border-color: var(--iv2-warn); background: var(--iv2-warn-soft); }
.iv2-deny img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.iv2-deny--compact { min-height: 44px; padding: 0 10px 0 6px; gap: 5px; font-size: calc(12.5px * var(--font-scale, 1)); }
.iv2-deny--compact img { width: 18px; height: 18px; }

.iv2-dtag {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px 0 6px;
    border: 1px solid var(--iv2-warn);
    border-radius: 999px;
    background: var(--iv2-warn-soft);
    color: var(--iv2-warn-ink);
    font: inherit;
    font-size: calc(12.5px * var(--font-scale, 1));
    font-weight: 700;
    white-space: nowrap;
}
.iv2-dtag img { width: 18px; height: 18px; object-fit: contain; }
button.iv2-dtag { min-height: 44px; cursor: pointer; }
button.iv2-dtag:hover { background: #fde8c8; }
button.iv2-dtag:focus-visible { outline: 2px solid transparent; box-shadow: var(--iv2-focus-ring); }

/* The denied item itself. */
.iv2-cell.is-denied,
.iv2-field.is-denied,
.iv2-locdeny.is-denied { background: #FFFAF0; border-color: var(--iv2-warn); }
.iv2-cell.is-denied:hover { background: #FFFAF0; }
.iv2-cell.is-denied .iv2-input,
.iv2-cell.is-denied .e-input-group { border-color: var(--iv2-warn); }

/* The note under a denied item, and the composer staff write it in. */
.iv2-composer {
    margin: 10px 0 0;
    padding: 14px;
    border: 1px solid var(--iv2-field-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
}
.iv2-composer-for { margin: 0 0 6px; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); }
.iv2-composer .iv2-label { display: block; margin: 0 0 6px; }
.iv2-composer-input { min-height: 84px; resize: vertical; line-height: 1.45; }
.iv2-composer .iv2-help { margin: 6px 0 10px; }
.iv2-composer .iv2-error { margin: 0 0 10px; }
.iv2-composer-btns { display: flex; flex-wrap: wrap; gap: 8px; }

.iv2-dnote {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin: 10px 0 0;
    padding: 10px 12px;
    border: 1px solid var(--iv2-warn-line);
    border-left: 4px solid var(--iv2-warn);
    border-radius: 8px;
    background: #fff;
}
.iv2-dnote-body { flex: 1 1 240px; min-width: 0; }
.iv2-dnote-who { margin: 0 0 3px; font-size: calc(12.5px * var(--font-scale, 1)); font-weight: 700; color: var(--iv2-warn-ink); }
.iv2-dnote-txt { margin: 0; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.iv2-dnote-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.iv2-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    padding: 0 8px;
    border: 0;
    border-radius: 4px;
    background: none;
    color: #0B5CAD;                       /* 6.4:1 */
    font: inherit;
    font-size: calc(13.5px * var(--font-scale, 1));
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.iv2-link img { width: 16px; height: 16px; }
.iv2-link:hover { background: var(--iv2-fill); }
.iv2-link:focus-visible { outline: 2px solid transparent; box-shadow: var(--iv2-focus-ring); }
.iv2-link--danger { color: var(--iv2-danger); }

/* The whole location as one deniable item. */
.iv2-locdeny { margin: 0 0 12px; padding: 8px 10px 10px; border: 1px solid transparent; border-radius: 8px; }
.iv2-locdeny-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.iv2-locdeny-label { margin: 0; font-weight: 600; color: var(--iv2-ink-2); overflow-wrap: anywhere; }
.iv2-locdeny-val { font-weight: 400; color: var(--iv2-ink); }

/* Details: the deny control sits at the top right of the cell's label row. */
.iv2-deny-slot--det { margin-top: 0; }
.containerCol.iv2-det-grid .iv2-cell.is-denied { background: #FFFAF0; border-color: var(--iv2-warn); }

/* In the attachment preview popup. */
.iv2-apv-deny { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.iv2-apv-deny .iv2-dnote,
.iv2-apv-deny .iv2-composer { align-self: stretch; }

/* The tray: how many items are staged, and the way to the review. */
.iv2-tray {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 900;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    width: min(720px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 12px 20px;
    border-radius: 12px;
    background: #1a2230;
    color: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.25);
    font-family: var(--font-body, Arial, Helvetica, sans-serif);
}
.iv2-tray p { margin: 0; font-size: calc(14px * var(--font-scale, 1)); }
.iv2-tray .iv2-btn { border-color: #fff; background: #fff; color: #1a2230; }
.iv2-tray .iv2-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
body:has(.iv2-tray) { padding-bottom: 96px; }

/* The Send Comments review. */
.iv2-send-sec { margin: 12px 0 8px; font-size: calc(13px * var(--font-scale, 1)); letter-spacing: 0.04em; text-transform: uppercase; color: var(--iv2-muted); }
.iv2-send-items { display: flex; flex-direction: column; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.iv2-send-items > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--iv2-line); border-radius: 8px; }
.iv2-send-item-main { flex: 1 1 260px; min-width: 0; }
.iv2-send-t { margin: 0; font-weight: 700; font-size: calc(14px * var(--font-scale, 1)); }
.iv2-send-n { margin: 2px 0 0; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.iv2-send-item-main .iv2-composer-input { margin-top: 4px; }
.iv2-send-item-main .iv2-composer-btns { margin-top: 8px; }
.iv2-send-item-act { display: flex; gap: 4px; }
.iv2-send-f { justify-content: space-between; align-items: center; }
.iv2-send-f p { flex: 1 1 240px; margin: 0; font-size: calc(13.5px * var(--font-scale, 1)); color: var(--iv2-ink-2); }
.iv2-send-grp { display: flex; flex-wrap: wrap; gap: 8px; }
#iv2-send-title:focus-visible { outline: 3px solid #1B4F89; outline-offset: 3px; border-radius: 4px; }
#iv2-send-title:focus:not(:focus-visible) { outline: none; }

.iv2-send-error { margin: 8px 0; }

@media (max-width: 767.98px) {
    .iv2-tray { bottom: 8px; }
}

/* Applicant denial and round 2 (piece 5) -------------------------------------
 * The applicant in Needs Revision: a denied item is "Needs your change" (the tenant's deny image and a
 * word, never colour alone) with the reviewer's note under it; once a save resolves it, "Fixed". Items
 * nobody asked about keep the read-only look (#82909F, 3.06:1). Staff on a resubmission see "Changed"
 * and what changed. Tag and note text is 4.5:1 or better; borders that mark state are 3:1 or better.
 * ------------------------------------------------------------------------- */
.iv2-dtag--need { border-color: var(--iv2-warn); background: var(--iv2-warn-soft); color: var(--iv2-warn-ink); }
.iv2-dtag--fixed { padding-left: 10px; border-color: var(--iv2-ok); background: #e9f6ee; color: var(--iv2-ok); }   /* #1f7a3f on #e9f6ee: 5.0:1 */
.iv2-dtag--fixed svg { flex: none; }

.iv2-dnote--ok { border-color: #8fcba4; border-left-color: var(--iv2-ok); background: var(--iv2-ok-soft); }
.iv2-dnote--ok .iv2-dnote-who { color: var(--iv2-ok); }
.iv2-dnote-meta { margin: 4px 0 0; font-size: calc(12.5px * var(--font-scale, 1)); color: var(--iv2-muted); }
[data-iv2-note]:focus { outline: 3px solid #1B4F89; outline-offset: 2px; }

/* The item itself: asked about (warm) or fixed / changed (green). */
.iv2-row.is-denied,
.ia-row.is-denied { background: #FFFAF0; border-color: var(--iv2-warn); }
.iv2-row.is-denied:hover { background: #FFFAF0; }
.iv2-cell.is-fixed,
.iv2-field.is-fixed,
.iv2-locdeny.is-fixed,
.iv2-row.is-fixed,
.ia-row.is-fixed { background: var(--iv2-ok-soft); border-color: var(--iv2-ok); }   /* #1f7a3f: 5.5:1 on white */
.iv2-cell.is-fixed:hover,
.iv2-row.is-fixed:hover { background: var(--iv2-ok-soft); }
.containerCol.iv2-det-grid .iv2-cell.is-fixed { background: var(--iv2-ok-soft); border-color: var(--iv2-ok); }

/* Read-only inputs in a person's form keep the outlined read-only look too. */
.iv2-row-body .e-input-group.e-read-only,
.iv2-row-body .e-input-group.e-disabled { border-color: var(--iv2-readonly-border); background: var(--iv2-readonly-fill); opacity: 1; }

/* "Go to" lands here: a short highlight, none with reduced motion. */
@keyframes iv2-pulse { 0% { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.45); } 100% { box-shadow: 0 0 0 10px rgba(180, 83, 9, 0); } }
.iv2-pulse { animation: iv2-pulse 1.2s ease-out 2; }
@media (prefers-reduced-motion: reduce) { .iv2-pulse { animation: none; } }

/* Needs Revision checklist: each request with its note, ticked off as it is resolved. */
.iv2-req--done { border-color: #8fcba4; background: var(--iv2-ok-soft); }
.iv2-req-groups--revision { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.iv2-req-groups--revision li.iv2-req-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid var(--iv2-line);
    border-radius: 8px;
    background: #fff;
}
.iv2-req-tick { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 2px; border: 2px solid var(--iv2-warn); border-radius: 50%; }
.iv2-req-tick.is-done { border-color: var(--iv2-ok); background: var(--iv2-ok); color: #fff; }
.iv2-req-main { min-width: 0; }
.iv2-req-label { margin: 0; font-weight: 700; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink); overflow-wrap: anywhere; }
.iv2-req-state { margin-left: 6px; font-weight: 600; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-warn-ink); }
.iv2-req-item.is-done .iv2-req-state { color: var(--iv2-ok); }
.iv2-req-note { margin: 2px 0 0; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Staff, Needs Revision: the reviewer's open comments, one card each, folded down under the bar. */
.iv2-req-groups--comments { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.iv2-req-groups--comments li.iv2-cmt {
    display: grid;
    gap: 4px;
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid var(--iv2-line);
    border-left: 4px solid var(--iv2-warn);
    border-radius: 8px;
    background: #fff;
}
.iv2-cmt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.iv2-cmt-head .iv2-req-label { min-width: 0; }
.iv2-cmt-from { margin: 0; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); overflow-wrap: anywhere; }

/* Staff: what changed since the review. */
.iv2-review { margin: 0 0 16px; padding: 14px 18px; border-color: #8fcba4; background: var(--iv2-ok-soft); }
.iv2-review-title { margin: 0 0 2px; font-size: calc(16px * var(--font-scale, 1)); }
.iv2-review-title:focus-visible { outline: 3px solid #1B4F89; outline-offset: 3px; border-radius: 4px; }
.iv2-review-sub { margin: 0 0 10px; font-size: calc(14px * var(--font-scale, 1)); color: var(--iv2-ink-2); }
.iv2-review-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.iv2-review-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--iv2-line); border-radius: 8px; background: #fff; }
.iv2-review-main p { margin: 0; }
.iv2-review-what { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; font-size: calc(14px * var(--font-scale, 1)); }
.iv2-review-what small { font-weight: 400; color: var(--iv2-muted); }
.iv2-review-vals { margin-top: 2px !important; font-size: calc(14px * var(--font-scale, 1)); overflow-wrap: anywhere; }
.iv2-review-asked { margin-top: 2px !important; font-size: calc(13px * var(--font-scale, 1)); color: var(--iv2-muted); overflow-wrap: anywhere; }

@media (max-width: 767.98px) {
    .iv2-req-groups--revision, .iv2-req-groups--comments { grid-template-columns: 1fr; }
    .iv2-review-list > li { grid-template-columns: 1fr; }
}
