/* =====================================================================
   List pages — iOS 26 "Liquid Glass"
   ---------------------------------------------------------------------
   The shared skin of a module's list page (expenses first; leads still
   carries its own copy in leads-ios26.css). Nothing here is a new
   component: the tab bars, the card and the buttons are the platform's,
   restyled only where a list page adds something of its own —

     .nz-list-hero        the large plain title + one line of help, with a
                          running readout on the right (a count, a total)
     .nz-list-statusbar   the status filter strip that sits at the top of
                          the table card. It is a standard `ul.nav.nav-tabs`,
                          so it inherits the capsule skin from
                          assets/scss/_tabs.scss and the sliding selection
                          from assets/js/ios26-tabs.js; this file only gives
                          it its own row, hairline and the dot / count pill.
     .nz-row-btn          a row's own action button (edit, delete, a file
                          preview): a small glass square, red on hover for
                          the destructive one (.nz-row-btn-danger).
     .nz-cell-clamp       a long value cut INSIDE its cell. Tables that opt
                          into data-column-resize pin every column at its
                          first-draw width, so one long title must not make
                          that column 600px forever.

   The hero and the strip are scoped to `.nz-list26` (set on #page-content
   in the view) so they cannot reach any other page. The row button and
   the clamp are global on purpose: the same controller row is drawn on a
   project's or a team member's expenses tab, and it should look the same
   there.

   Every colour comes from the shared --ios26-* / --dtg-* tokens declared
   in app.all.css and apptable-glass.css, which the dark theme
   (body.color-1E202D) re-declares, so dark mode needs no duplicated rules
   here. The few exceptions carry a `body.color-1E202D` prefix +
   !important, because assets/css/color/1E202D.css is injected at RUNTIME
   and wins every tie (see .claude/rules/frontend-ui.md).
   ===================================================================== */

/* ------------------------------------------------------------- hero --- */

.nz-list26 .nz-list-hero {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 4px 4px 18px;
}

.nz-list26 .nz-list-hero-text {
    min-width: 0;
}

.nz-list26 .nz-list-hero h1 {
    margin: 0;
    padding: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.022em;
    color: var(--ios26-text);
}

.nz-list26 .nz-list-hero p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ios26-muted);
}

/* the readout, as an iOS "glass" tile */
.nz-list26 .nz-list-hero-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 8px 18px;
    border: 1px solid var(--ios26-edge);
    border-radius: var(--ios26-radius);
    background: var(--ios26-surface);
    -webkit-backdrop-filter: var(--ios26-blur-sm);
    backdrop-filter: var(--ios26-blur-sm);
    box-shadow: var(--ios26-inset), var(--ios26-shadow-1);
}

.nz-list26 .nz-list-hero-total-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--ios26-text);
}

.nz-list26 .nz-list-hero-total-label {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ios26-muted);
}

/* a hero INSIDE the table card (the contacts tab of /clients: the pane sits under
   the page's own tab strip, so the card stays attached to it and the title moves
   in). Same parts, only the spacing of a card's inner block. */
.nz-list26 .nz-list-hero.nz-list-hero-card {
    padding: 20px 20px 8px;
}

.nz-list26 .nz-list-hero.nz-list-hero-card h1 {
    font-size: 26px;
}

/* in the side-panel (compact) layout the platform hides `.hide-on-compact-view`
   with a two-class rule; the tile's own display:flex above ties it and wins on
   load order, so the hide is restated here at higher specificity */
.compact-view-active .nz-list26 .hide-on-compact-view {
    display: none;
}

/* ------------------------------------------------- the action buttons --- */

/* `.icon-16` only sets width/height — that sizes a Feather <svg>, but an
   FA <i> is a font and needs a font-size. */
.nz-list26 .title-button-group i[class*="fa-"] {
    font-size: 15px;
    line-height: 1;
    vertical-align: -1px;
}

/* ------------------------------------------------ status filter strip --- */

.nz-list26 .nz-list-statusbar {
    padding: 10px 12px 9px;
    border-bottom: 1px solid var(--ios26-hairline);
}

.nz-list26 .nz-list-statusbar .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.nz-list26 .nz-list-statusbar .nav-tabs li {
    float: none;
    flex: 0 0 auto;
}

.nz-list26 .nz-list-statusbar .nav-tabs li a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    font-size: 13px;
}

/* a glyph in front of a tab's label (the payment method strip) */
.nz-list26 .nz-list-statusbar .nav-tabs li a .nz-list-tab-icon {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    font-size: 12px;
    line-height: 1;
    color: var(--ios26-muted);
}

.nz-list26 .nz-list-statusbar .nav-tabs li a.active .nz-list-tab-icon {
    color: var(--ios26-accent-strong);
}

/* the status's own colour, as the iOS list dot */
.nz-list26 .nz-list-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.nz-list26 .nz-list-count {
    flex: 0 0 auto;
    min-width: 20px;
    padding: 1px 7px;
    border-radius: var(--ios26-pill);
    background: var(--ios26-fill);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--ios26-muted);
}

.nz-list26 .nz-list-statusbar .nav-tabs li a.active .nz-list-count {
    background: var(--ios26-accent-soft);
    color: var(--ios26-accent-strong);
}

