/* ============================================================
   invoice.css  –  extends portal.css design language
   Header, filter, and report-specific styles for DSPortal
   ============================================================ */

/* ── Page header card ── */
.pr-header {
    background: var(--ts-card);
    border: 1px solid var(--ts-border-light);
    border-top: 3px solid var(--ts-accent);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,38,71,.06), 0 1px 3px rgba(0,38,71,.04);
}

.pr-header-main {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
}

.pr-header-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ts-dark) 0%, var(--ts-dark-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ts-accent);
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0,38,71,.25);
}

.pr-header h2 {
    margin: 0 0 4px;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--ts-dark);
}

.pr-header-sub {
    margin: 0;
    font-size: 0.82rem;
    color: var(--ts-sub);
    font-weight: 400;
}

.pr-header-action {
    margin-left: auto;
    flex-shrink: 0;
}

.pr-header-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px 20px;
    border-top: 1px solid var(--ts-border-lighter);
    padding-top: 16px;
    flex-wrap: wrap;
}

    .pr-header-filter label {
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--ts-muted);
        white-space: nowrap;
        margin: 0;
    }

/* ── Filter card (for report pages) ── */
.pr-filter-card {
    background: var(--ts-card);
    border: 1px solid var(--ts-border);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: var(--ts-shadow);
    margin-bottom: 1.5rem;
}

.pr-filter-row {
    display: flex;
    gap: 14px;
    align-items: stretch;
    flex-wrap: wrap;
}

    .pr-filter-row .us-field {
        flex: 1;
        min-width: 0;
    }

    .us-filter-select {
        width: 100%;
        padding: 8px 32px 8px 12px;
        font-size: .9rem;
        color: #2C3E50;
        cursor: pointer;
        border: 1px solid #de9f25;
        border-radius: 5px;
        background: #f9fafb;
        outline: none;
        margin: 3px;
        box-sizing: border-box;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    }

    .pr-filter-row .pr-filter-btn {
        flex-shrink: 0;
        align-self: flex-end;
        padding-bottom: 1px;
    }

/* ── Inline action buttons (inside table cells) ── */
.iv-action-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.iv-btn {
    padding: 5px 12px;
    border-radius: 7px;
    font-size: .78rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s, transform .1s;
    line-height: 1.4;
    text-decoration: none;
    display: inline-block;
}

    .iv-btn:active { transform: scale(.97); }

