/* Annual Notice Tracker popovers and modals.

   Not CSS-isolated: these classes are shared by components under Shared/Tracker/ that are rendered
   from more than one page (Account View and, next, Plan Detail), and isolation would scope them to
   whichever component happened to declare them. */

.tracker-popover-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    z-index: 1000;
}

.tracker-popover,
.tracker-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
    padding: 16px 18px;
    max-height: 82vh;
    overflow-y: auto;
}

.tracker-popover {
    width: 460px;
}

.tracker-modal {
    width: 520px;
}

/* Mockup .dns-popover — the Generated/Sent pill card is a NARROW 260px card
   (280 here for the app font), not the 460px mark-as popover. */
.tracker-pill-popover {
    width: 280px;
}

.tracker-filter-modal,
.tracker-column-modal {
    width: 560px;
}

.tracker-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

    .tracker-popover-header h4 {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: #1d1d1f;
    }

.tracker-popover-close {
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
}

.tracker-modal h3 {
    margin: 0 0 12px 0;
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
}

.tracker-modal h4,
.tracker-filter-section h4 {
    margin: 14px 0 8px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.tracker-popover-divider {
    height: 1px;
    background: #ececf0;
    margin: 12px 0;
}

.tracker-popover-hint {
    font-size: 12.5px;
    color: #6b7280;
    margin: 0 0 10px 0;
}

/* ── document info card (FR-35) ─────────────────────────────────────────────────── */

.tracker-doc-info {
    background: #fafafa;
    border: 1px solid #f0f0f2;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.tracker-doc-row {
    display: flex;
    gap: 12px;
    padding: 3px 0;
    font-size: 12.5px;
}

/* §2.2.7 file-card rows only: name left, size right. The icon-row doc cards
   (mark-as / pill popovers) must NOT inherit space-between — it shoved their
   values to the far edge. */
.tracker-doc-row.tracker-doc-split {
    justify-content: space-between;
}

.tracker-doc-label {
    color: #6b7280;
}

.tracker-doc-value {
    color: #1d1d1f;
    font-weight: 500;
}

.tracker-view-pdf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 5px 11px;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    background: #ffffff;
    font-size: 12.5px;
    color: #0066cc;
    cursor: pointer;
}

    .tracker-view-pdf svg {
        width: 14px;
        height: 14px;
    }

/* ── mark-as action list (FR-5/6) ───────────────────────────────────────────────── */

.tracker-popover-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 8px;
}

.tracker-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #ffffff;
    font-size: 12.5px;
    color: #1d1d1f;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s;
}

    .tracker-action-btn:hover:not(:disabled) {
        background: #f5f5f7;
    }

    .tracker-action-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .tracker-action-btn.action-issue {
        color: #b45309;
    }

    .tracker-action-btn.action-remove {
        grid-column: 1 / -1;
        color: #b91c1c;
    }

        .tracker-action-btn.action-remove svg {
            width: 15px;
            height: 15px;
        }

/* ── upload zone (FR-17) ────────────────────────────────────────────────────────── */

.tracker-upload-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 8px;
}

