/* ============================================================================
   VRFS Partners — the ledger.
   ----------------------------------------------------------------------------
   A money screen for eleven people who want one question answered: what did I
   earn? So the design is an instrument, not a brochure. Dark ground, one
   accent, and a single number allowed to dominate. Everything numeric is set
   in a monospace with tabular figures so columns align to the digit and a
   changing value never reflows.

   Written as plain CSS on purpose. Filament ships precompiled CSS, so arbitrary
   utility classes in a custom page simply do not exist in the stylesheet — that
   is why the first cut rendered as unstyled runs of text. This file needs no
   build step, which also keeps node off the production host.

   Accent is #00D460, the interactive green from the VRFS design system. Text on
   it is always near-black: white on this green measures 1.98:1 and fails AA.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    --pv-ground: #0a0d0c;
    --pv-surface: #111614;
    --pv-surface-raised: #161d1a;
    --pv-line: #232d29;
    --pv-line-soft: #1a221f;

    --pv-ink: #e9efec;
    --pv-ink-dim: #8b9a94;
    --pv-ink-faint: #5d6b65;

    --pv-accent: #00d460;
    --pv-accent-dim: #00a34a;
    --pv-accent-glow: rgba(0, 212, 96, 0.14);

    --pv-sans: 'Archivo', ui-sans-serif, system-ui, sans-serif;
    --pv-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

    --pv-radius: 4px;
    --pv-gap: 1.5rem;
}

/* ── Reset Filament's shell to the ledger ground ─────────────────────────── */

.fi-body,
.fi-layout,
.fi-main-ctn {
    background: var(--pv-ground) !important;
    color: var(--pv-ink);
    font-family: var(--pv-sans);
}

.fi-topbar > nav,
.fi-topbar {
    background: var(--pv-surface) !important;
    border-bottom: 1px solid var(--pv-line) !important;
    box-shadow: none !important;
}

.fi-topbar .fi-logo,
.fi-topbar h1 {
    font-family: var(--pv-sans);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pv-ink) !important;
}

/* The page is a ledger, not a document: let it use the width it has, but stop
   short of edge-to-edge on an ultrawide, where a 20-column table becomes a
   trek for the eye. The panel runs in top-navigation mode, so there is no
   sidebar reserving a column beside this. */
.fi-main {
    max-width: 1500px !important;
    margin-inline: auto !important;
}

/* No sidebar, at all.
   Top-navigation mode still renders the sidebar element for the mobile drawer,
   and the main container keeps the inline padding reserved for it. There is no
   navigation to put in a drawer — the panel is one screen and the account menu
   lives in the topbar — so the element is removed and the reserved gutter with
   it. Without the padding reset the sidebar disappears but its column of empty
   space does not. */
.fi-sidebar,
.fi-sidebar-open,
.fi-topbar-open-sidebar-btn {
    display: none !important;
}

.fi-main-ctn,
.fi-layout > .fi-main-ctn {
    padding-inline-start: 0 !important;
    margin-inline-start: 0 !important;
    inset-inline-start: 0 !important;
    width: 100% !important;
}

/* Filament's own page heading is redundant — the masthead below carries it. */
.fi-page-header,
.fi-header-heading {
    display: none !important;
}

/* ── Masthead ────────────────────────────────────────────────────────────── */

.pv-masthead {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--pv-gap);
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--pv-line);
    margin-bottom: 1.75rem;
}

.pv-eyebrow {
    font-family: var(--pv-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pv-ink-faint);
    margin-bottom: 0.5rem;
}

.pv-partner-name {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
    color: var(--pv-ink);
    margin: 0;
}

.pv-window {
    font-family: var(--pv-mono);
    font-size: 0.8125rem;
    color: var(--pv-ink-dim);
    font-variant-numeric: tabular-nums;
}

.pv-window strong {
    color: var(--pv-ink);
    font-weight: 500;
}

/* ── The hero figure ─────────────────────────────────────────────────────── */

.pv-hero {
    text-align: right;
}

.pv-hero-value {
    font-family: var(--pv-mono);
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--pv-accent);
    font-variant-numeric: tabular-nums;
    display: block;
    /* A restrained glow: this is the number people came for. */
    text-shadow: 0 0 32px var(--pv-accent-glow);
}

