/*
 * Page components in the Zoho Books style: list pages, forms, buttons,
 * status badges. Plain CSS (prefix zp-) for the same reason as shell.css —
 * it must not depend on what Tailwind last compiled into app.css.
 *
 * The last section is a "theme layer": a handful of overrides that pull the
 * screens not yet redesigned towards the same look (square corners, slimmer
 * controls, lighter headings) so the app does not look half-converted while
 * the modules are done one by one.
 */

/* ============================================================== buttons */

.zp-btn {
    height: 34px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid rgb(var(--c-line-strong));
    border-radius: 4px;
    background: rgb(var(--c-surface));
    color: rgb(var(--c-ink));
    font: inherit;
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
.zp-btn:hover { background: rgb(var(--c-ground)); color: rgb(var(--c-ink)); text-decoration: none; }
.zp-btn:focus-visible { outline: 2px solid rgb(var(--c-primary) / 0.45); outline-offset: 2px; }

.zp-btn-primary { border-color: var(--sh-active, #1F6FE0); background: var(--sh-active, #1F6FE0); color: #FFFFFF; font-weight: 700; }
.zp-btn-primary:hover { background: #1A62C8; border-color: #1A62C8; color: #FFFFFF; }

.zp-btn-link { border-color: transparent; background: transparent; color: rgb(var(--c-primary)); padding: 0 8px; }
.zp-btn-link:hover { background: rgb(var(--c-primary) / 0.06); color: rgb(var(--c-primary)); }

.zp-btn-danger { color: rgb(var(--c-danger)); }
.zp-btn-danger:hover { background: rgb(var(--c-danger) / 0.06); color: rgb(var(--c-danger)); }

.zp-btn-icon { width: 34px; padding: 0; }
.zp-btn-sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 5px; }

.zp-btn[disabled], .zp-btn[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }

/* ======================================================= page title bar */

/* Full width under the top bar, like Zoho's page headers. The negative
   margins cancel the page padding of .sh-main. */
.zp-titlebar {
    margin: -24px -28px 0;
    min-height: 62px;
    box-sizing: border-box;
    padding: 12px 22px 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-surface));
}
.zp-titlebar h1 { margin: 0; font-size: 21px; font-weight: 400; letter-spacing: 0; line-height: 1.25; }
.zp-titlebar-sub { margin: 2px 0 0; font-size: 13px; color: rgb(var(--c-muted)); }
.zp-titlebar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.zp-close {
    width: 36px; height: 36px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px; color: rgb(var(--c-ink-soft));
}
.zp-close:hover { background: rgb(var(--c-ground)); color: rgb(var(--c-ink)); }

/* ============================================================ list page */

.zp-list { margin: -24px -28px -40px; }
.zp-list .zp-titlebar { margin: 0; }

.zp-view {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.zp-view select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 21px;
    font-weight: 400;
    color: rgb(var(--c-ink));
    padding: 2px 26px 2px 0;
    cursor: pointer;
}
.zp-view svg { position: absolute; right: 4px; pointer-events: none; color: rgb(var(--c-primary)); }

.zp-filter {
    height: 34px;
    width: 220px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid rgb(var(--c-line-strong));
    border-radius: 4px;
    background: rgb(var(--c-surface));
    color: rgb(var(--c-muted));
}
.zp-filter:focus-within { border-color: rgb(var(--c-primary)); }
.zp-filter input { flex-grow: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 13.5px; color: rgb(var(--c-ink)); }

.zp-summary { padding: 16px 28px 0; }

.zp-table-wrap { overflow-x: auto; }
.zp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.zp-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgb(var(--c-surface));
    padding: 10px 12px;
    border-bottom: 1px solid rgb(var(--c-line));
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgb(var(--c-muted));
    white-space: nowrap;
    text-align: left;
}
.zp-table td {
    padding: 12px 12px;
    border-bottom: 1px solid rgb(var(--c-line-faint));
    vertical-align: middle;
}
.zp-table th:first-child, .zp-table td:first-child { padding-left: 28px; }
.zp-table .zp-check-col { width: 18px; }
.zp-table th:last-child, .zp-table td:last-child { padding-right: 28px; }
.zp-table tbody tr:hover { background: rgb(var(--c-ground)); }
.zp-table tbody tr[data-nexo-row-href] { cursor: pointer; }
.zp-table .zp-end { text-align: right; }
.zp-table .zp-center { text-align: center; }
.zp-table .zp-num { font-variant-numeric: tabular-nums; }
.zp-table a.zp-link { color: rgb(var(--c-primary)); text-decoration: none; }
.zp-table a.zp-link:hover { text-decoration: underline; }
.zp-table th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.zp-table th a:hover { color: rgb(var(--c-ink)); }
.zp-table th.is-sorted { color: rgb(var(--c-ink)); }
.zp-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--sh-active, #1F6FE0); }