.tracker-drop-zone {
    display: block;
    border: 2px dashed #d6d6db;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    color: #6b7280;
}

    .tracker-drop-zone:hover {
        border-color: #0066cc;
        color: #0066cc;
    }

    /* Upload in flight — inert and visibly so (the input itself is disabled; this removes the
       hover affordance so the zone does not look clickable while the server is storing). */
    .tracker-drop-zone.is-busy,
    .tracker-upload-btn.is-busy {
        pointer-events: none;
        opacity: 0.6;
        cursor: default;
    }

    .tracker-drop-zone.is-busy:hover {
        border-color: #d6d6db;
        color: inherit;
    }

    .tracker-drop-zone svg {
        width: 24px;
        height: 24px;
        margin-bottom: 6px;
    }

    .tracker-drop-zone p {
        margin: 0;
        font-size: 12.5px;
    }

    /* The input is an INVISIBLE OVERLAY across the whole zone (not display:none) so the
       browser's native file drag & drop lands on it and fires OnChange; clicking anywhere
       in the zone opens the picker the same way. */
    .tracker-drop-zone input[type=file] {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

.tracker-file-hint {
    font-size: 11px !important;
    color: #9ca3af;
    margin-top: 3px !important;
}

.tracker-selected-file {
    margin-top: 8px;
    font-size: 12px;
    color: #1d1d1f;
}

/* ── exclude confirmation modal (FR-39/FR-7, mockup .exclude-plan-modal) ─────────── */

.tracker-confirm-modal {
    /* Mockup .exclude-plan-modal — exact: 440px, 24px padding, 0.22s slide-up entrance. */
    width: 440px;
    padding: 24px;
    animation: tracker-confirm-slide 0.22s ease;
}

/* The entrance animation MUST carry the base centering translate — a bare translateY
   replaces transform entirely and the modal paints top-left-anchored for one frame
   (the filter-modal first-frame-jump bug). */
@keyframes tracker-confirm-slide {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* Mockup .exclude-plan-body — without this the body <p> renders at the app default
   (16px, near-black) and the copy + its <strong> read oversized/too dark. */
.tracker-confirm-modal p {
    font-size: 13.5px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 18px 0;
}

/* Mockup footer buttons: 9×18 padding, 13px, radius 7; cancel 1.5px border + 500 weight;
   confirm red gradient + soft red shadow, lifting on hover. */
.tracker-confirm-modal .tracker-btn-secondary,
.tracker-confirm-modal .tracker-btn-primary,
.tracker-confirm-modal .tracker-btn-danger {
    padding: 9px 18px;
    font-size: 13px;
    border-radius: 7px;
}

.tracker-confirm-modal .tracker-btn-muted {
    border-width: 1.5px;
    font-weight: 500;
}

.tracker-confirm-modal .tracker-btn-danger {
    border: none;
    font-weight: 600;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.28);
    transition: all 0.15s;
}

    .tracker-confirm-modal .tracker-btn-danger:hover:not(:disabled) {
        background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
        transform: translateY(-1px);
    }

.tracker-confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

    .tracker-confirm-header h3 {
        margin: 0;
    }

.tracker-confirm-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fee2e2;
    color: #991b1b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    /* Restore is constructive — green icon circle (same pattern, different intent). */
    .tracker-confirm-icon.is-restore {
        background: #dcfce7;
        color: #15803d;
    }

/* ── upload validation modal (§2.2.7 / FR-17, mockup #uploadValidationOverlay) ──── */

.upload-validation-modal {
    width: 460px;
    padding: 24px;
}

.upload-validation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

    .upload-validation-header h3 {
        margin: 0;
    }

.upload-validation-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fee2e2;
    color: #991b1b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-validation-body {
    font-size: 13.5px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.upload-validation-detail {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12.5px;
    color: #991b1b;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .upload-validation-detail .file-row {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        color: #7f1d1d;
    }

        .upload-validation-detail .file-row svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        .upload-validation-detail .file-row .file-size {
            margin-left: auto;
            font-weight: 700;
            white-space: nowrap;
        }

.upload-validation-rules {
    font-size: 12px;
    color: #b91c1c;
}

.upload-validation-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ── messages ───────────────────────────────────────────────────────────────────── */

.tracker-popover-message {
    margin-top: 12px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12.5px;
}

    .tracker-popover-message.is-refusal {
        background: #fef2f2;
        color: #991b1b;
    }

.tracker-popover-note {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f7f7fa;
    font-size: 12.5px;
    color: #4b5563;
}

    .tracker-popover-note p {
        margin: 0 0 6px 0;
    }

        .tracker-popover-note p:last-child {
            margin-bottom: 0;
        }

.tracker-popover-blocked {
    background: #fffbeb;
    color: #92400e;
}

/* ── notes (FR-14) — mockup §2.2.5 verbatim (notice-tracker-account.html 2556-3192) ── */

/* Centered flex overlay — the modal never anchors to the clicked icon (fixes the
   first-frame position jump the anchored style produced). */
.notes-popover-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-popover {
    width: 720px;
    max-width: 94%;
    max-height: 92vh;
    background: white;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    animation: notesSlideUp 0.22s ease;
}

@keyframes notesSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.notes-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 8px 24px;
}

    .notes-popover-header h4 {
        font-size: 15px;
        font-weight: 700;
        color: #1d1d1f;
        margin: 0;
    }

.notes-popover-plan {
    font-weight: 500;
    color: #6b7280;
    font-size: 12px;
    margin-left: 6px;
}

.notes-popover-body {
    padding: 12px 24px 4px 24px;
    overflow-y: auto;
}

.notes-meta-row-summary {
    display: flex;
    margin-bottom: 8px;
}