.iv-btn-primary  { background: linear-gradient(135deg, var(--ts-accent, #f8b739) 0%, var(--ts-accent-dark, #d9992a) 100%); color: var(--ts-dark, #002647); border: 1px solid var(--ts-accent-dark, #d9992a); box-shadow: 0 2px 8px rgba(248,183,57,.4); }
.iv-btn-dark     { background: var(--ts-header-bg); color: #fff; }
.iv-btn-light    { background: var(--ts-border); color: var(--ts-text); }
.iv-btn-info     { background: var(--ts-info-bg); color: var(--ts-info); border: 1px solid var(--ts-info-border); }

.iv-btn-primary:hover  { background: linear-gradient(135deg, var(--ts-accent-dark, #d9992a) 0%, #b8791e 100%); border-color: #b8791e; color: #fff; box-shadow: 0 4px 12px rgba(248,183,57,.5); opacity: 1; }
.iv-btn-dark:hover     { opacity: .85; color: #fff; }
.iv-btn-light:hover    { background: var(--ts-border-hover); }
.iv-btn-info:hover     { background: var(--ts-info-hover); }

/* ── Invoice status badges ── */
.iv-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.iv-badge-paid {
    background: var(--ts-success-bg);
    color: var(--ts-success);
    border: 1px solid var(--ts-success-border);
}

.iv-badge-cancelled {
    background: var(--ts-danger-bg);
    color: var(--ts-danger);
    border: 1px solid var(--ts-danger-border);
}

/* ── Outstanding amount display ── */
.iv-outstanding {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--ts-card);
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius);
    padding: 10px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.iv-outstanding-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ts-muted);
}

.iv-outstanding-value {
    font-size: .8rem;
    font-weight: 800;
    color: var(--ts-text-dark);
}

/* ── Modal row (form fields inside modals) ── */
.iv-modal-row {
    margin-bottom: 14px;
}

    .iv-modal-row label,
    .iv-modal-row-label {
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--ts-muted);
        display: block;
        margin-bottom: 4px;
    }

/* ── Already-sent warning ── */
.iv-already-sent {
    background: var(--ts-danger-bg);
    border: 1px solid var(--ts-danger-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--ts-danger);
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ── Mobile overrides ── */
@media (max-width: 767px) {
    .pr-header { border-radius: 12px; }
    .pr-header-main {
        display: grid;
        grid-template-columns: 48px 1fr;
        gap: 10px 14px;
        padding: 18px;
        align-items: center;
    }
    .pr-header-icon { width: 48px; height: 48px; font-size: 1.15rem; }
    .pr-header h2 { font-size: 1.2rem; }
    .pr-header-action { grid-column: 1 / -1; display: flex; flex-direction: row; flex-wrap: wrap; gap: .5rem; align-items: center; }
    .pr-header-action .ts-btn { flex: 1 1 calc(50% - .25rem); text-align: center; box-sizing: border-box; }
    .pr-header-action input[type="button"] { flex: 1 1 calc(50% - .25rem); text-align: center; box-sizing: border-box; }
    .pr-header-action label { flex: 1 1 calc(50% - .25rem); box-sizing: border-box; }
    .pr-header-action .us-badge { flex-shrink: 0; width: auto; }
    .pr-header-action .form-select,
    .pr-header-action input[type="text"],
    .pr-header-action input[type="search"],
    .pr-header-action select { width: 100%; box-sizing: border-box; flex: 1 1 100%; }
    .pr-header-filter { padding: 12px 18px 16px; flex-wrap: wrap; }
    .pr-header-filter .us-select { width: 100%; }

    .pr-filter-row { flex-wrap: wrap; }
    .pr-filter-row .us-field { flex: 1 1 calc(50% - 7px); min-width: 130px; }
    .pr-filter-row .pr-filter-btn { width: 100%; }
    .pr-filter-row .pr-filter-btn .ts-btn { width: 100%; text-align: center; }

    /* Filter card fields: full width on mobile */
    .pr-filter-card .us-field { flex: 1 1 100% !important; min-width: 0 !important; }
    .pr-filter-card .dropdown-field { width: 100% !important; min-width: 0 !important; }

    /* Date range: expand to fill available width on mobile */
    .pr-filter-card .us-input { white-space: normal !important; width: 100%; }
    .pr-filter-card .d-inline-flex { flex-wrap: nowrap !important; width: 100%; display: flex; }
    .pr-filter-card .daterange {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box;
    }

    .iv-action-wrap { flex-direction: column; }
    .iv-btn { width: 100%; text-align: center; }

    .iv-outstanding { width: 100%; box-sizing: border-box; }
}

@media (max-width: 600px) {
    .pr-header-filter .us-select { width: 100%; }
}

/* ── Role Impersonation Bar ── */
.pf-imp-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--ts-bg, #fff);
    border: 1px solid var(--ts-border, #e2e6f0);
    border-radius: 10px;
    padding: 8px 14px;
    margin-bottom: 14px;
}
.pf-imp-bar form { display: contents; }
.pf-imp-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ts-muted-text, var(--ts-muted, #9aa5b8));
    white-space: nowrap;
    flex-shrink: 0;
}
.pf-imp-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}
.pf-imp-pill {
    font-size: .78rem;
    font-weight: 600;
    padding: 4px 13px;
    border-radius: 20px;
    border: 1px solid var(--ts-border, #e2e6f0);
    background: transparent;
    color: var(--ts-muted-text, var(--ts-muted, #9aa5b8));
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.4;
}
.pf-imp-pill:hover { background: var(--ts-primary-light, #e8f0fe); color: var(--ts-primary, #002647); border-color: var(--ts-primary-light, #e8f0fe); }
.pf-imp-pill-active { background: var(--ts-primary, #002647) !important; color: #fff !important; border-color: var(--ts-primary, #002647) !important; }
.pf-imp-live {
    font-size: .75rem;
    font-weight: 600;
    color: var(--ts-accent, #de9f25);
    white-space: nowrap;
    background: rgba(248,183,57,.12);
    border-radius: 20px;
    padding: 3px 10px;
}
@media (max-width: 991.98px) {
    .pf-imp-label { display: none; }
    .pf-imp-live { width: 100%; }
}
@media (prefers-color-scheme: dark) {
    .pf-imp-pill-active { background: var(--ts-accent, #de9f25) !important; border-color: var(--ts-accent, #de9f25) !important; color: #000 !important; }
}
:root[data-theme="dark"] .pf-imp-pill-active { background: var(--ts-accent, #de9f25) !important; border-color: var(--ts-accent, #de9f25) !important; color: #000 !important; }

/* ── Most Used quick-links ── */
.pf-quicklinks {
    margin-bottom: 16px;
}
.pf-quicklinks-title {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--ts-muted);
    margin-bottom: 10px;
}
.pf-quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 576px) { .pf-quicklinks-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .pf-quicklinks-grid { grid-template-columns: repeat(8, 1fr); } }

.pf-ql-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    background: var(--ts-card);
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    padding: 24px 16px 20px;
    min-height: 150px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, border-color .15s, transform .15s;
}
.pf-ql-tile:hover {
    box-shadow: 0 8px 28px rgba(0,38,71,.13);
    border-color: var(--ts-accent);
    transform: translateY(-3px);
    color: inherit;
    text-decoration: none;
}
.pf-ql-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--ts-accent-bg, rgba(222,159,37,.12));
    color: var(--ts-accent, #de9f25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 14px;
    flex-shrink: 0;
}
.pf-ql-label {
    font-size: .7rem;
    font-weight: 700;
    color: var(--ts-dark);
    line-height: 1.2;
    margin-bottom: 6px;
}
.pf-ql-count {
    font-size: .68rem;
    color: var(--ts-muted);
}
.pf-ql-tile.pf-ql-nav {
    min-height: 100px;
    padding: 18px 12px 16px;
    justify-content: center;
}
.pf-ql-tile.pf-ql-nav .pf-ql-icon {
    margin-bottom: 10px;
}

/* ============================================================
   Landing / report page tiles (rp-*) — ported from base template.
   These classes are used by all Views/Landing/*.cshtml and
   Views/Report/Reports.cshtml; they were missing from this file,
   so tiles rendered unstyled. Colors come from the --ts-* vars in portal.css.
   ============================================================ */
/* ── Report landing page ── */

/* Two sections side-by-side on desktop, stacked on mobile */
.rp-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
    align-items: start;
}

.rp-section-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ts-muted);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ts-border-light, #eaecf0);
}

/* 2 tiles per row inside every section (works for both mobile & desktop half-width) */
.rp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.rp-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    background: var(--ts-card);
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    padding: 28px 20px 24px;
    min-height: 170px;
    text-decoration: none;
    color: var(--ts-text);
    transition: box-shadow .15s, border-color .15s, transform .15s;
    cursor: pointer;
}

.rp-tile:hover {
    box-shadow: 0 8px 28px rgba(0,38,71,.13);
    border-color: var(--ts-accent);
    transform: translateY(-3px);
    color: var(--ts-text);
    text-decoration: none;
}

.rp-tile-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--ts-accent-bg, rgba(222,159,37,.12));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ts-accent);
    font-size: 1.6rem;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.rp-tile-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ts-dark);
    margin-bottom: 6px;
}

.rp-tile-desc {
    font-size: .76rem;
    color: var(--ts-muted);
    line-height: 1.45;
}

/* Mobile: collapse to single column of sections */
@media (max-width: 767px) {
    .rp-sections-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================================
   Profile hero + stats (pf-hero, pf-stat, pf-reveal) — ported from base template.
   Used by Views/Home/UserProfile.cshtml; these were missing so the profile
   header/stats rendered unstyled. Quick-links (pf-ql, pf-imp) already existed above.
   Colors come from the --ts- vars in portal.css (Aayura brand).
   ============================================================ */

/* ── Hero card ── */
.pf-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 28px 20px 24px;
    background: linear-gradient(145deg, var(--ts-dark) 0%, var(--ts-dark-light, #0d3a6e) 100%);
    border-radius: 18px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,38,71,.2);
}

.pf-hero::before {
    content: "";
    position: absolute;
    right: -70px; top: -70px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(248,183,57,.14) 0%, transparent 65%);
    pointer-events: none;
}

.pf-avatar {
    width: 76px; height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #de9f25 0%, #f0bc45 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -.5px;
    box-shadow: 0 4px 20px rgba(222,159,37,.45);
    border: 3px solid rgba(248,183,57,.3);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.pf-identity {
    position: relative;
    z-index: 1;
}

.pf-hero-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.2;
    letter-spacing: -.2px;
}

.pf-hero-sub {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    font-size: .77rem;
    color: rgba(255,255,255,.5);
}

.pf-hero-sub span {
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 575px) {
    .pf-hero-sub span {
        align-items: flex-start;
    }
    .pf-hero-sub span i {
        flex-shrink: 0;
        margin-top: 2px;
    }
}

.pf-pwd-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.85);
    font-size: .82rem;
    padding: .5rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background .15s, color .15s;
    position: relative;
    z-index: 1;
}

.pf-pwd-btn:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
    text-decoration: none;
}

/* ── pf-hero layout: top row (avatar + name + toggle) ── */
.pf-hero-top {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    position: relative;
    z-index: 1;
}
.pf-hero-top .pf-avatar { flex-shrink: 0; }

.pf-hero-details {
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    transition: max-height .25s ease, opacity .2s ease;
    max-height: 300px;
    opacity: 1;
}

/* Toggle button */
.pf-hero-toggle {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.8);
    border-radius: 7px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
    margin-left: auto;
}
.pf-hero-toggle:hover { background: rgba(255,255,255,.2); }

