:root {
    --jv-surface: #ffffff;
    --jv-surface-soft: #fffaf0;
    --jv-border: #e4e7ec;
    --jv-text: #172032;
    --jv-muted: #667085;
    --jv-brand: #7d1738;
    --jv-gold: #d49b28;
    --jv-focus: rgba(212, 155, 40, .22);
    --jv-radius: 12px;
    --jv-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
}

body {
    line-height: 1.45;
}

main {
    width: 100%;
}

.card {
    border-color: var(--jv-border);
    border-radius: var(--jv-radius);
    box-shadow: var(--jv-shadow);
}

.card h2 {
    margin-bottom: 18px;
    color: var(--jv-text);
}

.page-head {
    margin-bottom: 24px;
}

.page-head .muted {
    margin: 7px 0 0;
}

input,
select,
textarea {
    min-height: 42px;
    border-color: #cfd5df;
    background-color: var(--jv-surface);
    color: var(--jv-text);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

textarea {
    min-height: 96px;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #aeb7c5;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--jv-gold);
    box-shadow: 0 0 0 3px var(--jv-focus);
    outline: 0;
}

input:disabled,
select:disabled,
textarea:disabled {
    background: #f2f4f7;
    color: #667085;
}

.primary,
.secondary,
.search button {
    min-height: 40px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}

.primary:hover,
.secondary:hover,
.search button:hover {
    transform: translateY(-1px);
}

.primary:focus-visible,
.secondary:focus-visible,
.search button:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--jv-focus);
    outline-offset: 2px;
}

.metrics {
    gap: 18px;
}

.metrics .card {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metrics .card span {
    color: var(--jv-muted);
    font-weight: 500;
}

.metrics .card strong {
    letter-spacing: -.3px;
}

.readonly-notice,
.trial-usage {
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    font-weight: 700;
    line-height: 1;
}

table thead th {
    color: #667085;
    font-weight: 700;
    background: #fafbfc;
}

table tbody tr {
    transition: background-color .12s ease;
}

table tbody tr:hover {
    background: #fffcf6;
}

table tbody tr:last-child td {
    border-bottom: 0;
}

.search {
    align-items: center;
}

.search input {
    max-width: 420px;
}

.prosys-link,
.landing-brand-footer a {
    color: inherit;
    font-weight: 650;
    text-decoration: none;
}

.prosys-link:hover,
.prosys-link:focus-visible,
.landing-brand-footer a:hover,
.landing-brand-footer a:focus-visible {
    color: var(--jv-brand);
    text-decoration: underline;
}

.document-details-card {
    display: grid;
    gap: 22px;
}

.document-details-card > h2 {
    margin-bottom: 0;
}

.copy-source-panel {
    max-width: 940px;
    padding: 16px;
    border: 1px solid #eadfce;
    border-radius: 10px;
    background: #fffcf6;
}

.copy-source-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}

.copy-source-heading strong {
    color: var(--jv-text);
}

.optional-badge {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
}

.copy-source-controls {
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) minmax(300px, 1.35fr);
    gap: 10px;
    align-items: end;
}

.copy-blank-button {
    white-space: nowrap;
}

.copy-source-field {
    display: grid;
    gap: 6px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
}

.copy-source-panel > small {
    display: block;
    margin-top: 10px;
}

.valuation, .valuation > .card, .items-wrap, .table-responsive {
    min-width: 0;
    max-width: 100%;
}
.valuation { grid-template-columns: minmax(0, 1fr); }
.items-wrap { width: 100%; overflow-x: auto; padding-bottom: 12px; }
.items-table { width: 100%; }
.items-table td:not(:nth-child(2)) { white-space: nowrap; }
.items-table th { white-space: normal; }
.items-table td:last-child { padding-right: 16px; }
.valuation .items-table { min-width: 1320px; }
.valuation .items-table input[type="file"] { width: 150px; }

/* Read-only report: allocate space for all nine columns, including the value. */
.items-wrap .valuation-details-table { min-width: 900px; table-layout: fixed; font-size: 13px; }
.valuation-details-table th { font-size: 10px; overflow-wrap: anywhere; }
.valuation-details-table td { white-space: normal !important; overflow-wrap: anywhere; vertical-align: middle; }
.valuation-details-table th:nth-child(1) { width: 4%; }
.valuation-details-table th:nth-child(2) { width: 19%; }
.valuation-details-table th:nth-child(3) { width: 9%; }
.valuation-details-table th:nth-child(4) { width: 10%; }
.valuation-details-table th:nth-child(5) { width: 9%; }
.valuation-details-table th:nth-child(6) { width: 11%; }
.valuation-details-table th:nth-child(7) { width: 11%; }
.valuation-details-table th:nth-child(8) { width: 7%; }
.valuation-details-table th:nth-child(9) { width: 20%; text-align: right; }
.valuation-details-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.valuation-details-table img { max-width: 100%; height: auto; max-height: 64px; object-fit: contain; }
.page-head { flex-wrap: wrap; }
.page-head > div { min-width: 0; }
.register-pagination { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--jv-muted); }
.register-pagination > div { display: flex; align-items: center; gap: 12px; }
.register-pagination .secondary:disabled { opacity: .5; cursor: default; transform: none; }
main > .card, .data-card, .table-responsive { min-width: 0; max-width: 100%; }
.document-grid {
    align-items: start;
}