.notes-log-summary {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #7c5cdb;
    background: #f0ebff;
    padding: 4px 10px;
    border-radius: 10px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.notes-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px 2px 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eef0f3;
}

.notes-log-empty {
    text-align: center;
    padding: 22px 12px;
    color: #9ca3af;
    font-size: 12.5px;
    font-style: italic;
}

.notes-log-entry {
    border: 1.5px solid #e5e5e7;
    border-radius: 10px;
    padding: 10px 12px;
    background: white;
    position: relative;
    transition: opacity 0.15s, background 0.15s;
}

    .notes-log-entry.kind-client {
        border-color: #c7e8ce;
        background: #fbfefb;
    }

    .notes-log-entry.kind-plannotice {
        border-color: #d9cef4;
        background: #faf9fe;
    }

    .notes-log-entry.kind-internal {
        border-color: #f3b4b4;
        border-style: dashed;
        background: #fff5f5;
    }

    .notes-log-entry.is-resolved {
        background: #f5f5f7;
        border-color: #e5e5e7;
        border-style: solid;
        color: #6b7280;
    }

        .notes-log-entry.is-resolved .entry-text,
        .notes-log-entry.is-resolved .entry-author {
            color: #6b7280;
        }

    .notes-log-entry .entry-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
        flex-wrap: wrap;
    }

    .notes-log-entry .entry-kind-pill {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 9.5px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 2px 7px;
        border-radius: 10px;
    }

        .notes-log-entry .entry-kind-pill.client { background: #16a34a; color: white; }
        .notes-log-entry .entry-kind-pill.plannotice { background: #7c5cdb; color: white; }
        .notes-log-entry .entry-kind-pill.internal { background: #dc2626; color: white; }

    .notes-log-entry.is-resolved .entry-kind-pill {
        opacity: 0.55;
    }

    .notes-log-entry .entry-author {
        font-size: 12px;
        font-weight: 600;
        color: #1d1d1f;
    }

    .notes-log-entry .entry-time {
        font-size: 11px;
        color: #9ca3af;
        margin-left: auto;
    }

    .notes-log-entry .entry-text {
        font-size: 13px;
        color: #1d1d1f;
        line-height: 1.45;
        white-space: pre-wrap;
        word-break: break-word;
    }

    .notes-log-entry .entry-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 8px;
    }

    .notes-log-entry .entry-resolved-meta {
        font-size: 11px;
        color: #6b7280;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

        .notes-log-entry .entry-resolved-meta svg {
            width: 12px;
            height: 12px;
        }

    .notes-log-entry .entry-resolve-btn {
        display: inline-flex;
        align-items: center;
        margin-left: auto;
        gap: 5px;
        padding: 4px 10px;
        font-size: 11.5px;
        font-weight: 600;
        background: white;
        border: 1px solid #d2d2d7;
        border-radius: 6px;
        color: #4b5563;
        cursor: pointer;
        transition: all 0.15s;
    }

        .notes-log-entry .entry-resolve-btn svg {
            width: 12px;
            height: 12px;
        }

        .notes-log-entry .entry-resolve-btn:hover {
            background: #f0fdf4;
            color: #15803d;
            border-color: #86efac;
        }

    .notes-log-entry.is-resolved .entry-resolve-btn {
        background: white;
        color: #6b7280;
        border-color: #d2d2d7;
    }

        .notes-log-entry.is-resolved .entry-resolve-btn:hover {
            background: #fff7ed;
            color: #c2410c;
            border-color: #fdba74;
        }

/* Per-entry "Assigned to" inline select */
.entry-footer .entry-assigned {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    margin-right: auto;
}

    .entry-footer .entry-assigned svg {
        width: 12px;
        height: 12px;
        color: #9ca3af;
        flex-shrink: 0;
    }

.entry-footer .entry-assigned-select {
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    color: #1d1d1f;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 3px 6px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

    .entry-footer .entry-assigned-select:hover {
        border-color: #b6a3e8;
        background: #faf7ff;
    }

    .entry-footer .entry-assigned-select:focus {
        border-color: #7c5cdb;
        background: #faf7ff;
        box-shadow: 0 0 0 2px rgba(124, 92, 219, 0.15);
    }

.notes-log-entry.is-resolved .entry-assigned-select {
    background: #ffffff;
    color: #6b7280;
}

/* Collapsible "Resolved history" section */
.notes-resolved-section {
    margin-top: 10px;
    border-top: 1px dashed #e5e7eb;
    padding-top: 10px;
}

.notes-resolved-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.15s;
}

    .notes-resolved-toggle:hover {
        background: #f3f4f6;
        color: #1d1d1f;
    }

    .notes-resolved-toggle .chevron {
        width: 14px;
        height: 14px;
        transition: transform 0.2s ease;
    }

.notes-resolved-section.expanded .notes-resolved-toggle .chevron {
    transform: rotate(90deg);
}

.notes-resolved-count {
    background: #e5e7eb;
    color: #4b5563;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: auto;
    letter-spacing: 0.04em;
}

.notes-resolved-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

/* Add new note section */
.notes-add-section {
    background: #fafbfc;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    padding: 12px;
}

.notes-add-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.notes-add-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.notes-add-tabs {
    display: inline-flex;
    background: white;
    border: 1px solid #e5e5e7;
    border-radius: 7px;
    padding: 2px;
    gap: 2px;
}

.notes-add-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: #6b7280;
    background: transparent;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
}

    .notes-add-tab:hover {
        color: #1d1d1f;
    }

    .notes-add-tab.active[data-kind="plannotice"] {
        background: #ede9fb;
        color: #5a3fbe;
    }

    .notes-add-tab.active[data-kind="internal"] {
        background: #fde2e2;
        color: #dc2626;
    }

.notes-add-subtitle {
    font-size: 11.5px;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.4;
}

.notes-textarea {
    width: 100%;
    min-height: 70px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    background: white;
    color: #1d1d1f;
    line-height: 1.5;
}

    .notes-textarea:focus {
        border-color: #7c5cdb;
    }

.notes-popover-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 24px 20px 24px;
}

.notes-btn-cancel {
    padding: 8px 16px;
    border: 1.5px solid #e5e5e7;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #b4b4b8;
    cursor: pointer;
    transition: all 0.15s;
}

    .notes-btn-cancel:hover {
        color: #6b7280;
        border-color: #d2d2d7;
        background: #fafafa;
    }

.notes-btn-save {
    padding: 8px 18px;
    border: none;
    background: linear-gradient(135deg, #7c5cdb 0%, #8b6ce8 100%);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 92, 219, 0.25);
    transition: all 0.15s;
}

    .notes-btn-save:hover:not(:disabled) {
        background: linear-gradient(135deg, #6d4dcb 0%, #7c5cdb 100%);
        transform: translateY(-1px);
    }

    .notes-btn-save:disabled {
        background: #d6cef0;
        cursor: not-allowed;
        box-shadow: none;
    }

/* ── filters + columns ──────────────────────────────────────────────────────────── */

.tracker-filter-section.is-disabled {
    opacity: 0.5;
}

.tracker-filter-hint {
    margin-left: 8px;
    font-size: 10.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #9ca3af;
}

.tracker-filter-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 12px;
}

.tracker-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: #1d1d1f;
    cursor: pointer;
}

.tracker-filter-row {
    display: flex;
    gap: 16px;
}

    .tracker-filter-row label,
    .tracker-add-column label {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 12px;
        color: #6b7280;
    }

    .tracker-filter-row select,
    .tracker-add-column select {
        padding: 6px 8px;
        border: 1px solid #e5e5e7;
        border-radius: 8px;
        font-size: 12.5px;
        color: #1d1d1f;
    }

.tracker-column-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1px solid #f0f0f2;
    border-radius: 9px;
    margin-bottom: 6px;
}