/* Name visibility */
.pf-name-mobile { flex: 1; text-align: left; margin: 0; }
.pf-name-desktop { display: none; }

/* Mobile: toggle visible, name in top row, details collapsible */
@media (max-width: 575px) {
    .pf-avatar { width: 46px; height: 46px; font-size: 1.2rem; }
    .pf-name-mobile { font-size: 1rem; }
    .pf-hero { align-items: flex-start; text-align: left; }
    .pf-hero-details { align-items: flex-start; }
    .pf-hero-sub { justify-content: flex-start; }
    .pf-hero-collapsed .pf-hero-details {
        max-height: 0;
        opacity: 0;
        pointer-events: none;
    }
    .pf-hero-collapsed { padding-bottom: 20px; }
}

/* Desktop (≥576px): horizontal layout — avatar left, identity middle, change-password right */
@media (min-width: 576px) {
    .pf-hero {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    .pf-hero-toggle { display: none; }
    .pf-name-mobile { display: none; }
    .pf-name-desktop { display: block; }
    .pf-hero-top { width: auto; flex-shrink: 0; }
    .pf-hero-sub { justify-content: flex-start; }
    .pf-hero-details {
        flex: 1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        max-height: none;
        opacity: 1;
        overflow: visible;
    }
}

/* ── Stats strip ── */
.pf-stats-wrap { margin-bottom: 16px; }

.pf-stats-hdr {
    display: none; /* desktop: header hidden */
}

@media (max-width: 575px) {
    .pf-stats-hdr {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
    }
    .pf-stats-hdr-title {
        font-size: .72rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .09em;
        color: var(--ts-muted);
        flex: 1;
    }
    .pf-stats-toggle {
        background: none;
        border: 1px solid var(--ts-border);
        color: var(--ts-muted);
        border-radius: 7px;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .72rem;
        cursor: pointer;
        transition: background .15s, color .15s;
    }
    .pf-stats-toggle:hover { background: var(--ts-border); color: var(--ts-dark); }

    /* Minimised grid: 5 icon-only tiles per row */
    .pf-stats-mini {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 6px !important;
    }
    .pf-stats-mini .pf-stat {
        min-height: auto;
        padding: 10px 4px;
        justify-content: center;
        border-radius: 12px;
    }
    .pf-stats-mini .pf-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 0;
        border-radius: 10px;
    }
    .pf-stats-mini .pf-stat > div:not(.pf-stat-icon) { display: none; }
}