.pv-hero-zero {
    color: var(--pv-ink-faint);
    text-shadow: none;
}

.pv-hero-note {
    font-size: 0.75rem;
    color: var(--pv-ink-faint);
    margin-top: 0.375rem;
    max-width: 32ch;
    margin-left: auto;
    line-height: 1.4;
}

/* ── Stat strip ──────────────────────────────────────────────────────────── */

.pv-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    background: var(--pv-line);
    border: 1px solid var(--pv-line);
    border-radius: var(--pv-radius);
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.pv-stat {
    background: var(--pv-surface);
    padding: 1.125rem 1.25rem;
}

.pv-stat-label {
    font-family: var(--pv-mono);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pv-ink-faint);
    margin-bottom: 0.5rem;
}

.pv-stat-value {
    font-family: var(--pv-mono);
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--pv-ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.pv-stat-sub {
    font-size: 0.75rem;
    color: var(--pv-ink-faint);
    margin-top: 0.25rem;
}

/* ── Panels ──────────────────────────────────────────────────────────────── */

.pv-panel {
    background: var(--pv-surface);
    border: 1px solid var(--pv-line);
    border-radius: var(--pv-radius);
    margin-bottom: 1.75rem;
}

.pv-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pv-line-soft);
}

.pv-panel-title {
    font-family: var(--pv-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pv-ink-dim);
}

.pv-panel-body {
    padding: 1.25rem;
}

/* ── Controls ────────────────────────────────────────────────────────────── */

.pv-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.875rem;
    margin-bottom: 1.75rem;
}

.pv-field {
    display: flex;
    flex-direction: column;
    gap: 0.4375rem;
}

.pv-field-grow {
    flex: 1 1 260px;
    min-width: 0;
}

.pv-label {
    font-family: var(--pv-mono);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pv-ink-faint);
}