/* ------------------------------------------------- the row's buttons --- */
/* Only from 800px up: below that apptable-mobile.js moves the row's
   controls into the record card and dresses them as 44px iOS pills. */

@media (min-width: 800px) {
    .dt-container table.dataTable tbody td > .nz-row-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        margin: 0 2px;
        border-radius: 9px;
        background: var(--dtg-hover, rgba(0, 0, 0, 0.06));
        color: var(--dtg-ink, inherit);
        font-size: 13px;
        line-height: 1;
        text-decoration: none;
        vertical-align: middle;
        transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
    }

    /* `.icon-16` sizes the box; the glyph is a font */
    .dt-container table.dataTable tbody td > .nz-row-btn > i {
        width: auto;
        height: auto;
        font-size: 13px;
        line-height: 1;
    }

    .dt-container table.dataTable tbody td > .nz-row-btn:hover,
    .dt-container table.dataTable tbody td > .nz-row-btn:focus-visible {
        background: var(--dtg-accent-ring, rgba(0, 122, 255, 0.18));
        color: var(--dtg-accent, #007aff);
        transform: translateY(-1px);
        outline: 0;
    }

    .dt-container table.dataTable tbody td > .nz-row-btn.nz-row-btn-danger:hover,
    .dt-container table.dataTable tbody td > .nz-row-btn.nz-row-btn-danger:focus-visible {
        background: rgba(255, 69, 58, 0.16);
        color: #ff453a;
    }

    /* a long value is cut inside the cell; the full text is in the tooltip.
       The width is a token so a page can trim it (see .nz-projects26 below)
       and a secondary column (a client name next to the title) can take the
       narrow variant. */
    .dt-container table.dataTable tbody td > .nz-cell-clamp {
        display: inline-block;
        max-width: var(--nz-cell-clamp, 260px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }

    .dt-container table.dataTable tbody td > .nz-cell-clamp.nz-cell-clamp-sm {
        --nz-cell-clamp: 160px;
    }
}

/* ------------------------------------------------------------ projects --- */
/* The projects list pins 9 columns; with the title at the default clamp
   and the four row buttons the table is ~65px wider than a 1400px screen's
   card and the frozen action column then covers Status. 230px keeps every
   column in view there. */
.nz-projects26 {
    --nz-cell-clamp: 230px;
}

/* ------------------------------------------------------- subscriptions --- */
/* Eleven pinned columns (id, title, type, client, two dates, repeat, cycles,
   status, amount) plus four row buttons: the title and the client get the
   narrowest clamps, so the table fits a 1600px screen's card without the
   frozen action column covering Status and Amount. */
.nz-subscriptions26 {
    --nz-cell-clamp: 180px;
}

@media (min-width: 800px) {
    .nz-subscriptions26 .dt-container table.dataTable tbody td > .nz-cell-clamp.nz-cell-clamp-sm {
        --nz-cell-clamp: 120px;
    }
}

/* ------------------------------------------------------------ contacts --- */
/* The client contacts list pins 8 columns (name, company, job title, email,
   phone, last online + the avatar and the row buttons); at the default clamp
   the name and the email alone are 550px, so on a 1400px screen the frozen
   action column covers Last online. 190px / 140px keeps every column in view
   there — and the columns are resizable for the odd long value. */
.nz-contacts26 {
    --nz-cell-clamp: 190px;
}

@media (min-width: 800px) {
    .nz-contacts26 .dt-container table.dataTable tbody td > .nz-cell-clamp.nz-cell-clamp-sm {
        --nz-cell-clamp: 140px;
    }
}

/* --------------------------------------------------------- dark theme --- */

/* 1E202D.css repaints the card and its children after this file loads. */
body.color-1E202D .nz-list26 .nz-list-statusbar {
    border-bottom-color: var(--ios26-hairline) !important;
}

body.color-1E202D .nz-list26 .nz-list-dot {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

body.color-1E202D .nz-list26 .nz-list-count {
    color: var(--ios26-muted) !important;
}

body.color-1E202D .nz-list26 .nz-list-statusbar .nav-tabs li a.active .nz-list-count {
    color: var(--ios26-text) !important;
}

body.color-1E202D .nz-list26 .nz-list-statusbar .nav-tabs li a.active .nz-list-tab-icon {
    color: var(--ios26-text) !important;
}

body.color-1E202D .dt-container table.dataTable tbody td > .nz-row-btn {
    color: var(--dtg-ink, #e6e6ea);
}

/* -------------------------------------------------------- small screens --- */

@media (max-width: 767px) {
    .nz-list26 .nz-list-hero {
        align-items: flex-start;
        gap: 12px;
        padding: 2px 2px 14px;
    }

    .nz-list26 .nz-list-hero h1,
    .nz-list26 .nz-list-hero.nz-list-hero-card h1 {
        font-size: 24px;
    }

    .nz-list26 .nz-list-hero.nz-list-hero-card {
        padding: 14px 12px 6px;
    }

    .nz-list26 .nz-list-hero p {
        font-size: 13px;
    }

    .nz-list26 .nz-list-hero-total {
        padding: 6px 12px;
    }

    .nz-list26 .nz-list-hero-total-value {
        font-size: 19px;
    }

    .nz-list26 .nz-list-statusbar {
        padding: 8px 8px 7px;
    }
}