@media (max-width: 900px) {
    .copy-source-controls {
        grid-template-columns: 1fr 1fr;
    }

    .copy-blank-button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 680px) {
    .copy-source-controls {
        grid-template-columns: 1fr;
    }

    .copy-blank-button {
        width: 100%;
    }

    .metrics .card {
        min-height: 94px;
    }
}

.site-header {
    position: relative;
    z-index: 30;
}

.site-nav {
    gap: 4px;
}

.site-nav .nav-link,
.site-nav > a:not(.nav-trial) {
    position: relative;
    padding: 9px 11px;
    border-radius: 8px;
    color: #344054;
    font-weight: 550;
    line-height: 1.2;
}

.site-nav .nav-link:hover,
.site-nav > a:not(.nav-trial):hover {
    color: var(--jv-brand);
    background: #fff4f6;
}

.site-nav .nav-link.active {
    color: var(--jv-brand);
    background: #f8e9ee;
    font-weight: 750;
}

.site-nav .nav-link.active::after {
    content: "";
    position: absolute;
    right: 11px;
    bottom: 4px;
    left: 11px;
    height: 2px;
    border-radius: 2px;
    background: var(--jv-gold);
}

.site-nav form {
    margin: 0;
}

.nav-toggle {
    display: none;
    min-height: 40px;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid #d7dce4;
    border-radius: 8px;
    background: #fff;
    color: var(--jv-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.prosys-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667085;
    text-decoration: none;
}

.prosys-brand-link > span {
    font-size: 11px;
    white-space: nowrap;
}

.prosys-brand-link img {
    display: block;
    width: 116px;
    height: 34px;
    object-fit: contain;
    border-radius: 3px;
}

.prosys-brand-link:hover,
.prosys-brand-link:focus-visible {
    color: var(--jv-brand);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
}

.metrics .metric-card {
    min-height: 118px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.metric-card > div {
    min-width: 0;
}

.metric-icon {
    display: grid !important;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    background: #fff3d9;
    color: #965e00 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
}

.onboarding-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.progress-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.onboarding-steps a {
    transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}

.onboarding-steps a:hover {
    border-color: #d49b28;
    box-shadow: 0 5px 15px rgba(16, 24, 40, .06);
    transform: translateY(-1px);
}

.recent-card .section-head {
    margin-bottom: 12px;
}

.recent-card .section-head h2 {
    margin-bottom: 3px;
}

.recent-card .section-head p {
    font-size: 13px;
}

.table-responsive {
    overflow-x: auto;
}

.table-action {
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.empty-state {
    display: grid;
    justify-items: center;
    padding: 34px 20px 25px;
    text-align: center;
}

.empty-state-icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    margin-bottom: 13px;
    border-radius: 14px;
    background: #fff3d9;
    color: #965e00;
    font-size: 27px;
}

.empty-state h3 {
    margin: 0;
    color: var(--jv-text);
    font-size: 18px;
}

.empty-state p {
    max-width: 430px;
    margin: 7px 0 17px;
    color: var(--jv-muted);
}

.data-card {
    padding: 0;
    overflow: hidden;
}

.data-card-head {
    padding: 20px 22px 8px;
}

.data-card-head h2 {
    margin-bottom: 3px;
}

.data-card table th:first-child,
.data-card table td:first-child {
    padding-left: 22px;
}

.data-card table th:last-child,
.data-card table td:last-child {
    padding-right: 22px;
}

.admin-users-table {
    min-width: 1320px;
}

.compact-empty-state {
    padding-top: 22px;
    padding-bottom: 15px;
}

@media (max-width: 900px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 760px) {
    .site-header {
        min-height: 64px;
        padding: 8px 16px;
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 12px;
        left: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px;
        border: 1px solid var(--jv-border);
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 18px 40px rgba(16, 24, 40, .14);
    }

    .site-header.nav-open .site-nav {
        display: flex;
    }

    .site-nav .nav-link,
    .site-nav > a,
    .site-nav form,
    .site-nav form button {
        width: 100%;
        text-align: left;
    }

    .site-nav .nav-link,
    .site-nav > a {
        justify-content: flex-start;
        padding: 11px 12px;
    }

    .site-nav .nav-link.active::after {
        top: 9px;
        right: auto;
        bottom: 9px;
        left: 3px;
        width: 3px;
        height: auto;
    }

    .site-nav .nav-trial {
        display: flex;
        min-height: 40px;
        align-items: center;
    }

    .dashboard-head {
        align-items: stretch;
    }

    .page-actions > * {
        flex: 1 1 auto;
    }

    .footer-brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
}

@media (max-width: 680px) {
    .dashboard-metrics {
        grid-template-columns: 1fr !important;
    }

    .metrics .metric-card {
        min-height: 96px;
    }

    .onboarding-heading {
        flex-direction: column;
    }
}