.pv-input {
    font-family: var(--pv-mono);
    font-size: 0.875rem;
    color: var(--pv-ink);
    background: var(--pv-ground);
    border: 1px solid var(--pv-line);
    border-radius: var(--pv-radius);
    padding: 0.5625rem 0.75rem;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pv-input::placeholder {
    color: var(--pv-ink-faint);
}

.pv-input:focus {
    outline: none;
    border-color: var(--pv-accent-dim);
    box-shadow: 0 0 0 3px var(--pv-accent-glow);
}

.pv-input-weeks {
    width: 5.5rem;
}

.pv-btn {
    font-family: var(--pv-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.625rem 1.25rem;
    border-radius: var(--pv-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.pv-btn:active {
    transform: translateY(1px);
}

/* Near-black on green: white here measures 1.98:1 and fails AA. */
.pv-btn-primary {
    background: var(--pv-accent);
    color: #04120a;
}

.pv-btn-primary:hover {
    background: #17e874;
}

.pv-btn-ghost {
    background: transparent;
    color: var(--pv-ink-dim);
    border-color: var(--pv-line);
}

.pv-btn-ghost:hover {
    color: var(--pv-ink);
    border-color: var(--pv-ink-faint);
}

/* ── SKU chips ───────────────────────────────────────────────────────────── */

.pv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pv-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    background: var(--pv-surface-raised);
    border: 1px solid var(--pv-line);
    border-radius: 999px;
    padding: 0.3125rem 0.75rem;
    font-size: 0.8125rem;
}

.pv-chip-sku {
    font-family: var(--pv-mono);
    font-weight: 500;
    color: var(--pv-ink);
}

.pv-chip-units {
    font-family: var(--pv-mono);
    color: var(--pv-ink-dim);
    font-variant-numeric: tabular-nums;
}

.pv-chip-pay {
    font-family: var(--pv-mono);
    color: var(--pv-accent);
    font-variant-numeric: tabular-nums;
}

/* ── Chart ───────────────────────────────────────────────────────────────── */

.pv-chart-wrap {
    position: relative;
    height: 320px;
    padding: 1.25rem;
}

/* ── Ledger table ────────────────────────────────────────────────────────── */

.pv-table-scroll {
    overflow-x: auto;
}

.pv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.pv-table th,
.pv-table td {
    /* The generous horizontal padding is the fix for the columns running
       together — a table with no cell padding reads as one string. */
    padding: 0.6875rem 1rem;
    white-space: nowrap;
}

.pv-table thead th {
    font-family: var(--pv-mono);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pv-ink-faint);
    font-weight: 500;
    text-align: right;
    border-bottom: 1px solid var(--pv-line);
    position: sticky;
    top: 0;
    background: var(--pv-surface);
}

.pv-table thead th:first-child,
.pv-table tbody td:first-child {
    text-align: left;
}

.pv-table tbody td {
    font-family: var(--pv-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: var(--pv-ink);
    border-bottom: 1px solid var(--pv-line-soft);
}

.pv-table tbody tr:hover td {
    background: var(--pv-surface-raised);
}

.pv-date {
    color: var(--pv-ink-dim);
}

.pv-nil {
    color: var(--pv-ink-faint);
}

.pv-cell-total {
    color: var(--pv-ink);
    font-weight: 500;
}

.pv-cell-pay {
    color: var(--pv-accent);
    font-weight: 500;
}

.pv-table tfoot td {
    font-family: var(--pv-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--pv-line);
    color: var(--pv-ink);
    font-weight: 600;
    background: var(--pv-surface-raised);
}

.pv-table tfoot td:first-child {
    text-align: left;
    font-family: var(--pv-mono);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pv-ink-faint);
    font-weight: 500;
}

/* A hairline under the date column keeps the eye from sliding across rows. */
.pv-table tbody td:first-child {
    border-right: 1px solid var(--pv-line-soft);
}

.pv-table thead th:first-child {
    border-right: 1px solid var(--pv-line);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.pv-empty {
    padding: 3rem 1.25rem;
    text-align: center;
    color: var(--pv-ink-faint);
    font-size: 0.875rem;
}

.pv-empty-mark {
    font-family: var(--pv-mono);
    font-size: 1.75rem;
    color: var(--pv-line);
    margin-bottom: 0.75rem;
}

/* ── Footnote ────────────────────────────────────────────────────────────── */

.pv-footnote {
    font-size: 0.75rem;
    color: var(--pv-ink-faint);
    line-height: 1.6;
    padding-top: 0.5rem;
    border-top: 1px solid var(--pv-line-soft);
    margin-top: 0.5rem;
}

.pv-footnote code {
    font-family: var(--pv-mono);
    color: var(--pv-ink-dim);
}

/* ── Login ───────────────────────────────────────────────────────────────── */

/* The door to a money screen. It should feel like equipment being unlocked,
   not a newsletter signup: tight, dark, precise, one accent. */

.fi-simple-layout {
    background:
        radial-gradient(60rem 32rem at 50% -12%, rgba(0, 212, 96, 0.10), transparent 70%),
        linear-gradient(180deg, #0c100e 0%, var(--pv-ground) 55%) !important;
    position: relative;
    min-height: 100vh;
}

/* A faint engineering grid. Atmosphere without decoration for its own sake. */
.fi-simple-layout::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--pv-line-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--pv-line-soft) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.5;
    -webkit-mask-image: radial-gradient(60rem 40rem at 50% 30%, #000 0%, transparent 75%);
    mask-image: radial-gradient(60rem 40rem at 50% 30%, #000 0%, transparent 75%);
    pointer-events: none;
}

.fi-simple-main-ctn {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

.fi-simple-main {
    background: rgba(17, 22, 20, 0.92) !important;
    border: 1px solid var(--pv-line) !important;
    border-radius: 6px !important;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.03) inset,
        0 32px 80px -16px rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(12px);
    max-width: 26rem !important;
    padding: 2.5rem 2.25rem !important;
    position: relative;
    overflow: hidden;
}

/* Hairline of accent along the top edge — the one flourish. */
.fi-simple-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--pv-accent), transparent);
    opacity: 0.7;
}

/* Brand block. Filament renders the brand name and the "Sign in" heading; both
   were inheriting dark-on-dark. */
.fi-simple-header {
    text-align: left !important;
    margin-bottom: 1.75rem !important;
}

.fi-simple-header-heading,
.fi-simple-main h1,
.fi-simple-main h2 {
    font-family: var(--pv-sans) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
    color: var(--pv-ink) !important;
    text-align: left !important;
}

.fi-simple-header-subheading,
.fi-simple-main .fi-logo {
    font-family: var(--pv-mono) !important;
    font-size: 0.6875rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: var(--pv-accent) !important;
    text-align: left !important;
    justify-content: flex-start !important;
}

/* Field labels — these were the near-black text on the dark card. */
.fi-simple-main .fi-fo-field-wrp-label,
.fi-simple-main label,
.fi-simple-main .fi-fo-field-wrp-label span {
    font-family: var(--pv-mono) !important;
    font-size: 0.625rem !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: var(--pv-ink-dim) !important;
    font-weight: 500 !important;
}

/* Required marker: a quiet dot, not a shouting red asterisk. */
.fi-simple-main .fi-fo-field-wrp-label sup,
.fi-simple-main sup {
    color: var(--pv-ink-faint) !important;
}

/* Inputs — were blinding white. */
.fi-simple-main .fi-input-wrp,
.fi-simple-main .fi-input-wrp:not(:has(.fi-input:focus)) {
    background: var(--pv-ground) !important;
    border: 1px solid var(--pv-line) !important;
    border-radius: var(--pv-radius) !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fi-simple-main .fi-input-wrp:focus-within {
    border-color: var(--pv-accent-dim) !important;
    box-shadow: 0 0 0 3px var(--pv-accent-glow) !important;
}

.fi-simple-main .fi-input {
    background: transparent !important;
    color: var(--pv-ink) !important;
    font-family: var(--pv-mono) !important;
    font-size: 0.875rem !important;
    padding: 0.75rem 0.875rem !important;
    box-shadow: none !important;
}

.fi-simple-main .fi-input::placeholder {
    color: var(--pv-ink-faint) !important;
}

/* Password reveal button */
.fi-simple-main .fi-input-wrp-suffix button,
.fi-simple-main .fi-icon-btn {
    color: var(--pv-ink-faint) !important;
    background: transparent !important;
}

.fi-simple-main .fi-input-wrp-suffix button:hover,
.fi-simple-main .fi-icon-btn:hover {
    color: var(--pv-ink-dim) !important;
}

/* Remember me */
.fi-simple-main .fi-checkbox-input {
    background: var(--pv-ground) !important;
    border: 1px solid var(--pv-line) !important;
    border-radius: 3px !important;
    width: 1rem !important;
    height: 1rem !important;
}

.fi-simple-main .fi-checkbox-input:checked {
    background-color: var(--pv-accent) !important;
    border-color: var(--pv-accent) !important;
    /* Near-black tick: white on this green fails AA. */
    color: #04120a !important;
}

.fi-simple-main .fi-fo-checkbox .fi-fo-field-wrp-label,
.fi-simple-main .fi-fo-checkbox label {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: var(--pv-sans) !important;
    font-size: 0.8125rem !important;
    color: var(--pv-ink-dim) !important;
}

/* Submit */
.fi-simple-main .fi-btn,
.fi-simple-main button[type='submit'] {
    background: var(--pv-accent) !important;
    /* Near-black on green throughout: white measures 1.98:1 and fails AA. */
    color: #04120a !important;
    font-family: var(--pv-sans) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    letter-spacing: 0.01em !important;
    border: none !important;
    border-radius: var(--pv-radius) !important;
    padding: 0.75rem 1rem !important;
    box-shadow: 0 0 24px -6px var(--pv-accent-glow) !important;
    transition: background 0.15s ease, transform 0.05s ease;
}

.fi-simple-main .fi-btn:hover,
.fi-simple-main button[type='submit']:hover {
    background: #17e874 !important;
}

.fi-simple-main .fi-btn:active {
    transform: translateY(1px);
}

.fi-simple-main .fi-btn .fi-btn-label {
    color: #04120a !important;
}

/* Validation messages */
.fi-simple-main .fi-fo-field-wrp-error-message {
    font-family: var(--pv-mono) !important;
    font-size: 0.75rem !important;
    color: #ff6b81 !important;
}

/* A closing line: this page is IP-restricted, and saying so turns a confusing
   403 into an expected one. */
.fi-simple-main::after {
    content: 'Restricted access · VRFS partner accounts only';
    display: block;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--pv-line-soft);
    font-family: var(--pv-mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pv-ink-faint);
    text-align: center;
}

@media (max-width: 640px) {
    .pv-masthead {
        flex-direction: column;
        align-items: flex-start;
    }

    .pv-hero {
        text-align: left;
    }

    .pv-hero-note {
        margin-left: 0;
    }
}