.pf-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 576px) {
    .pf-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .pf-stats {
        /* auto-fill (not auto-fit) so a lone card keeps its size instead of stretching full width */
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        justify-content: start;
    }
}

.pf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    background: var(--ts-card);
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    padding: 24px 16px 20px;
    min-height: 150px;
    transition: box-shadow .15s, border-color .15s, transform .15s;
    cursor: pointer;
}

.pf-stat:hover {
    box-shadow: 0 8px 28px rgba(0,38,71,.13);
    border-color: var(--ts-accent);
    transform: translateY(-3px);
}

a.pf-stat {
    text-decoration: none;
    color: inherit;
}

a.pf-stat:hover {
    text-decoration: none;
    color: inherit;
}

/* Inner text wrapper — full width, centered */
.pf-stat > div:not(.pf-stat-icon) {
    width: 100%;
}

.pf-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--ts-accent-bg, rgba(222,159,37,.12));
    color: var(--ts-accent, #de9f25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.pf-stat-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ts-muted);
    line-height: 1;
    margin-bottom: 6px;
}

.pf-stat-value {
    font-size: clamp(.82rem, 3vw, 1rem);
    font-weight: 700;
    color: var(--ts-dark);
    line-height: 1.2;
}

.pf-reveal-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pf-reveal-val {
    letter-spacing: .05em;
}

.pf-reveal-btn {
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: .45;
    font-size: .78rem;
    flex-shrink: 0;
}

.pf-reveal-btn:hover {
    opacity: .85;
}

.pf-stat-hint {
    font-size: .68rem;
    color: var(--ts-muted);
    margin-top: 5px;
}

/* Colour variants */
.pf-danger .pf-stat-icon  { background: rgba(220,38,38,.1); color: #dc2626; }
.pf-danger .pf-stat-value { color: #dc2626; }
.pf-danger .pf-stat-hint  { color: #dc2626; }
.pf-warn .pf-stat-icon    { background: rgba(245,158,11,.1); color: #d97706; }
.pf-warn .pf-stat-value   { color: #d97706; }
.pf-success .pf-stat-icon  { background: rgba(16,185,129,.1); color: #059669; }
.pf-success .pf-stat-value { color: #059669; }