.zp-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: rgb(var(--c-muted));
}
.zp-badge-green { color: #15803D; }
.zp-badge-blue { color: #1F6FE0; }
.zp-badge-orange { color: #B45309; }
.zp-badge-red { color: #C4322D; }
.zp-badge-gray { color: rgb(var(--c-muted)); }
.dark .zp-badge-green { color: #5CC78C; }
.dark .zp-badge-blue { color: #66A0FF; }
.dark .zp-badge-orange { color: #F0B05A; }
.dark .zp-badge-red { color: #F88076; }

.zp-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 12px 28px 28px;
    font-size: 13.5px;
    color: rgb(var(--c-muted));
}
.zp-pager select {
    height: 30px;
    border: 1px solid rgb(var(--c-line-strong));
    border-radius: 4px;
    background: rgb(var(--c-surface));
    color: rgb(var(--c-ink));
    font: inherit;
    font-size: 13px;
    padding: 0 6px;
}
.zp-pager-nav { display: inline-flex; gap: 4px; }
.zp-pager-nav .zp-btn { height: 30px; width: 30px; padding: 0; }

.zp-empty { padding: 72px 24px; text-align: center; }
.zp-empty h2 { margin: 12px 0 6px; font-size: 17px; font-weight: 700; }
.zp-empty p { margin: 0 auto; max-width: 420px; font-size: 14px; color: rgb(var(--c-muted)); }
.zp-empty .zp-btn { margin-top: 18px; }
.zp-empty-icon { color: rgb(var(--c-line-strong)); }

/* ================================================================ forms */

.zp-form { display: flex; flex-direction: column; }

.zp-note {
    margin: 16px 0 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: 6px;
    background: rgb(var(--c-primary) / 0.07);
    font-size: 14px;
    line-height: 1.55;
}
.zp-note svg { flex-shrink: 0; margin-top: 2px; color: rgb(var(--c-primary)); }
.zp-note-warn { background: rgb(var(--c-warning) / 0.1); }
.zp-note-warn svg { color: rgb(var(--c-warning-text)); }

.zp-errors {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgb(var(--c-danger) / 0.3);
    background: rgb(var(--c-danger) / 0.05);
    color: rgb(var(--c-danger));
    font-size: 14px;
}
.zp-errors ul { margin: 0; padding-left: 18px; }
.zp-errors.validation-summary-valid { display: none; }

/* A band of fields. Tinted bands mark the identifying fields at the top. */
.zp-block {
    margin: 0 -28px;
    padding: 22px 28px;
    border-bottom: 1px solid rgb(var(--c-line));
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.zp-block-tint { background: rgb(var(--c-ground)); }
.zp-block:last-of-type,
.zp-block:has(+ .zp-actions) { border-bottom: 0; }
.zp-block-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 48px; }

.zp-h2 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.zp-h2 input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--sh-active, #1F6FE0); }

.zp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 56px; }
.zp-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Label on the left, field on the right — Zoho's form rhythm. */
.zp-row { display: flex; align-items: flex-start; gap: 16px; }
.zp-lbl {
    width: 170px;
    flex-shrink: 0;
    padding-top: 8px;
    font-size: 14px;
    color: rgb(var(--c-ink));
}
.zp-cols .zp-lbl { width: 130px; }
.zp-req { color: rgb(var(--c-danger)); }
.zp-req::after { content: '*'; }
.zp-lbl-dashed { border-bottom: 1px dashed currentColor; }
.zp-field { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.zp-field-inline { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 20px; min-height: 36px; }

.zp-input,
.zp-select,
.zp-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgb(var(--c-line-strong));
    border-radius: 4px;
    background: rgb(var(--c-surface));
    color: rgb(var(--c-ink));
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
}
.zp-input, .zp-select { height: 36px; padding: 0 10px; }
.zp-select { padding-right: 28px; }
.zp-textarea { min-height: 64px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.zp-input:focus, .zp-select:focus, .zp-textarea:focus { border-color: rgb(var(--c-primary)); box-shadow: 0 0 0 3px rgb(var(--c-primary) / 0.12); }
.zp-input.input-validation-error, .zp-select.input-validation-error { border-color: rgb(var(--c-danger)); }
.zp-input[readonly], .zp-static { background: rgb(var(--c-ground)); color: rgb(var(--c-ink-soft)); }
.zp-static { height: 36px; box-sizing: border-box; display: flex; align-items: center; padding: 0 10px; border: 1px solid rgb(var(--c-line)); border-radius: 4px; font-size: 14px; }
.zp-num { text-align: right; font-variant-numeric: tabular-nums; }

.zp-w-sm { max-width: 200px; }
.zp-w-md { max-width: 320px; }
.zp-w-lg { max-width: 520px; }

/* A field with a unit in front: "AED | 120.00" */
.zp-affix { display: flex; }
.zp-affix > span {
    height: 36px; box-sizing: border-box; flex-shrink: 0;
    display: flex; align-items: center; padding: 0 12px;
    border: 1px solid rgb(var(--c-line-strong)); border-right: 0; border-radius: 4px 0 0 4px;
    background: rgb(var(--c-ground)); font-size: 13.5px; color: rgb(var(--c-ink-soft));
}
.zp-affix > .zp-input { border-radius: 0 4px 4px 0; }

.zp-help { font-size: 12.5px; color: rgb(var(--c-muted)); line-height: 1.5; }
.zp-err { font-size: 12.5px; color: rgb(var(--c-danger)); }
.zp-err:empty { display: none; }

.zp-check { display: inline-flex; align-items: flex-start; gap: 9px; font-size: 14px; cursor: pointer; }
.zp-check input { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--sh-active, #1F6FE0); }
.zp-check small { display: block; margin-top: 2px; font-size: 12.5px; color: rgb(var(--c-muted)); line-height: 1.5; }

/* A choice that reloads the page (e.g. adjustment mode), drawn as a radio. */
.zp-radio-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgb(var(--c-ink)); text-decoration: none; }
.zp-radio-link:hover { color: rgb(var(--c-primary)); text-decoration: none; }
.zp-radio {
    width: 16px; height: 16px; box-sizing: border-box; flex-shrink: 0;
    border: 1.5px solid rgb(var(--c-line-strong)); border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.zp-radio.is-on { border-color: var(--sh-active, #1F6FE0); }
.zp-radio.is-on::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sh-active, #1F6FE0); }

/* The drop area for an image, shown as Zoho does — upload arrives later. */
.zp-image {
    width: 220px; height: 190px; box-sizing: border-box;
    border: 1px dashed rgb(var(--c-line-strong)); border-radius: 6px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    text-align: center; font-size: 13.5px; color: rgb(var(--c-muted));
}

/* Save / Cancel pinned to the bottom of the page while the form scrolls. */
.zp-actions {
    position: sticky;
    bottom: -40px;
    z-index: 5;
    margin: 24px -28px -40px;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-surface));
    box-shadow: 0 -4px 12px rgba(15, 20, 35, 0.04);
}
.zp-actions-spacer { flex-grow: 1; }
/* Only the last thing on the page reaches down to the page edge. */
.zp-form:not(:last-child) .zp-actions { margin-bottom: 0; bottom: 0; }

/* A panel below a form (stock, history). */
.zp-panel { margin-top: 28px; }
.zp-panel h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }

/* Tables of editable lines inside a form (price list items, adjustments). */
.zp-lines { margin: 0 -28px; }
.zp-lines .zp-table td { padding-top: 8px; padding-bottom: 8px; }
.zp-lines-foot { padding: 10px 28px 4px; }

/* =========================================================== small screens */

@media (max-width: 1023px) {
    .zp-titlebar { margin: -18px -16px 0; padding: 12px 12px 12px 16px; }
    .zp-list { margin: -18px -16px -32px; }
    .zp-list .zp-titlebar { margin: 0; }
    .zp-block, .zp-lines { margin: 0 -16px; }
    .zp-block { padding: 18px 16px; }
    .zp-actions { margin: 20px -16px -32px; padding: 12px 16px; bottom: -32px; }
    .zp-table th:first-child, .zp-table td:first-child { padding-left: 16px; }
    .zp-table th:last-child, .zp-table td:last-child { padding-right: 16px; }
    .zp-pager { padding: 12px 16px 24px; }
    .zp-cols, .zp-block-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .zp-row { flex-direction: column; align-items: stretch; gap: 6px; }
    .zp-w-sm, .zp-w-md, .zp-w-lg { max-width: none; }
    .zp-lbl, .zp-cols .zp-lbl { width: auto; padding-top: 0; }
    .zp-filter { width: 150px; }
    .zp-image { width: 100%; }
}

/* ============================================================ theme layer */

/* Screens not yet redesigned keep their markup; these rules bring their
   corners, control heights and headings in line with the new look. */
.sh-main .rounded-\[11px\],
.sh-main .rounded-\[10px\] { border-radius: 4px; }
.sh-main .rounded-2xl { border-radius: 8px; }
.sh-main .rounded-xl { border-radius: 6px; }

.sh-main :is(input, select).h-11,
.sh-main :is(input, select).h-12 { height: 36px; }
.sh-main :is(a, button).h-\[42px\],
.sh-main :is(a, button).h-\[38px\] { height: 34px; }
.sh-main :is(a, button).leading-\[42px\] { line-height: 34px; }

.sh-main h1.font-display { font-size: 21px; font-weight: 400; letter-spacing: 0; }
.sh-main h2.font-display { font-weight: 700; letter-spacing: 0; }

/* The hidden attribute always wins: scripts toggle whole rows with it, and a
   component's own display value must never make a hidden row reappear. */
.sh-main [hidden] { display: none !important; }

/* ===================================================== line-item table */

/* The item table on invoices, bills, quotes and the rest, as Zoho draws it:
   a bordered grid whose cells turn into inputs as you click them.
   No overflow on wide screens: a scroll box would also clip the item
   dropdown that opens below each row. */
.zp-itemtable {
    border: 1px solid rgb(var(--c-line));
    border-radius: 6px;
    background: rgb(var(--c-surface));
}
/* Narrow screens scroll the grid sideways instead of crushing it. */
@media (max-width: 1100px) {
    .zp-itemtable { overflow-x: auto; }
    .zp-itemtable table { min-width: var(--it-min, 760px); }
}

.zp-itemtable table { width: 100%; border-collapse: collapse; }
.zp-itemtable th {
    padding: 9px 10px;
    background: rgb(var(--c-ground));
    border-bottom: 1px solid rgb(var(--c-line));
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgb(var(--c-muted));
    text-align: left;
    white-space: nowrap;
}
.zp-itemtable th:first-child { border-top-left-radius: 6px; }
.zp-itemtable th:last-child { border-top-right-radius: 6px; }
.zp-itemtable th + th, .zp-itemtable td + td { border-left: 1px solid rgb(var(--c-line-faint)); }
.zp-itemtable td { padding: 6px 8px; border-bottom: 1px solid rgb(var(--c-line-faint)); vertical-align: top; }
.zp-itemtable tbody tr:last-child td { border-bottom: 0; }
.zp-itemtable .zp-end { text-align: right; }
.zp-itemtable .zp-center { text-align: center; }

.zp-it-item { position: relative; min-width: 260px; }

.zp-cell-input,
.zp-cell-select {
    width: 100%;
    box-sizing: border-box;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: rgb(var(--c-ink));
    font: inherit;
    font-size: 14px;
    outline: none;
}
.zp-cell-input { padding: 0 8px; }
.zp-cell-input:hover { border-color: rgb(var(--c-line)); }
.zp-cell-input:focus { border-color: rgb(var(--c-primary)); background: rgb(var(--c-surface)); box-shadow: 0 0 0 3px rgb(var(--c-primary) / 0.12); }
.zp-cell-select { padding: 0 24px 0 8px; border-color: rgb(var(--c-line)); background: rgb(var(--c-surface)); }
.zp-cell-select:focus { border-color: rgb(var(--c-primary)); }
.zp-cell-desc { height: 30px; margin-top: 2px; font-size: 13px; color: rgb(var(--c-ink-soft)); }
.zp-cell-discount { display: flex; gap: 4px; }
.zp-cell-unit { width: auto; flex-shrink: 0; padding: 0 20px 0 6px; font-size: 12.5px; }

.zp-it-amount { padding-top: 14px !important; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zp-it-check { width: 16px; height: 16px; margin: 9px 0 0; accent-color: var(--sh-active, #1F6FE0); }
.zp-it-remove { width: 36px; text-align: center; }
.zp-it-x {
    width: 28px; height: 28px; margin-top: 3px;
    border: 0; border-radius: 4px; background: transparent;
    color: rgb(var(--c-muted)); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.zp-it-x:hover { background: rgb(var(--c-danger) / 0.08); color: rgb(var(--c-danger)); }

.zp-itemtable-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border-top: 1px solid rgb(var(--c-line));
    font-size: 14px;
}
.zp-itemtable-foot .zp-btn { color: rgb(var(--c-primary)); border-color: rgb(var(--c-primary) / 0.35); background: rgb(var(--c-primary) / 0.04); }
.zp-itemtable-foot .zp-btn:hover { background: rgb(var(--c-primary) / 0.09); }

.zp-it-badge {
    display: inline-block; margin-top: 4px; padding: 2px 6px; border-radius: 4px;
    background: rgb(var(--c-primary) / 0.1); color: rgb(var(--c-primary));
    font-size: 11.5px; font-weight: 700;
}

/* The totals box under the item table (Sub Total, VAT, Adjustment, Total). */
.zp-totals {
    margin-left: auto;
    width: min(440px, 100%);
    box-sizing: border-box;
    padding: 14px 18px;
    border-radius: 6px;
    background: rgb(var(--c-ground));
    font-size: 14px;
}
.zp-totals-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0; }
.zp-totals-row > :last-child { font-variant-numeric: tabular-nums; text-align: right; }
.zp-totals-row .zp-input { width: 140px; height: 32px; }
.zp-totals-grand { margin-top: 6px; padding-top: 12px; border-top: 1px solid rgb(var(--c-line)); font-size: 16px; font-weight: 700; }

/* ======================================================= lookup dropdown */

/* The panel under a customer / vendor / account lookup. */
.zp-dd-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    max-height: 290px;
    overflow-y: auto;
    border: 1px solid rgb(var(--c-line));
    border-radius: 6px;
    background: rgb(var(--c-surface));
    box-shadow: 0 12px 32px rgba(15, 20, 35, 0.16);
}

/* Inside a line-item row the options float over the rows below. */
.lookup-options > .zp-dd-list,
.lookup-options > .zp-dd-empty,
.lookup-options > .nexo-lookup-error {
    position: absolute;
    left: 0;
    top: 2px;
    z-index: 30;
    width: max(100%, 360px);
    max-height: 290px;
    overflow-y: auto;
    box-sizing: border-box;
    border: 1px solid rgb(var(--c-line));
    border-radius: 6px;
    background: rgb(var(--c-surface));
    box-shadow: 0 12px 32px rgba(15, 20, 35, 0.16);
}
.lookup-options > .nexo-lookup-error { color: #B42318; background: #FEF3F2; border-color: #FECDCA; }

.zp-dd-list { padding: 4px 0; }
.zp-dd-opt {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    color: rgb(var(--c-ink));
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.zp-dd-opt small { flex-shrink: 0; font-size: 12.5px; color: rgb(var(--c-muted)); }
.zp-dd-opt:hover,
.zp-dd-opt:focus-visible { background: var(--sh-active, #1F6FE0); color: #FFFFFF; outline: none; }
.zp-dd-opt:hover small,
.zp-dd-opt:focus-visible small { color: rgba(255, 255, 255, 0.85); }
.zp-dd-empty { padding: 12px 14px; font-size: 13.5px; color: rgb(var(--c-muted)); }

.zp-lookup { position: relative; }

/* ======================================================== allocations */

.zp-alloc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.zp-alloc-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.zp-alloc-head span { font-size: 14px; color: rgb(var(--c-muted)); }
.zp-alloc-head b { color: rgb(var(--c-ink)); font-variant-numeric: tabular-nums; }
.zp-alloc-head b.is-negative { color: rgb(var(--c-danger)); }
.zp-alloc .zp-itemtable td { padding: 10px; vertical-align: middle; }
.zp-alloc .zp-input { height: 32px; }

/* ================================================= summary band (lists) */

.zp-sumband { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.zp-sumfigs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid rgb(var(--c-line)); border-radius: 6px; overflow: hidden; }
.zp-sumfig { padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.zp-sumfig + .zp-sumfig { border-left: 1px solid rgb(var(--c-line)); }
.zp-sumfig span { font-size: 12.5px; color: rgb(var(--c-muted)); }
.zp-sumfig b { font-size: 17px; font-variant-numeric: tabular-nums; }
.zp-sumfig b.is-overdue { color: rgb(var(--c-danger)); }
.zp-sumfig small { font-size: 12px; color: rgb(var(--c-muted)); }
.zp-ageing { padding: 12px 18px; border: 1px solid rgb(var(--c-line)); border-radius: 6px; }
.zp-ageing-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.zp-ageing-head b { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--c-muted)); }
.zp-ageing-head span { color: rgb(var(--c-muted)); }
.zp-ageing-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 100px; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; }
.zp-ageing-row > :first-child { color: rgb(var(--c-muted)); }
.zp-ageing-row > :last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.zp-ageing-bar { height: 8px; border-radius: 4px; background: rgb(var(--c-line-faint)); overflow: hidden; }
.zp-ageing-bar span { display: block; height: 100%; border-radius: 4px; background: var(--sh-accent, #408DFB); }
.zp-ageing-bar span.is-late { background: #F58A2F; }
@media (max-width: 1100px) { .zp-sumband { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .zp-sumfigs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .zp-sumfig:nth-child(3) { border-left: 0; } .zp-sumfig:nth-child(n+3) { border-top: 1px solid rgb(var(--c-line)); } }

/* A lookup (or any field) with its label stacked above it. */
.zp-stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.zp-stack-lbl { font-size: 13.5px; font-weight: 600; color: rgb(var(--c-ink-soft)); }
.zp-stack-lbl.zp-req { color: rgb(var(--c-danger)); }
.zp-lookup-input {
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.zp-lookup > .zp-dd-panel > .nexo-lookup-error { border: 0; border-radius: 0; }
a.zp-link { color: rgb(var(--c-primary)); text-decoration: none; }
a.zp-link:hover { text-decoration: underline; }
.zp-text-danger { color: rgb(var(--c-danger)); }

/* ================================================== document forms (Step 2) */

/* Extra fields sharing one row: "Invoice Date [..]  Terms [..]  Due Date [..]". */
.zp-sub-lbl { font-size: 14px; color: rgb(var(--c-ink)); white-space: nowrap; }
.zp-field-inline > .zp-input,
.zp-field-inline > .zp-select { width: 190px; flex-shrink: 0; }
.zp-field-inline > .zp-sub-group { display: inline-flex; align-items: center; gap: 12px; }
.zp-field-inline .zp-err { flex-basis: 100%; }

/* Item table heading row: "Item Table" on the left, "Amounts are" on the right. */
.zp-it-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.zp-it-head .zp-select { width: auto; min-width: 170px; }

/* Customer notes on the left, totals on the right, as Zoho lays them out. */
.zp-doc-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 20px 48px; align-items: start; }
.zp-doc-foot .zp-totals { width: 100%; margin: 0; }
.zp-totals-adj { display: flex; align-items: center; gap: 8px; }
.zp-totals-adj .zp-input:first-child { width: 130px; border-style: dashed; }
.zp-totals-note { margin: 10px 0 0; font-size: 12px; color: rgb(var(--c-muted)); }
@media (max-width: 900px) { .zp-doc-foot { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
    .zp-field-inline > .zp-input, .zp-field-inline > .zp-select { width: 100%; }
    .zp-field-inline > .zp-sub-group { width: 100%; }
    .zp-field-inline > .zp-sub-group > .zp-input, .zp-field-inline > .zp-sub-group > .zp-select { flex: 1 1 0; min-width: 0; }
}

/* ================================================== record detail (Step 2) */

/* The strip of actions under the title: Edit | Send | Record Payment | More. */
.zp-actbar {
    margin: 0 -28px;
    padding: 8px 28px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-ground));
}
.zp-actbar form { display: contents; }
.zp-actbar .zp-btn { height: 32px; font-size: 13.5px; }
.zp-actbar-sep { width: 1px; height: 20px; background: rgb(var(--c-line-strong)); }

/* "More ▾" — a <details data-nexo-menu> that closes on an outside click. */
.zp-more { position: relative; }
.zp-more > summary { list-style: none; }
.zp-more > summary::-webkit-details-marker { display: none; }
.zp-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 30;
    min-width: 220px;
    padding: 4px 0;
    border: 1px solid rgb(var(--c-line));
    border-radius: 6px;
    background: rgb(var(--c-surface));
    box-shadow: 0 12px 32px rgba(15, 20, 35, 0.16);
}
.zp-menu-right { left: auto; right: 0; }
.zp-menu a,
.zp-menu button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: rgb(var(--c-ink));
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.zp-menu a:hover,
.zp-menu button:hover { background: var(--sh-active, #1F6FE0); color: #FFFFFF; }
.zp-menu hr { margin: 4px 0; border: 0; border-top: 1px solid rgb(var(--c-line)); }
.zp-menu-danger { color: rgb(var(--c-danger)) !important; }
.zp-menu-danger:hover { background: rgb(var(--c-danger)) !important; color: #FFFFFF !important; }

/* The grey canvas the document sits on. */
.zp-canvas { margin: 0 -28px -40px; padding: 24px 28px 48px; min-height: calc(100vh - 176px); box-sizing: border-box; background: rgb(var(--c-ground)); }
.zp-status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13.5px; color: rgb(var(--c-ink-soft)); }

/* The document itself, as Zoho's standard template prints it. */
.zp-paper {
    position: relative;
    /* An A4 sheet: 210 x 297 mm, as it prints and as the PDF comes out. */
    width: 210mm;
    max-width: 100%;
    min-height: 297mm;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 44px 48px 40px;
    overflow: hidden;
    background: #FFFFFF;
    color: #21263C;
    border: 1px solid rgb(var(--c-line));
    box-shadow: 0 2px 10px rgba(15, 20, 35, 0.06);
    font-size: 13.5px;
    line-height: 1.5;
}
.zp-ribbon {
    position: absolute;
    top: 30px;
    left: -52px;
    width: 190px;
    padding: 4px 0;
    transform: rotate(-45deg);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #FFFFFF;
    background: #6B7280;
}
.zp-ribbon-blue { background: #408DFB; }
.zp-ribbon-green { background: #22A06B; }
.zp-ribbon-red { background: #E5484D; }
.zp-ribbon-orange { background: #F58A2F; }

.zp-paper-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.zp-paper-org { padding-left: 34px; }
.zp-paper-org b { display: block; font-size: 15px; }
.zp-paper-org span { display: block; color: #6B7280; line-height: 1.5; }
.zp-paper-logo { display: block; max-width: 180px; max-height: 70px; width: auto; height: auto; margin-bottom: 10px; object-fit: contain; }
.zp-paper-title { text-align: right; }
.zp-paper-title h2 { margin: 0; font-size: 30px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; }
.zp-paper-title p { margin: 4px 0 0; font-weight: 700; }
.zp-paper-balance { margin-top: 18px !important; font-weight: 400 !important; color: #6B7280; font-size: 12.5px; }
.zp-paper-balance b { display: block; color: #21263C; font-size: 17px; }

.zp-paper-meta { margin-top: 30px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.zp-paper-to span { display: block; color: #6B7280; }
.zp-paper-to b { display: block; margin-top: 2px; color: #408DFB; font-size: 14px; }
.zp-paper-dates { border-collapse: collapse; }
.zp-paper-dates td { padding: 3px 0 3px 24px; text-align: right; }
.zp-paper-dates td:first-child { color: #6B7280; }
.zp-paper-subject { margin: 22px 0 0; }
.zp-paper-subject span { display: block; color: #6B7280; }

.zp-paper-items { width: 100%; margin-top: 22px; border-collapse: collapse; }
.zp-paper-items th {
    padding: 8px 10px;
    background: #3C3D3A;
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 400;
    text-align: left;
}
.zp-paper-items td { padding: 10px; border-bottom: 1px solid #E5E7EB; vertical-align: top; }
.zp-paper-items .zp-end { text-align: right; }
.zp-paper-items small { display: block; color: #6B7280; font-size: 12.5px; }
.zp-paper-items .zp-tag { color: #1F6FE0; font-weight: 600; }

.zp-paper-totals { margin: 8px 0 0 auto; width: min(360px, 100%); border-collapse: collapse; }
.zp-paper-totals td { padding: 6px 10px; text-align: right; }
.zp-paper-totals td:first-child { color: #4B5563; }
.zp-paper-totals .is-total td { font-weight: 700; font-size: 14.5px; color: #21263C; }
.zp-paper-totals .is-due td { background: #F3F4F6; font-weight: 700; color: #21263C; }

.zp-paper-note { margin-top: 26px; }
.zp-paper-note b { display: block; margin-bottom: 2px; font-weight: 400; color: #6B7280; }
.zp-paper-note p { margin: 0; white-space: pre-line; }
.zp-paper-legal { margin-top: 22px; padding: 10px 12px; border: 1px solid #E5E7EB; border-radius: 4px; background: #F9FAFB; font-size: 12.5px; color: #4B5563; }

/* Sections under the document: payments, history, void. */
.zp-section { width: 210mm; max-width: 100%; margin: 22px auto 0; }
.zp-section h2 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }

@media (max-width: 1023px) {
    .zp-actbar { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
    .zp-canvas { margin: 0 -16px -32px; padding: 18px 16px 40px; }
}
@media (max-width: 640px) {
    .zp-paper { padding: 72px 18px 24px; min-height: 0; }
    .zp-paper-org { padding-left: 0; }
    .zp-paper-title { text-align: left; }
    .zp-paper-title h2 { font-size: 24px; }
    .zp-paper-items { display: block; overflow-x: auto; }
}

/* Underlined section tabs ("Other Details | Address | ..."). */
.zp-tabs { display: flex; gap: 26px; border-bottom: 1px solid rgb(var(--c-line)); margin-bottom: 4px; overflow-x: auto; }
.zp-tabs > a, .zp-tabs > span {
    padding: 8px 0 10px; margin-bottom: -1px; white-space: nowrap;
    font-size: 14px; color: rgb(var(--c-ink-soft)); text-decoration: none;
    border-bottom: 2px solid transparent;
}
.zp-tabs > a:hover { color: rgb(var(--c-ink)); text-decoration: none; }
.zp-tabs > .is-current, .zp-tabs > [aria-current="page"] { color: rgb(var(--c-ink)); font-weight: 600; border-bottom-color: var(--sh-active, #1F6FE0); }

/* Payment receipt paper: the green "Amount Received" box on the right. */
.zp-receipt-title { margin: 8px 0 26px; text-align: center; font-size: 17px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; }
.zp-paper-head + .zp-receipt-title { margin-top: 26px; padding-top: 20px; border-top: 1px solid #E5E7EB; }
.zp-receipt { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.zp-receipt-rows { border-collapse: collapse; }
.zp-receipt-rows td { padding: 9px 0; border-bottom: 1px solid #E5E7EB; min-width: 150px; }
.zp-receipt-rows td:first-child { color: #6B7280; padding-right: 24px; }
.zp-receipt-rows td:last-child { font-weight: 600; }
.zp-receipt-amount { align-self: flex-start; min-width: 220px; padding: 22px 26px; box-sizing: border-box; background: #78AE54; color: #FFFFFF; text-align: center; }
.zp-receipt-amount span { display: block; font-size: 13px; }
.zp-receipt-amount b { display: block; margin-top: 6px; font-size: 21px; }
.zp-receipt-amount.is-void { background: #9CA3AF; }
.zp-receipt-h { margin: 30px 0 0; font-size: 15px; font-weight: 700; }
.zp-row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.zp-row-actions form { display: contents; }

/* Script toggles the Tailwind "hidden" class on some form rows; a zp-row's own
   display:flex would otherwise win because pages.css loads after app.css. */
.zp-row.hidden, .zp-field.hidden, .zp-block.hidden { display: none; }

/* A file picker drawn as Zoho's dashed drop area. */
.zp-file {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 28px 20px; box-sizing: border-box;
    border: 1px dashed rgb(var(--c-line-strong)); border-radius: 6px;
    background: rgb(var(--c-ground)); text-align: center; font-size: 14px; color: rgb(var(--c-ink-soft));
}
.zp-file input[type="file"] { max-width: 100%; font: inherit; font-size: 13.5px; }
.zp-file input[type="file"]::file-selector-button {
    margin-right: 10px; height: 32px; padding: 0 12px; cursor: pointer;
    border: 1px solid rgb(var(--c-line-strong)); border-radius: 4px;
    background: rgb(var(--c-surface)); color: rgb(var(--c-ink)); font: inherit; font-size: 13.5px;
}

/* A raw preview of an imported file: small, monospaced-ish, scrolls sideways. */
.zp-preview { overflow-x: auto; border: 1px solid rgb(var(--c-line)); border-radius: 6px; }
.zp-preview table { border-collapse: collapse; font-size: 12.5px; }
.zp-preview td { padding: 7px 12px; white-space: nowrap; border-bottom: 1px solid rgb(var(--c-line-faint)); }
.zp-preview tr:last-child td { border-bottom: 0; }
.zp-preview tr.is-head td { background: rgb(var(--c-ground)); font-weight: 700; }

/* ======================================================== banking (Step 4) */

/* Account register header: name and balance, like Zoho's account page. */
.zp-bank-head { margin: 0 -28px; padding: 16px 28px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; border-bottom: 1px solid rgb(var(--c-line)); background: rgb(var(--c-ground)); }
.zp-bank-fig span { display: block; font-size: 12.5px; color: rgb(var(--c-muted)); }
.zp-bank-fig b { display: block; margin-top: 2px; font-size: 18px; font-variant-numeric: tabular-nums; }

/* The statement lines: one grid row each, with the answer panel opening beneath. */
.zp-bankrows { border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-surface)); }
.zp-bankrows-head,
.zp-bankrow { display: grid; grid-template-columns: 110px minmax(0, 1fr) 130px 130px 170px; align-items: center; gap: 12px; padding: 11px 16px; }
.zp-bankrows-head { background: rgb(var(--c-ground)); border-bottom: 1px solid rgb(var(--c-line)); border-radius: 6px 6px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--c-muted)); }
.zp-bankline + .zp-bankline { border-top: 1px solid rgb(var(--c-line-faint)); }
.zp-bankrow { font-size: 14px; }
.zp-bankrow .zp-num { text-align: right; }
.zp-bankrow-desc b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zp-bankrow-desc small { display: block; font-size: 12.5px; color: rgb(var(--c-muted)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zp-bankrow-desc small.is-rule { color: rgb(var(--c-primary)); }
.zp-in { color: #1E8E3E; font-weight: 700; }
.zp-out { font-weight: 700; }
.zp-bankrow-act { text-align: right; }
.zp-bankline .line-panel:empty { display: none; }

.zp-linepanel { padding: 18px 16px; border-top: 1px solid rgb(var(--c-line)); background: rgb(var(--c-ground)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.zp-linepanel h3 { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--c-muted)); }
.zp-match {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; margin-bottom: 8px; border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-surface));
}
.zp-match b { display: block; font-size: 14px; }
.zp-match small { display: block; font-size: 12.5px; color: rgb(var(--c-muted)); }
.zp-card { padding: 14px; border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-surface)); display: flex; flex-direction: column; gap: 12px; }
.zp-card .zp-row { gap: 10px; }
.zp-card .zp-lbl { width: 110px; font-size: 13.5px; }
.zp-card details summary { cursor: pointer; font-size: 13.5px; color: rgb(var(--c-ink-soft)); }

@media (max-width: 1023px) {
    .zp-bank-head { margin: 0 -16px; padding: 14px 16px; }
    .zp-linepanel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .zp-bankrows-head { display: none; }
    .zp-bankrow { grid-template-columns: 1fr auto; grid-template-areas: "desc amt" "date act"; row-gap: 6px; }
    .zp-bankrow > :nth-child(1) { grid-area: date; font-size: 12.5px; color: rgb(var(--c-muted)); }
    .zp-bankrow > :nth-child(2) { grid-area: desc; }
    .zp-bankrow > :nth-child(3), .zp-bankrow > :nth-child(4) { grid-area: amt; }
    .zp-bankrow > :nth-child(3):empty, .zp-bankrow > :nth-child(4):empty { display: none; }
    .zp-bankrow > :nth-child(5) { grid-area: act; }
}
.zp-bankrow-desc { min-width: 0; }
@media (max-width: 640px) {
    .zp-titlebar { flex-wrap: wrap; }
    .zp-titlebar-actions { flex-wrap: wrap; }
}

/* ============================================ filing & compliance (Step 5) */

.zp-vat td { padding: 11px 12px; font-size: 14px; }
.zp-vat .zp-vat-sec td { padding: 10px 12px; background: rgb(var(--c-ground)); font-weight: 700; font-size: 13.5px; color: rgb(var(--c-ink-soft)); }
.zp-vat .zp-vat-total td { font-weight: 600; }
.zp-vat .zp-vat-net td { font-weight: 700; font-size: 15px; background: rgb(var(--c-primary) / 0.05); }

/* The big "Net VAT payable / refundable" figure. */
.zp-bigfig { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-surface)); }
.zp-bigfig span { display: block; font-size: 13px; color: rgb(var(--c-muted)); }
.zp-bigfig b { display: block; margin-top: 2px; font-size: 24px; font-variant-numeric: tabular-nums; }
.zp-bigfig.is-refund { border-color: rgb(30 142 62 / 0.4); background: rgb(30 142 62 / 0.05); }
.zp-bigfig.is-refund b { color: #1E8E3E; }

/* A compact filter bar (period pickers + Recalculate). */
.zp-filterbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.zp-filterbar .zp-stack .zp-input { width: 170px; }

/* ======================================================= accountant (Step 6) */

/* Journal totals under the grid: Total debits | credits, then Difference. */
.zp-jtotals { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.zp-jtotals > div { display: grid; grid-template-columns: 130px 130px 130px; gap: 10px; align-items: baseline; }
.zp-jtotals span { color: rgb(var(--c-muted)); }
.zp-jtotals b { text-align: right; font-variant-numeric: tabular-nums; }
.zp-jtotals > div:first-child { padding-bottom: 6px; border-bottom: 1px solid rgb(var(--c-line)); }
@media (max-width: 640px) { .zp-jtotals > div { grid-template-columns: 90px 1fr 1fr; } .zp-itemtable-foot { flex-wrap: wrap; } }

/* ========================================================= reports (Step 7) */

/* Reports home: Zoho's categorised list of report links. */
.zp-rhome { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; padding: 20px 0 8px; }
.zp-rhome section { border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-surface)); }
.zp-rhome h2 { margin: 0; padding: 12px 16px; border-bottom: 1px solid rgb(var(--c-line)); font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.zp-rhome h2 svg { color: var(--sh-accent, #408DFB); }
.zp-rhome ul { margin: 0; padding: 6px 0; list-style: none; }
.zp-rhome li a { display: block; padding: 8px 16px; font-size: 14px; color: rgb(var(--c-primary)); text-decoration: none; }
.zp-rhome li a:hover { background: rgb(var(--c-ground)); }
.zp-rhome li small { display: block; margin-top: 2px; font-size: 12.5px; color: rgb(var(--c-muted)); }

/* The grey filter band across a report. */
.zp-rbar { margin: 0 -28px; padding: 12px 28px; border-bottom: 1px solid rgb(var(--c-line)); background: rgb(var(--c-ground)); }
.zp-rbar .zp-filterbar { align-items: flex-end; }
.zp-rbar .zp-stack .zp-input, .zp-rbar .zp-stack .zp-select { width: 170px; height: 34px; }

/* The report itself: a white sheet with the centred heading Zoho prints. */
.zp-rpt { width: 210mm; max-width: 100%; min-height: 297mm; margin: 22px auto 0; padding: 14mm 12mm 12mm; box-sizing: border-box; border: 1px solid rgb(var(--c-line)); border-radius: 2px; background: rgb(var(--c-surface)); box-shadow: 0 2px 10px rgba(15, 20, 35, 0.06); }
/* Reports with many columns are A4 landscape: 297 x 210 mm. */
.zp-rpt.is-landscape { width: 297mm; min-height: 210mm; }
.zp-rpt-head { text-align: center; margin-bottom: 22px; }
.zp-rpt-head span { display: block; font-size: 13.5px; color: rgb(var(--c-muted)); }
.zp-rpt-head h2 { margin: 4px 0 2px; font-size: 21px; font-weight: 400; }
.zp-rpt-head p { margin: 2px 0 0; font-size: 13px; color: rgb(var(--c-muted)); }
/* The organization on every report: its logo (when there is one) above its name. */
.zp-rpt-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 8px; }
.zp-rpt-logo { display: block; max-width: 200px; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.zp-rpt-head .zp-rpt-org { font-size: 15px; font-weight: 700; color: rgb(var(--c-ink)); }
.dark .zp-rpt-logo { background: #FFFFFF; padding: 6px 10px; border-radius: 6px; }
@media print {
    .zp-rpt-logo { max-height: 56px; background: none; padding: 0; }
    .zp-rpt-head .zp-rpt-org { color: #000000; }
    .zp-rpt-brand { break-inside: avoid; padding-top: 14px; }
}

.zp-rpt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.zp-rpt-table th { padding: 8px 10px; border-bottom: 1px solid rgb(var(--c-line-strong)); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--c-muted)); text-align: left; }
.zp-rpt-table td { padding: 8px 10px; }
.zp-rpt-table .zp-end { text-align: right; }
.zp-rpt-table td.zp-end { font-variant-numeric: tabular-nums; white-space: nowrap; }
.zp-rpt-sec td { padding-top: 16px; font-weight: 700; }
.zp-rpt-line td:first-child { padding-left: 26px; }
.zp-rpt-line td { border-bottom: 1px solid rgb(var(--c-line-faint)); }
.zp-rpt-line a { color: rgb(var(--c-primary)); text-decoration: none; }
.zp-rpt-line a:hover { text-decoration: underline; }
.zp-rpt-total td { font-weight: 700; border-top: 1px solid rgb(var(--c-line)); }
.zp-rpt-key td { font-weight: 700; background: rgb(var(--c-ground)); }
.zp-rpt-grand td { font-weight: 700; font-size: 15px; border-top: 2px solid rgb(var(--c-ink) / 0.25); border-bottom: 2px solid rgb(var(--c-ink) / 0.25); }
.zp-rpt-empty td { padding: 10px 10px 10px 26px; color: rgb(var(--c-muted)); }
.zp-rpt-foot { margin-top: 16px; font-size: 13px; color: rgb(var(--c-muted)); }
.zp-rpt-ok { color: #1E8E3E; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.zp-rpt-bad { color: rgb(var(--c-danger)); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.zp-rpt-wrap { overflow-x: auto; }

@media (max-width: 1023px) { .zp-rbar { margin: 0 -16px; padding: 12px 16px; } }
@media (max-width: 640px) {
    .zp-rpt, .zp-rpt.is-landscape { padding: 20px 14px; min-height: 0; }
    .zp-rbar .zp-stack .zp-input, .zp-rbar .zp-stack .zp-select { width: 150px; }
    .zp-rpt-line td:first-child { padding-left: 16px; }
}
/* Printing: A4, portrait unless the report is a landscape one. */
@page { size: A4 portrait; margin: 12mm; }
@page nexo-landscape { size: A4 landscape; margin: 10mm; }
@media print {
    .sh-top, .sh-side, .zp-rbar, .zp-titlebar-actions, .zp-close { display: none !important; }
    .zp-rpt, .zp-rpt.is-landscape { width: auto; max-width: none; min-height: 0; border: 0; box-shadow: none; margin: 0; padding: 0; }
    .zp-rpt.is-landscape { page: nexo-landscape; }
    .zp-rpt-wrap { overflow: visible; }
    .zp-rpt-table { min-width: 0 !important; font-size: 11px; }
    .zp-rpt-table tr { break-inside: avoid; }
    .zp-rpt-table thead { display: table-header-group; }

    /* A document page prints just the sheet. */
    body:has(.zp-paper) .sh-main * { visibility: hidden; }
    body:has(.zp-paper) .zp-paper, body:has(.zp-paper) .zp-paper * { visibility: visible; }
    body:has(.zp-paper) .zp-paper { position: absolute; top: 0; left: 0; width: 100%; min-height: 0; margin: 0; border: 0; box-shadow: none; padding: 0; }
    body:has(.zp-paper) .zp-canvas { background: none; }
}
.zp-list .zp-rhome { padding: 20px 28px 32px; }
@media (max-width: 1023px) { .zp-list .zp-rhome { padding: 16px; } }

/* ============================================ settings screens (feature A) */

/* All Settings: Zoho's grid of setting groups. */
.zp-settings-home { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding: 20px 28px 32px; }
.zp-settings-home section { border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-surface)); padding: 16px 18px; }
.zp-settings-home h2 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--c-muted)); }
.zp-settings-home a { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; color: rgb(var(--c-ink)); text-decoration: none; }
.zp-settings-home a:hover { color: rgb(var(--c-primary)); }
.zp-settings-home a svg { color: var(--sh-accent, #408DFB); flex-shrink: 0; }

/* A settings list with its editor beside it. */
.zp-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 28px 32px; align-items: start; }
.zp-split.has-editor { grid-template-columns: minmax(0, 1fr) 380px; }
.zp-sidecard { position: sticky; top: 12px; border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-surface)); box-shadow: 0 6px 18px rgba(15, 20, 35, 0.06); }
.zp-sidecard-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgb(var(--c-line)); }
.zp-sidecard-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.zp-sidecard form { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.zp-sidecard .zp-errors { margin: 0; }
.zp-sidecard-actions { display: flex; gap: 8px; padding-top: 4px; }
.zp-settings-table td, .zp-settings-table th { white-space: nowrap; }
.zp-settings-table td form { display: inline; }
.zp-row-actions a.zp-btn { text-decoration: none; }
tr.is-editing td { background: rgb(var(--c-primary) / 0.06); }

@media (max-width: 1100px) { .zp-split.has-editor { grid-template-columns: minmax(0, 1fr); } .zp-sidecard { position: static; } }
@media (max-width: 1023px) { .zp-split, .zp-settings-home { padding: 16px; } }

/* =====================================================================
   Organizations: profile logo, Manage Organizations, New Organization
   ================================================================== */

.zp-mt { margin-top: 8px; }
.zp-link-danger {
    border: 0; background: none; padding: 0; cursor: pointer;
    color: rgb(var(--c-danger)); font: inherit; font-size: 13px;
}
.zp-link-danger:hover { text-decoration: underline; }

.zp-logo-box { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.zp-logo-preview {
    width: 240px; height: 120px; box-sizing: border-box; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border: 1px dashed rgb(var(--c-line-strong)); border-radius: 6px;
    background: #FFFFFF; color: #9AA1B2; font-size: 12.5px; padding: 10px;
}
.zp-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.zp-logo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 380px; }
.zp-logo-actions form { margin: 0; }
.zp-logo-upload label { cursor: pointer; }
.zp-logo-upload label:focus-within { outline: 2px solid rgb(var(--c-primary)); outline-offset: 2px; }

/* Manage Organizations */
.zp-orgs { padding: 0 28px 28px; }
.zp-org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.zp-org-card {
    display: flex; flex-direction: column; gap: 14px;
    border: 1px solid rgb(var(--c-line)); border-radius: 8px;
    background: rgb(var(--c-surface)); padding: 18px;
}
.zp-org-card.is-current { border-color: #1E6FD9; box-shadow: 0 0 0 1px #1E6FD9 inset; }
.zp-org-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.zp-org-tile {
    width: 52px; height: 52px; flex-shrink: 0; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgb(var(--c-line)); border-radius: 8px;
    background: rgb(var(--c-ground)); color: rgb(var(--c-ink-soft));
    font-size: 17px; font-weight: 700;
}
.zp-org-card.is-current .zp-org-tile:not(.is-logo) { background: #1E6FD9; border-color: #1E6FD9; color: #FFFFFF; }
.zp-org-tile.is-logo { background: #FFFFFF; padding: 4px; }
.zp-org-tile.is-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.zp-org-name { margin: 0; font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zp-org-meta { margin: 3px 0 0; font-size: 12.5px; color: rgb(var(--c-muted)); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.zp-org-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid rgb(var(--c-line-faint)); padding-top: 12px; }
.zp-org-actions form { margin: 0; }
.zp-org-actions details { position: relative; }
.zp-org-actions details > summary { list-style: none; cursor: pointer; }
.zp-org-actions details > summary::-webkit-details-marker { display: none; }
.zp-org-confirm {
    margin-top: 10px; padding: 12px; border: 1px solid rgb(var(--c-danger) / .35);
    border-radius: 6px; background: rgb(var(--c-danger) / .04);
    display: flex; flex-direction: column; gap: 8px; font-size: 13px;
}
.zp-org-new {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    min-height: 150px; border: 1px dashed rgb(var(--c-line-strong)); border-radius: 8px;
    color: rgb(var(--c-primary)); font-weight: 700; font-size: 14px; text-decoration: none;
    background: rgb(var(--c-surface));
}
.zp-org-new:hover { border-color: rgb(var(--c-primary)); background: rgb(var(--c-primary) / .04); text-decoration: none; }
.zp-org-section { margin: 28px 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--c-muted)); }
.zp-org-sample {
    margin-top: 24px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    padding: 16px 18px; border: 1px solid rgb(var(--c-line)); border-radius: 8px; background: rgb(var(--c-ground));
}
.zp-org-sample p { margin: 2px 0 0; font-size: 13px; color: rgb(var(--c-muted)); max-width: 640px; }
.zp-org-sample.is-danger { margin-top: 0; border-color: rgb(var(--c-danger) / .3); background: rgb(var(--c-danger) / .03); align-items: flex-start; }
.zp-org-reset { position: relative; }
.zp-org-reset[open] .zp-org-confirm { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(380px, calc(100vw - 48px)); background: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.zp-org-reset .zp-check { align-items: flex-start; }

/* New Organization */
.zp-neworg { max-width: 760px; margin: 0 auto; padding: 8px 28px 40px; }
.zp-neworg-head { display: flex; align-items: center; gap: 14px; margin: 18px 0 22px; }
.zp-neworg-head h1 { margin: 0; font-size: 22px; font-weight: 400; }
.zp-neworg-head p { margin: 3px 0 0; color: rgb(var(--c-muted)); font-size: 13.5px; }
.zp-neworg-card { border: 1px solid rgb(var(--c-line)); border-radius: 8px; background: rgb(var(--c-surface)); }
.zp-neworg-card .zp-block { margin: 0; }
.zp-neworg .zp-actions { position: static; margin: 0; border-top: 1px solid rgb(var(--c-line)); border-radius: 0 0 8px 8px; }
.zp-neworg .zp-errors { margin: 0 0 16px; }
.zp-sample-choice {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
    border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-ground)); cursor: pointer;
}
.zp-sample-choice input { margin-top: 3px; }
.zp-sample-choice b { display: block; font-size: 14px; }
.zp-sample-choice span { display: block; font-size: 12.5px; color: rgb(var(--c-muted)); margin-top: 2px; line-height: 1.5; }

.zp-busy {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(17, 20, 28, 0.55);
}
.zp-busy[hidden] { display: none !important; }
.zp-busy-card {
    width: min(420px, calc(100vw - 32px)); box-sizing: border-box; padding: 28px 26px;
    border-radius: 10px; background: rgb(var(--c-surface)); color: rgb(var(--c-ink));
    text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.zp-busy-card h2 { margin: 16px 0 6px; font-size: 17px; }
.zp-busy-card p { margin: 0; font-size: 13.5px; color: rgb(var(--c-muted)); line-height: 1.55; }
.zp-spinner {
    width: 38px; height: 38px; margin: 0 auto; border-radius: 50%;
    border: 3px solid rgb(var(--c-line)); border-top-color: #1E6FD9;
    animation: zp-spin .8s linear infinite;
}
@keyframes zp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .zp-spinner { animation-duration: 2.4s; } }
@media (max-width: 640px) {
    .zp-orgs { padding: 0 16px 20px; }
    .zp-neworg { padding: 4px 16px 28px; }
    .zp-org-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ====================================================================
   My Account, Security  (and Settings, Email Setup / Sign-in)
   ==================================================================== */
.zp-security { max-width: 980px; }
.zp-sec-head { display: flex; align-items: flex-start; gap: 16px; }
.zp-sec-icon {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgb(var(--c-primary) / .08); color: rgb(var(--c-primary));
}
.zp-sec-text { flex: 1 1 auto; min-width: 0; }
.zp-sec-text .zp-h2 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zp-sec-text p { margin: 6px 0 0; font-size: 13.5px; color: rgb(var(--c-muted)); max-width: 620px; line-height: 1.55; }
.zp-sec-text p b { color: rgb(var(--c-ink)); }
.zp-sec-note { color: rgb(var(--c-ink-soft)) !important; font-weight: 700; }
.zp-sec-action { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.zp-sec-pop { position: relative; }
.zp-sec-pop[open] .zp-org-confirm {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
    width: min(340px, calc(100vw - 48px)); background: rgb(var(--c-surface));
    box-shadow: 0 8px 24px rgb(0 0 0 / .12);
}
.zp-sec-empty { margin: 14px 0 0 60px; font-size: 13.5px; color: rgb(var(--c-muted)); }
.zp-sec-table { margin: 16px 0 0 60px; border: 1px solid rgb(var(--c-line)); border-radius: 8px; }
.zp-block > .zp-h2 + .zp-sec-table, .zp-block > .zp-h2 + .zp-sec-empty { margin-left: 0; }
.zp-sec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 8px; vertical-align: 1px; }
.zp-sec-dot.is-ok { background: #16A34A; }
.zp-sec-dot.is-bad { background: #DC2626; }
@media (max-width: 700px) {
    .zp-sec-head { flex-wrap: wrap; }
    .zp-sec-action { width: 100%; padding-left: 60px; }
    .zp-sec-table, .zp-sec-empty { margin-left: 0; }
    .zp-sec-pop[open] .zp-org-confirm { left: 0; right: auto; }
}

.zp-mail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; }
.zp-mail-grid .zp-field { display: flex; flex-direction: column; gap: 6px; }
.zp-mail-grid label { font-size: 13px; font-weight: 700; color: rgb(var(--c-ink-soft)); }
@media (max-width: 900px) { .zp-mail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .zp-mail-grid { grid-template-columns: minmax(0, 1fr); } }
.zp-mail-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.zp-mail-status::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: #9CA3AF; }
.zp-mail-status.is-on::before { background: #16A34A; }
.zp-mail-test { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.zp-mail-test .zp-input { max-width: 320px; }
.zp-mail-error { margin-top: 4px; max-width: 520px; font-size: 12.5px; line-height: 1.5; color: #C4322D; overflow-wrap: anywhere; }
.dark .zp-mail-error { color: #F88076; }
.zp-switch-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid rgb(var(--c-line)); }
.zp-switch-row:first-of-type { border-top: 0; }
.zp-switch-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sh-active, #1F6FE0); flex-shrink: 0; }
.zp-switch-row b { display: block; font-size: 14px; }
.zp-switch-row span { display: block; margin-top: 3px; font-size: 13px; color: rgb(var(--c-muted)); line-height: 1.5; }

/* ---------------------------------------------------------------------------
   Contact form (Phase 3): address pair, person rows, icon buttons
   ------------------------------------------------------------------------ */
.zp-address-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px 40px; padding-top: 12px; }
.zp-address { border: 0; margin: 0; padding: 0; min-width: 0; }
.zp-address legend { padding: 0; margin-bottom: 10px; display: flex; align-items: center; }
.zp-address .zp-lbl { width: 130px; flex: 0 0 130px; }
.zp-iconbtn {
    width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent;
    color: rgb(var(--c-ink-soft)); font-size: 18px; line-height: 1; cursor: pointer;
}
.zp-iconbtn:hover { background: rgb(var(--c-danger) / .1); color: rgb(var(--c-danger)); }
[data-people] td { padding: 6px 6px; }
[data-people] .zp-input, [data-people] .zp-select { min-width: 0; width: 100%; }

/* ---------------------------------------------------------------------------
   Contact overview page
   ------------------------------------------------------------------------ */
.zp-contact-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 6px 0 14px; }
.zp-contact-head h1 { margin: 0; font-size: 22px; font-weight: 600; }
.zp-contact-head .zp-sub { color: rgb(var(--c-ink-soft)); font-size: 13px; margin-top: 2px; }
.zp-contact-grid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .zp-contact-grid { grid-template-columns: 1fr; } }
.zp-side-card { border: 1px solid rgb(var(--c-line)); border-radius: 8px; padding: 14px 16px; background: rgb(var(--c-surface, 255 255 255)); }
.zp-side-card + .zp-side-card { margin-top: 14px; }
.zp-side-card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: rgb(var(--c-ink-soft)); font-weight: 600; }
.zp-kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.zp-kv dt { color: rgb(var(--c-ink-soft)); }
.zp-kv dd { margin: 0; overflow-wrap: anywhere; }
.zp-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.zp-stat { border: 1px solid rgb(var(--c-line)); border-radius: 8px; padding: 12px 14px; }
.zp-stat span { display: block; font-size: 12.5px; color: rgb(var(--c-ink-soft)); }
.zp-stat b { display: block; margin-top: 4px; font-size: 18px; }
.zp-addr { white-space: pre-line; font-size: 13.5px; line-height: 1.5; }

/* ---------------------------------------------------------------------------
   Attachments panel (Phase 4)
   ------------------------------------------------------------------------ */
.zp-attach { border: 1px dashed rgb(var(--c-line)); border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
.zp-attach-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.zp-attach-list { list-style: none; margin: 0 0 10px; padding: 0; }
.zp-attach-list li { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgb(var(--c-line) / .6); }
.zp-attach-list li:last-child { border-bottom: 0; }
.zp-attach-remove { margin-left: auto; }
.zp-attach-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zp-attach-upload .zp-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.zp-attach-upload .zp-btn:focus-within { outline: 2px solid var(--sh-active, #1F6FE0); outline-offset: 2px; }
.zp-attach-upload .zp-btn.is-busy { opacity: .6; pointer-events: none; }
.zp-attach-upload .zp-btn.is-busy::after { content: " Uploading…"; }

/* ---------------------------------------------------------------------------
   Document page (Phase 5): what's next, share link, tabs, PDF, activity
   ------------------------------------------------------------------------ */
.zp-whatsnext {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 10px 0 14px; padding: 10px 14px; border: 1px solid rgb(var(--c-line));
    border-radius: 8px; background: rgb(var(--c-surface)); font-size: 13.5px;
}
.zp-whatsnext form { margin: 0; }
.zp-share { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid rgb(var(--c-line)); border-radius: 8px; background: rgb(var(--c-surface)); }
.zp-share-row { display: flex; gap: 8px; margin-top: 8px; }
.zp-share-row .zp-input { flex: 1; min-width: 0; }
.zp-doc-tabs { margin: 4px 0 12px; }
.zp-pdf-frame { width: 100%; height: min(80vh, 1100px); border: 1px solid rgb(var(--c-line)); border-radius: 8px; background: #fff; }
.zp-activity { list-style: none; margin: 0; padding: 0; }
.zp-activity li { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgb(var(--c-line)); font-size: 13.5px; }
.zp-activity time { color: rgb(var(--c-ink-soft)); }
@media (max-width: 640px) { .zp-activity li { grid-template-columns: 1fr; gap: 2px; } }
.zp-btn.is-disabled { opacity: .5; cursor: not-allowed; }
.zp-menu form { margin: 0; }
.zp-menu button[role="menuitem"] {
    display: block; width: 100%; text-align: left; background: none; border: 0;
    font: inherit; cursor: pointer;
}

/* The customer / vendor card under the name on a document form. */
.zp-ccard { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 4px; font-size: 13px; line-height: 1.55; color: rgb(var(--c-ink-soft)); }
.zp-ccard > div { min-width: 180px; }
.zp-ccard-h { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: rgb(var(--c-muted)); margin-bottom: 2px; }
.zp-ccard-muted { color: rgb(var(--c-muted)); font-style: italic; }

/* Modal dialogs (Void, the reason for editing an issued document). */
.zp-dialog { width: min(560px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; border-radius: 8px; background: rgb(var(--c-surface)); color: rgb(var(--c-ink)); box-shadow: 0 20px 50px rgba(15, 20, 35, .25); }
.zp-dialog::backdrop { background: rgba(15, 20, 35, .45); }
.zp-dialog > form { margin: 0; padding: 20px 22px 18px; }
.zp-dialog h2 { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.zp-dialog .zp-itemtable { border: 0; padding: 0 !important; }
.zp-dialog .zp-row { display: block; }
.zp-dialog .zp-lbl { display: block; margin-bottom: 6px; }
.zp-dialog .zp-row:last-child .zp-lbl { display: none; }
.zp-dialog-actions { display: flex; gap: 8px; margin-top: 16px; }
.zp-btn-void { color: rgb(var(--c-danger)); }
.zp-btn-void:hover { border-color: rgb(var(--c-danger)); }

/* Attachments as a paper-clip drop-down at the right of a document's action bar. */
.zp-actbar > .zp-attmenu { order: 99; margin-left: auto; }
.zp-attmenu > summary { gap: 4px; }
.zp-attmenu-count { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: var(--sh-active, #1F6FE0); color: #FFFFFF; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.zp-attpanel { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; width: min(360px, calc(100vw - 32px)); box-sizing: border-box; padding: 12px 14px; border: 1px solid rgb(var(--c-line)); border-radius: 6px; background: rgb(var(--c-surface)); box-shadow: 0 12px 32px rgba(15, 20, 35, 0.16); }
.zp-attpanel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.zp-attpanel .zp-attach-list li { font-size: 13.5px; }
.zp-attpanel .zp-attach-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.zp-attpanel-upload { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.zp-attpanel-upload:focus-within { outline: 2px solid var(--sh-active, #1F6FE0); outline-offset: 2px; }
.zp-actbar .zp-attpanel form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zp-actbar .zp-attpanel .zp-attach-remove { margin-left: auto; }

/* The date filter on a list's title bar. */
.zp-period { display: inline-flex; align-items: center; gap: 6px; color: rgb(var(--c-muted)); }
.zp-period .zp-select { height: 34px; width: auto; min-width: 150px; }
.zp-period-custom { display: inline-flex; align-items: center; gap: 6px; }
.zp-period-custom[hidden] { display: none; }
.zp-period-custom .zp-input { height: 34px; width: 150px; }

/* ------------------------------------------------ Zoho-style tax picker
   select[data-nexo-tax-picker] is hidden and drawn as .zp-taxpick (nexo.js);
   the panel is appended to <body> and positioned fixed under the box. */
.zp-taxpick-native { display: none !important; }

.zp-taxpick {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 8px;
    border: 1px solid rgb(var(--c-line));
    border-radius: 4px;
    background: rgb(var(--c-surface));
    color: rgb(var(--c-ink));
    font-size: 14px;
    cursor: pointer;
    outline: none;
    user-select: none;
}
.zp-taxpick-cell { height: 34px; }
.zp-taxpick-field { height: 36px; padding: 0 10px; }
.zp-taxpick:hover { border-color: rgb(var(--c-line-strong)); }
.zp-taxpick:focus, .zp-taxpick.is-open { border-color: rgb(var(--c-primary)); box-shadow: 0 0 0 3px rgb(var(--c-primary) / 0.12); }
.zp-taxpick.is-disabled { opacity: .6; cursor: not-allowed; }
.zp-taxpick-text { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.zp-taxpick.is-empty .zp-taxpick-text { color: rgb(var(--c-muted)); }
.zp-taxpick-clear {
    flex: 0 0 auto;
    width: 18px; height: 18px;
    padding: 0; border: 0; border-radius: 3px;
    background: transparent;
    color: rgb(var(--c-danger));
    font-size: 17px; line-height: 18px;
    cursor: pointer;
}
.zp-taxpick-clear:hover { background: rgb(var(--c-danger) / 0.1); }
.zp-taxpick-clear[hidden] { display: none; }
.zp-taxpick-chev {
    flex: 0 0 auto;
    width: 7px; height: 7px;
    margin: 0 2px 3px 4px;
    padding-left: 6px;
    border-left: 1px solid rgb(var(--c-line));
    box-sizing: content-box;
    position: relative;
}
.zp-taxpick-chev::after {
    content: "";
    position: absolute; left: 6px; top: 0;
    width: 6px; height: 6px;
    border-right: 1.5px solid rgb(var(--c-primary));
    border-bottom: 1.5px solid rgb(var(--c-primary));
    transform: rotate(45deg);
}
.zp-taxpick.is-open .zp-taxpick-chev::after { top: 4px; transform: rotate(-135deg); }

.zp-taxpick-panel {
    position: fixed;
    z-index: 1000;
    width: 260px;
    box-sizing: border-box;
    border: 1px solid rgb(var(--c-line));
    border-radius: 6px;
    background: rgb(var(--c-surface));
    color: rgb(var(--c-ink));
    box-shadow: 0 8px 24px rgba(15, 20, 35, .18);
    font-size: 14px;
    overflow: hidden;
}
.zp-taxpick-panel[hidden] { display: none; }
.zp-taxpick-search { padding: 8px; }
.zp-taxpick-search input {
    width: 100%; height: 32px; box-sizing: border-box;
    padding: 0 10px 0 30px;
    border: 1px solid rgb(var(--c-primary));
    border-radius: 4px;
    background: rgb(var(--c-surface)) no-repeat 9px center / 14px 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23969dab' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E");
    color: rgb(var(--c-ink));
    font: inherit; font-size: 14px;
    outline: none;
    box-shadow: 0 0 0 3px rgb(var(--c-primary) / 0.12);
}
.zp-taxpick-list { max-height: 260px; overflow-y: auto; padding: 0 6px 6px; }
.zp-taxpick-group { padding: 10px 10px 4px; font-size: 13px; font-weight: 600; color: rgb(var(--c-ink)); }
.zp-taxpick-opt {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 12px; margin: 1px 0;
    border-radius: 4px;
    color: rgb(var(--c-ink-soft));
    cursor: pointer;
}
.zp-taxpick-group ~ .zp-taxpick-opt { padding-left: 18px; }
.zp-taxpick-opt.is-selected { background: rgb(var(--c-line-faint)); color: rgb(var(--c-ink)); }
.zp-taxpick-opt.is-active { background: rgb(var(--c-primary)); color: #fff; }
.zp-taxpick-tick {
    flex: 0 0 auto;
    width: 5px; height: 10px; margin: 0 2px 3px 0;
    border-right: 2px solid rgb(var(--c-primary));
    border-bottom: 2px solid rgb(var(--c-primary));
    transform: rotate(45deg);
}
.zp-taxpick-opt.is-active .zp-taxpick-tick { border-color: #fff; }
.zp-taxpick-none { padding: 10px 12px; color: rgb(var(--c-muted)); }
.zp-taxpick-new {
    display: flex; align-items: center; gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: 0; border-top: 1px solid rgb(var(--c-line));
    background: transparent;
    color: rgb(var(--c-primary));
    font: inherit; font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.zp-taxpick-new span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: rgb(var(--c-primary)); color: rgb(var(--c-surface));
    font-size: 14px; font-weight: 600; line-height: 1;
}
.zp-taxpick-new:hover { background: rgb(var(--c-line-faint)); }

.zp-taxpick-dialog { width: min(420px, calc(100vw - 32px)); }
.zp-taxpick-dialog .zp-row { margin-bottom: 12px; }
.zp-taxpick-dialog .zp-row .zp-lbl { display: block; }
.zp-taxpick-dialog .zp-input[readonly] { background: rgb(var(--c-line-faint)); }
.zp-taxpick-error {
    margin: 0 0 12px; padding: 8px 10px;
    border-radius: 4px;
    background: rgb(var(--c-danger) / 0.1);
    color: rgb(var(--c-danger));
    font-size: 13px;
}
.zp-taxpick-error[hidden] { display: none; }

/* ===================================================== Record Expense (Zoho) */

/* Form on the left, receipt drop box on the right (sticky). */
.zp-exp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 0 40px; align-items: start; }
.zp-exp-main { min-width: 0; }
.zp-exp-main .zp-block { margin-right: 0; }
.zp-exp-main .zp-block:last-child { border-bottom: 0; }
.zp-w-exp { max-width: 400px; }
.zp-exp-side { position: sticky; top: 16px; padding-top: 40px; }

/* "AED v | 4.2": the currency joined to the amount. */
.zp-exp-amount { display: flex; }
.zp-exp-amount .zp-exp-cur {
    width: 92px; flex-shrink: 0; border-right: 0; border-radius: 4px 0 0 4px;
    background-color: rgb(var(--c-ground));
}
.zp-exp-amount .zp-input { flex-grow: 1; min-width: 0; border-radius: 0 4px 4px 0; }
.zp-exp-amount .zp-num { text-align: left; }

/* Vendor lookup with a clear (x) inside the box. */
.zp-exp-vendor .zp-lookup-input { padding-right: 32px; }
.zp-exp-clear {
    position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
    border: 0; border-radius: 4px; background: transparent; cursor: pointer;
    font-size: 18px; line-height: 1; color: rgb(var(--c-danger));
}
.zp-exp-clear:hover { background: rgb(var(--c-danger) / 0.08); }
.zp-exp-clear[hidden] { display: none; }

.zp-exp-more summary { width: max-content; cursor: pointer; list-style: none; font-size: 13px; color: rgb(var(--c-primary)); margin-left: 25px; }
.zp-exp-more summary::-webkit-details-marker { display: none; }
.zp-exp-more p { margin: 6px 0 0 25px; }
.zp-check input:disabled { cursor: default; }

.zp-exp-taxamt { font-size: 12px; color: rgb(var(--c-muted)); }
.zp-exp-taxamt[hidden], .zp-exp-itc[hidden] { display: none; }
.zp-exp-itc { font-size: 12.5px; }

/* The dashed receipt box. */
.zp-exp-drop {
    min-height: 300px; box-sizing: border-box; padding: 28px 18px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    border: 1px dashed rgb(var(--c-line-strong)); border-radius: 6px;
    background: rgb(var(--c-surface)); text-align: center;
    transition: border-color .12s, background .12s;
}
.zp-exp-drop.is-over { border-color: rgb(var(--c-primary)); background: rgb(var(--c-primary) / 0.05); }
.zp-exp-drop b { margin-top: 8px; font-size: 13.5px; }
.zp-exp-upload { margin-top: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; background: rgb(var(--c-ground)); }
.zp-exp-upload:focus-within { outline: 2px solid var(--sh-active, #1F6FE0); outline-offset: 2px; }
.zp-exp-files { width: 100%; margin: 8px 0 0; text-align: left; font-size: 13px; }
.zp-exp-files:empty { display: none; }
.zp-exp-files li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

.zp-exp-key { font-size: 11px; opacity: .85; }

@media (max-width: 1100px) {
    .zp-exp-grid { grid-template-columns: minmax(0, 1fr); }
    .zp-exp-main .zp-block { margin-right: -28px; }
    .zp-exp-side { position: static; padding: 0 0 22px; }
    .zp-exp-drop { min-height: 0; }
}
@media (max-width: 1023px) {
    .zp-exp-main .zp-block { margin-right: -16px; }
}
@media (max-width: 640px) {
    .zp-w-exp { max-width: none; }
}

/* ---- Document number field with its gear, and Configure <Doc># Preferences
        (Views/Shared/_DocumentNumberField.cshtml) ---- */
.zp-numfield { position: relative; }
.zp-numfield .zp-input { padding-right: 38px; }
.zp-numfield .zp-input[readonly] { background: rgb(var(--c-surface)); color: rgb(var(--c-ink)); cursor: default; }
.zp-numfield-gear { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: rgb(var(--c-primary)); cursor: pointer; }
.zp-numfield-gear:hover, .zp-numfield-gear:focus-visible { background: rgb(var(--c-primary) / 0.08); outline: none; }
.zp-numpref { width: min(580px, calc(100vw - 32px)); }
.zp-numpref-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid rgb(var(--c-line)); background: rgb(var(--c-ground)); border-radius: 8px 8px 0 0; }
.zp-numpref-head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.zp-numpref-x { display: inline-flex; padding: 4px; border: 0; background: transparent; color: rgb(var(--c-danger)); cursor: pointer; border-radius: 4px; }
.zp-numpref-x:hover { background: rgb(var(--c-danger) / 0.08); }
.zp-numpref-body { padding: 18px 20px 6px; font-size: 14px; line-height: 1.55; }
.zp-numpref-body > p { margin: 0 0 14px; }
.zp-numpref-opt { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; cursor: pointer; }
.zp-numpref-opt input { width: 16px; height: 16px; margin: 0; accent-color: rgb(var(--c-primary)); }
.zp-numpref-info { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border: 1px solid rgb(var(--c-muted)); border-radius: 50%; font-size: 10px; font-style: italic; color: rgb(var(--c-muted)); cursor: help; }
.zp-numpref-series { display: flex; gap: 28px; flex-wrap: wrap; margin: 0 0 14px 24px; }
.zp-numpref-series.is-off { opacity: .5; }
.zp-numpref-part { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: rgb(var(--c-ink-soft)); }
.zp-numpref-part .zp-input { width: 120px; }
.zp-numpref-next .zp-input { width: 220px; }
.zp-numpref-body .zp-err { margin: 6px 0 0; }
.zp-numpref-body .zp-help { margin: 6px 0 0; }
.zp-numpref-foot { display: flex; gap: 8px; padding: 14px 20px 18px; margin-top: 10px; border-top: 1px solid rgb(var(--c-line)); }
.zp-default-tick { margin-top: 6px; font-size: 13.5px; color: rgb(var(--c-ink-soft)); }
@media (max-width: 520px) {
    .zp-numpref-series { margin-left: 0; gap: 14px; }
    .zp-numpref-part .zp-input, .zp-numpref-next .zp-input { width: 100%; }
}

/* ---------------------------------------------------------------------------
   Item page (/items/{id}) — Zoho's item view: name with Edit (pencil),
   Adjust Stock and More, then Overview | Transactions | History.
   ------------------------------------------------------------------------ */
.zp-itemview-head {
    margin: -24px -28px 0;
    padding: 14px 22px 10px 28px;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: rgb(var(--c-surface));
}
.zp-itemview-head h1 { margin: 2px 0 0; font-size: 24px; font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.zp-itemview-head .zp-sub { margin-top: 2px; font-size: 13px; color: rgb(var(--c-muted)); }
.zp-itemview-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zp-itemview > .zp-tabs { margin: 0 -28px; padding: 0 28px; }
.zp-itemview-body { padding-top: 18px; }
.zp-itemview-kv { max-width: 560px; margin-bottom: 18px; }
.zp-itemview-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.zp-itemview-cols .zp-side-card + .zp-side-card { margin-top: 0; }
@media (max-width: 760px) { .zp-itemview-cols { grid-template-columns: 1fr; } }

.zp-itemtx-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.zp-itemtx-pick {
    display: inline-flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 12px; box-sizing: border-box;
    border: 1px solid rgb(var(--c-line)); border-radius: 6px;
    background: rgb(var(--c-ground)); color: rgb(var(--c-muted));
    font-size: 14px; cursor: pointer; user-select: none;
}
.zp-itemtx-pick b { color: rgb(var(--c-ink)); font-weight: 500; }
.zp-itemtx-pick:hover { border-color: rgb(var(--c-line-strong)); }
.zp-itemtx-filters .zp-menu a[aria-current="true"] { font-weight: 600; }
.zp-itemtx-table .zp-table th:first-child, .zp-itemtx-table .zp-table td:first-child { padding-left: 12px; }
.zp-itemtx-table .zp-table th:last-child, .zp-itemtx-table .zp-table td:last-child { padding-right: 12px; }

/* ---------------------------------------------------------------------------
   Bank account page (/banking/accounts/{id}) — Zoho's account view: name
   with a switcher, masked number, actions, "Amount in Nexo Books", then the
   Dashboard / Uncategorized / All Transactions tabs.
   ------------------------------------------------------------------------ */
.zp-bankpage-head {
    margin: -24px -28px 0;
    padding: 14px 22px 12px 28px;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    border-bottom: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-surface));
}
.zp-bank-switch > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: rgb(var(--c-ink)); }
.zp-bank-switch > summary svg { color: var(--sh-active, #1F6FE0); flex-shrink: 0; }
.zp-bank-switch h1 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere; }
.zp-bank-switch .zp-menu { min-width: 280px; max-height: 360px; overflow-y: auto; }
.zp-bank-switch .zp-menu a { display: flex; justify-content: space-between; gap: 12px; }
.zp-bank-switch .zp-menu a[aria-current="true"] { font-weight: 600; }
.zp-bank-switch-amt { color: inherit; opacity: .7; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zp-menu-label { display: block; padding: 6px 14px 2px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--c-muted)); }

.zp-bank-amount {
    margin: 0 -28px; padding: 14px 28px;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-surface));
}
.zp-bank-amount-icon {
    width: 46px; height: 46px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgb(var(--c-line)); border-radius: 8px;
    color: var(--sh-active, #1F6FE0); background: rgb(var(--c-ground));
}
.zp-bank-amount span:not(.zp-bank-amount-icon) { display: block; font-size: 13px; color: rgb(var(--c-ink-soft)); }
.zp-bank-amount b { display: block; margin-top: 2px; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }

.zp-banktabs {
    margin: 0 -28px 16px; padding: 8px 28px 0;
    display: flex; gap: 6px; overflow-x: auto;
    border-bottom: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-ground));
}
.zp-banktabs > a {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 20px 12px; min-width: 0;
    border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
    color: rgb(var(--c-ink)); text-decoration: none; white-space: nowrap;
}
.zp-banktabs > a b { font-size: 15px; font-weight: 500; }
.zp-banktabs > a small { font-size: 12.5px; color: rgb(var(--c-muted)); }
.zp-banktabs > a:hover { text-decoration: none; background: rgb(var(--c-surface) / .6); }
.zp-banktabs > a[aria-current="page"] {
    background: rgb(var(--c-surface)); border-color: rgb(var(--c-line));
    margin-bottom: -1px; padding-bottom: 13px;
    box-shadow: 0 -2px 0 var(--sh-active, #1F6FE0) inset;
}
.zp-banktabs-count { color: rgb(var(--c-danger)); }
.zp-bank-subtabs { margin-bottom: 4px; }

.zp-bank-dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.zp-bank-dash .zp-side-card + .zp-side-card { margin-top: 0; }
@media (max-width: 760px) { .zp-bank-dash { grid-template-columns: 1fr; } }

.zp-bankled .zp-table td { vertical-align: top; }
.zp-bankled-sub { display: block; margin-top: 3px; font-size: 12.5px; color: rgb(var(--c-muted)); }
.zp-bankled-manual { color: rgb(var(--c-muted)); }

/* ---------------------------------------------------------------------------
   Record history under a payment, expense or journal (edit reasons included).
   Sits below the A4 sheet at the same width; hidden when printing the sheet.
   --------------------------------------------------------------------------- */
.zp-history { width: 210mm; max-width: 100%; margin: 20px auto 0; box-sizing: border-box; padding: 14px 20px 6px; background: rgb(var(--c-surface)); border: 1px solid rgb(var(--c-line)); border-radius: 6px; }
.zp-history h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: rgb(var(--c-ink)); }
.zp-history .zp-activity li:last-child { border-bottom: 0; }
@media (max-width: 760px) { .zp-history .zp-activity li { grid-template-columns: 1fr; gap: 2px; } }
@media print { .zp-history { display: none; } }
