/* ==========================================================================
   VA Vault shared list styles (Clients, Project Summary, TimeSheet)
   One look everywhere: rounded rows with a coloured left edge, the same
   hover, the same client tag, filter bar and light menu.
   Each page sets the columns with --vv-cols on .vv-colhead and .vv-row,
   and each row sets its colour with --vv-accent.
   ========================================================================== */

/* ---------- Filter bar (chips + search) ---------- */
.vv-filterbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(19, 35, 59, .08);
    padding: 12px 16px;
}

.vv-filterbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vv-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.vv-chip {
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #dde3ea;
    background: #fff;
    color: #13233b;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

    .vv-chip:hover {
        background: #f6f7fb;
    }

    .vv-chip[aria-pressed="true"] {
        border: 2px solid #1e5fd9;
        background: #eef4ff;
        color: #123f94;
    }

    .vv-chip:focus-visible {
        outline: 2px solid #1e5fd9;
        outline-offset: 2px;
    }

.vv-search {
    position: relative;
}

    .vv-search i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #5b6577;
        font-size: 14px;
        pointer-events: none;
    }

    .vv-search input {
        box-sizing: border-box;
        width: 260px;
        height: 40px;
        border: 1px solid #dde3ea;
        border-radius: 10px;
        padding: 0 12px 0 36px;
        font-size: 14px;
        color: #13233b;
    }

        .vv-search input:focus {
            outline: none;
            border-color: #1e5fd9;
            box-shadow: 0 0 0 3px rgba(30, 95, 217, .15);
        }

/* ---------- Column headings ---------- */
.vv-colhead {
    display: grid;
    grid-template-columns: var(--vv-cols);
    gap: 14px;
    align-items: end;
    padding: 0 18px 0 22px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #5b6577;
}

/* ---------- Rows ---------- */
.vv-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vv-row {
    --vv-accent: #c6cfdb;
    display: grid;
    grid-template-columns: var(--vv-cols);
    gap: 14px;
    align-items: center;
    padding: 12px 18px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid var(--vv-accent);
    box-shadow: 0 1px 3px rgba(19, 35, 59, .08);
    transition: background .15s ease, box-shadow .15s ease;
    font-size: 14px;
    color: #13233b;
}

    .vv-row:hover,
    .vv-row:focus-within {
        background: #f9fafb;
        box-shadow: 0 2px 10px rgba(19, 35, 59, .14), inset 0 0 0 1px var(--vv-accent);
    }

    /* Archived rows: fade the contents, not the row itself. Fading the whole row
   would also fade the menu and let the next row cover it. */
    .vv-row.is-archived > :not(.dropdown) {
        opacity: .7;
    }

    /* The row with an open menu sits above its neighbours */
    .vv-row:focus-within {
        position: relative;
        z-index: 5;
    }

.vv-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.vv-muted {
    color: #5b6577;
}

.vv-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* Title that opens the item (a real button/link for keyboards) */
.vv-title-link {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    font-size: 14.5px;
    color: #13233b;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

    .vv-title-link:hover {
        color: #1e5fd9;
        text-decoration: underline;
    }

    .vv-title-link:focus-visible {
        outline: 2px solid #1e5fd9;
        outline-offset: 2px;
        border-radius: 4px;
    }

/* ---------- Client avatar (rows that ARE a client) ---------- */
.vv-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* ---------- Client tag (rows that BELONG to a client) ---------- */
.vv-client-tag {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #3d4757; /* fallback grey when there's no client colour */
    background: #edf0f5;
}

/* Small grey tags (Archived, Draft...) */
.vv-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 8px;
    background: #eef1f5;
    color: #13233b;
    white-space: nowrap;
}

.vv-tag-archived {
    background: #fff3c4;
    color: #6b5200;
}

/* ---------- Light menu (used on every page) ---------- */
.vv-menu-btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    color: #5b6577;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .vv-menu-btn:hover,
    .vv-menu-btn[aria-expanded="true"] {
        background: #eef1f5;
        color: #13233b;
    }

    .vv-menu-btn:focus-visible {
        outline: 2px solid #1e5fd9;
        outline-offset: 2px;
    }

.vv-menu.dropdown-menu {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(19, 35, 59, .18);
    padding: 6px;
    min-width: 190px;
    font-size: 14px;
    z-index: 1060;
}

.vv-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 9px 12px;
    color: #13233b;
    font-weight: 500;
}

    .vv-menu .dropdown-item i {
        width: 18px;
        text-align: center;
        font-size: 15px;
        color: #5b6577;
    }

    .vv-menu .dropdown-item:hover,
    .vv-menu .dropdown-item:focus {
        background: #f1f4f8;
        color: #13233b;
    }

    .vv-menu .dropdown-item.vv-danger,
    .vv-menu .dropdown-item.vv-danger i {
        color: #c2283e;
    }

        .vv-menu .dropdown-item.vv-danger:hover,
        .vv-menu .dropdown-item.vv-danger:focus {
            background: #fde8eb;
        }

.vv-menu .dropdown-divider {
    margin: 6px 4px;
    border-color: #eef1f5;
}

/* ---------- Empty / no results ---------- */
.vv-none {
    padding: 32px 16px;
    text-align: center;
    color: #5b6577;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(19, 35, 59, .08);
}

/* ===== Invoice draft: "Client sees time: By task | By day" ===== */
.vv-lines-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

    .vv-lines-head h2.inv-h {
        margin-bottom: 0;
    }

.vv-lines-show {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #3d4757;
}

.vv-seg {
    display: inline-flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
}

    .vv-seg button {
        border: 0;
        background: transparent;
        border-radius: 8px;
        padding: 6px 12px;
        font: 500 13px 'Inter', system-ui, sans-serif;
        color: #3d4757;
        cursor: pointer;
    }

        .vv-seg button[aria-pressed="true"] {
            background: #fff;
            color: #123f94;
            font-weight: 600;
            box-shadow: 0 1px 2px rgba(19, 35, 59, .12);
        }

        .vv-seg button:focus-visible {
            outline: 2px solid #1e5fd9;
            outline-offset: 2px;
        }

        .vv-seg button:disabled {
            opacity: .6;
            cursor: not-allowed;
        }

.vv-lines-note {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f6f7fb;
    font-size: 12.5px;
    color: #5b6577;
}


@media (prefers-reduced-motion: reduce) {
    .vv-row {
        transition: none;
    }
}

@media (max-width: 576px) {
    .vv-search, .vv-search input {
        width: 100%;
    }
}