.tracker-column-label {
    font-size: 13px;
    color: #1d1d1f;
}

.tracker-column-actions {
    display: flex;
    gap: 4px;
}

.tracker-icon-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #e5e5e7;
    border-radius: 6px;
    background: #ffffff;
    color: #4b5563;
    cursor: pointer;
    font-size: 12px;
}

    .tracker-icon-btn.is-danger {
        color: #b91c1c;
    }

    .tracker-icon-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.tracker-add-column {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Status Legend (mockup #legendModal .legend-*) ──────────────────────────────── */

.tracker-legend-modal {
    width: 92vw;
    max-width: 780px;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 0;
}

.tracker-legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 26px 6px 26px;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 5;
}
.tracker-legend-header h3 { font-size: 20px; font-weight: 700; color: #1d1d1f; margin: 0; }
.tracker-legend-header p { margin: 2px 0 0 0; font-size: 13px; color: #6b7280; }

.tracker-legend-body { padding: 4px 26px 22px 26px; }

.tracker-legend-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 20px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.tracker-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
}

.tracker-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    transition: background 0.12s;
}
.tracker-legend-item:hover { background: #f7f7f9; }

.tracker-legend-icon {
    flex-shrink: 0;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overall Status pills are variable-width — wider left-aligned icon column. */
.tracker-legend-pills .tracker-legend-icon { width: 96px; justify-content: flex-start; }

.tracker-legend-text { display: flex; flex-direction: column; min-width: 0; }
.tracker-legend-label { font-size: 13px; font-weight: 600; color: #1d1d1f; line-height: 1.25; }
.tracker-legend-desc { font-size: 11.5px; color: #6b7280; line-height: 1.3; }

/* ── buttons ────────────────────────────────────────────────────────────────────── */

.tracker-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* Mockup .exclude-plan-footer — the exclude/restore confirms SPLIT the footer (Cancel far
   left, the colored action far right); other confirms stay right-grouped. */
.tracker-confirm-actions.is-split {
    justify-content: space-between;
}

/* Mockup .exclude-plan-cancel — deliberately muted so the colored action carries the weight. */
.tracker-btn-muted {
    background: #ffffff;
    border-color: #e5e5e7;
    color: #b4b4b8;
}

    .tracker-btn-muted:hover {
        color: #6b7280;
        border-color: #d2d2d7;
        background: #fafafa;
    }

.tracker-btn-primary,
.tracker-btn-secondary,
.tracker-btn-danger {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.tracker-btn-primary {
    background: #0066cc;
    color: #ffffff;
}

.tracker-btn-secondary {
    background: #ffffff;
    border-color: #e5e5e7;
    color: #4b5563;
}

.tracker-btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.tracker-btn-primary:disabled,
.tracker-btn-danger:disabled,
.tracker-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tracker-confirm p {
    font-size: 12.5px;
    color: #4b5563;
    margin: 0 0 6px 0;
}

/* FR-21 — default tracker columns: reorderable, never removable */
.tracker-icon-btn.is-locked {
    cursor: default;
    opacity: 0.55;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Add columns modal (mockup "Add columns" dialog, FR-21) ─────────────────────────── */
.ant-addcol-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.ant-addcol-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0ebff;
    color: #7c5cdb;
    flex-shrink: 0;
}
.ant-addcol-icon svg { width: 20px; height: 20px; }
.ant-addcol-titles h3 { margin: 0; font-size: 18px; font-weight: 700; color: #1d1d1f; }
.ant-addcol-titles p { margin: 2px 0 0; font-size: 12.5px; color: #6e6e73; }
.ant-addcol-close {
    margin-left: auto;
    border: none;
    background: none;
    font-size: 20px;
    line-height: 1;
    color: #9a9aa0;
    cursor: pointer;
}
.ant-addcol-close:hover { color: #1d1d1f; }
.ant-addcol-section { margin: 0 0 2px; font-size: 14.5px; font-weight: 700; color: #1d1d1f; }
.ant-addcol-hint { margin: 0 0 12px; font-size: 12.5px; color: #6e6e73; }
.ant-addcol-list { display: flex; flex-direction: column; gap: 10px; }
.ant-addcol-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e5e7;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.ant-addcol-option:hover { border-color: #7c5cdb; background: #faf8ff; }
.ant-addcol-option input[type="checkbox"] { width: 16px; height: 16px; accent-color: #7c5cdb; }

/* ══════════════════════════════════════════════════════════════════════════════════
   POPOVER / MODAL SPEC POLISH (Zain 2026-08-13) — exact values from
   notice-tracker-account.html; appended overrides, later rules win.
   ══════════════════════════════════════════════════════════════════════════════════ */

/* ── Mark-as / upload popover chrome (.upload-popover): 440px, radius 10, spec shadow ── */
/* Mockup .upload-popover is 440px in Inter; the app font renders ~10% wider at 13px, so the
   same labels need ~500px for the mockup's visual result — one line each, only the longest
   ("Plan Notice waiting on notice") wrapping. */
.tracker-popover {
    width: 500px;
    max-width: 94vw;
    background: #fff;
    border: 1px solid #e5e5e7;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    padding: 20px;
}
/* The pill card must RE-narrow after the 500px override above — same specificity,
   so the later rule wins; without this the Generated/Sent card renders 500px and
   clips past the right viewport edge (AnchorStyle clamps for 280). */
.tracker-popover.tracker-pill-popover { width: 280px; }
.tracker-popover-header h4 { font-size: 14px; font-weight: 700; color: #1d1d1f; margin: 0; }
.tracker-popover-close {
    width: 24px;
    height: 24px;
    color: #86868b;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    border: none;
    background: none;
    cursor: pointer;
}
.tracker-popover-close:hover { background: #f0f0f2; }

/* "Mark as:" title + TWO-COLUMN action grid (mockup .pcol pair: waiting variants flow
   down the left column, the rest down the right). */
.tracker-popover-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    padding: 0 10px;
    margin-bottom: 8px;
}
/* Mockup .popover-action-list / .pcol — two explicit columns (waiting family left, rest right). */
.tracker-action-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
}

.tracker-action-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Mockup bulk header count pill. */
.tracker-bulk-count {
    font-size: 11px;
    font-weight: 600;
    color: #7c5cdb;
    background: #f0ebff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}
.tracker-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    text-align: left;
}
.tracker-action-btn:hover:not(:disabled) { background: #f5f5f7; }
.tracker-action-btn.action-issue:hover:not(:disabled) { background: #fffbeb; }
.tracker-action-btn.action-remove { color: #b42318; margin-top: 4px; padding-top: 10px; }
.tracker-action-btn.action-remove:hover:not(:disabled) { background: #fef2f2; }
/* Every action-button glyph is icon-sized — an unsized inline SVG defaults to
   300×150 and swallows the popover (the giant-checkmark bug). */
.tracker-action-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Document info card: soft gradient, bordered, label/value rows, purple View PDF */
.tracker-doc-info {
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f9 100%);
    border: 1px solid #e8eaed;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
}
.tracker-doc-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.tracker-doc-row + .tracker-doc-row { border-top: 1px solid #e8eaed; }
/* Mockup .doc-info-icon — 28px white circle with the calendar/person glyph. */
.tracker-doc-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
}
.tracker-doc-icon svg { width: 14px; height: 14px; }
.tracker-doc-text { display: flex; flex-direction: column; min-width: 0; }
.tracker-doc-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 1px;
}
.tracker-doc-value {
    font-size: 12.5px;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tracker-view-pdf {
    margin-top: 12px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #ddd5f3;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #7c5cdb;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.15s;
}
.tracker-view-pdf:hover { background: #f5f1ff; border-color: #7c5cdb; box-shadow: 0 2px 6px rgba(124, 92, 219, 0.18); }
.tracker-view-pdf:active { transform: translateY(1px); }
.tracker-view-pdf svg { width: 14px; height: 14px; }

/* Upload zone per spec */
.tracker-upload-label {
    font-size: 12px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 12px 0 8px;
}
.tracker-drop-zone {
    display: block;
    position: relative; /* anchors the invisible InputFile overlay */
    border: 2px dashed #d2d2d7;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.tracker-drop-zone:hover { border-color: #7c5cdb; background: #faf8ff; }
/* Mockup .dragover — the zone lights up while a file hovers over it. */
.tracker-drop-zone.dragover { border-color: #7c5cdb; background: #f5f1ff; }
.tracker-drop-zone svg { width: 28px; height: 28px; color: #94a3b8; }
.tracker-drop-zone p { font-size: 13px; color: #6e6e73; margin: 6px 0 0; }
.tracker-drop-zone p strong { color: #7c5cdb; }
.tracker-drop-zone .tracker-file-hint { font-size: 11px; color: #94a3b8; }

/* Mockup .upload-btn-small — the full-width purple Upload Document button under the zone
   (a second label for the same InputFile, so it opens the identical picker). */
.tracker-upload-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #7c5cdb 0%, #8b6ce8 100%);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 92, 219, 0.25);
    transition: all 0.15s;
}

    .tracker-upload-btn:hover {
        background: linear-gradient(135deg, #6d4dcb 0%, #7c5cdb 100%);
    }

/* (Notes modal styles live in the FR-14 mockup-verbatim block above — the component
   was rebuilt on the mockup's own class names, so no .tracker-notes-* rules remain.) */
/* Slide-up for TRANSFORM-CENTERED modals (.tracker-modal's translate(-50%,-50%)): the
   keyframes must carry the centering translate in every frame — a bare translateY here
   REPLACES the base transform for the animation's duration, so the modal first paints
   with its top-left at the viewport midpoint and then JUMPS to center when the
   animation ends (the first-frame position jump previously fixed on the notes modal). */
@keyframes ant-notes-slide-up {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ── Filter modal: 760px, radius 16, spec section titles + footer buttons ── */
.tracker-filter-modal {
    width: 92vw;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    animation: ant-notes-slide-up 0.3s ease;
}
.tracker-filter-row { display: flex; gap: 16px; margin-bottom: 24px; }
.tracker-filter-section > label:first-child,
.tracker-filter-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: block;
}
.tracker-filter-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.tracker-filter-option:hover { background: #f5f5f7; }
.tracker-filter-option input[type="checkbox"] { width: 18px; height: 18px; accent-color: #7c5cdb; }

/* ── Shared footer buttons: spec Reset/Apply pair ── */
.tracker-btn-secondary {
    padding: 10px 28px;
    border: 1.5px solid #e5e5e7;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}
.tracker-btn-secondary:hover:not(:disabled) { background: #f5f5f7; border-color: #d2d2d7; }
.tracker-btn-primary {
    padding: 10px 28px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c5cdb 0%, #8b6ce8 100%);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s;
}
.tracker-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d4dcb 0%, #7c5cdb 100%);
    box-shadow: 0 4px 12px rgba(124, 92, 219, 0.3);
}
.tracker-btn-primary:disabled { background: #d6cef0; cursor: not-allowed; }

/* PDF preview modal — the popover "View PDF" / "View combined notice" actions render the
   document in place (browser PDF viewer in an iframe) instead of downloading it. */
.tracker-pdf-modal {
    width: min(920px, 94vw);
    height: 86vh;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .tracker-pdf-modal iframe {
        flex: 1;
        width: 100%;
        border: none;
        border-radius: 8px;
        background: #f3f4f6;
    }

/* ── Filter Plans dropdowns (mockup .filter-dropdown: chip trigger + searchable
      checkbox menu). The modal shell/footer widths live above (760px block). ── */
.tracker-filter-row .tracker-filter-section { flex: 1; min-width: 0; }

.tracker-filter-title {
    font-size: 13px;
    font-weight: 700;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.tracker-filter-section.is-disabled .tracker-filter-dd { pointer-events: none; }

.tracker-filter-dd { position: relative; }

.tracker-filter-dd-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1.5px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}
.tracker-filter-dd-trigger:hover { border-color: #86868b; }
.tracker-filter-dd.open .tracker-filter-dd-trigger {
    border-color: #7c5cdb;
    box-shadow: 0 0 0 3px rgba(124, 92, 219, 0.1);
}
.tracker-filter-dd-trigger svg {
    width: 16px;
    height: 16px;
    color: #86868b;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.tracker-filter-dd.open .tracker-filter-dd-trigger svg { transform: rotate(180deg); }

.tracker-filter-dd-placeholder { color: #86868b; font-size: 14px; }

.tracker-filter-dd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    margin-right: 8px;
}
.tracker-filter-dd-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f0ebff;
    border-radius: 4px;
    font-size: 12px;
    color: #7c5cdb;
    font-weight: 500;
}

.tracker-filter-dd-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid #d2d2d7;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1500;
    max-height: 280px;
    overflow: hidden;
}
.tracker-filter-dd-search {
    padding: 10px;
    border-bottom: 1px solid #e5e5e7;
}
.tracker-filter-dd-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #d2d2d7;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}
.tracker-filter-dd-search input:focus { border-color: #7c5cdb; }

.tracker-filter-dd-options {
    overflow-y: auto;
    max-height: 220px;
    padding: 6px;
}
.tracker-filter-dd-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
}
.tracker-filter-dd-option:hover { background: #f5f5f7; }
.tracker-filter-dd-option.selected { background: #f0ebff; }
.tracker-filter-dd-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7c5cdb;
    pointer-events: none; /* the row handles the click */
}
.tracker-filter-dd-option span { font-size: 13.5px; color: #1d1d1f; }

.tracker-filter-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

/* FR-8 — the Satisfied popover's explainer sits INSIDE the doc card (mockup layout). */
.tracker-satisfied-note {
    font-size: 12.5px;
    color: #374151;
    line-height: 1.45;
    margin: 0 0 10px 0;
}
