
/* =========================================================
   MODERN DESIGN SYSTEM
========================================================= */

:root {
    /* Brand */
    --brand: #b34a16;
    --brand-dark: #8e370c;
    --brand-light: #fdf1ea;
    --brand-ring: rgba(179, 74, 22, 0.12);

    --gold: #c78a32;

    /* Neutrals */
    --ink: #1a1a1a;
    --ink-soft: #4a4a4a;
    --ink-mute: #8a8a8a;
    --ink-faint: #b0b0b0;

    --surface: #ffffff;
    --surface-2: #faf9f8;
    --surface-3: #f4f2f0;
    --page: #f0efed;

    --line: #e8e5e1;
    --line-soft: #f0edea;

    /* Status */
    --green: #16a34a;
    --amber: #d97706;
    --red: #dc2626;

    /* Shape */
    --r-xs: 8px;
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(20, 15, 10, 0.04);
    --shadow-md: 0 4px 16px rgba(20, 15, 10, 0.06);
    --shadow-lg: 0 12px 40px rgba(20, 15, 10, 0.09);
    --shadow-xl: 0 24px 60px rgba(20, 15, 10, 0.12);
}

/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
    -webkit-appearance: none;
    appearance: none;
}

/* =========================================================
   LAYOUT SHELL
========================================================= */

.vr-app {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 100px;
}

/* =========================================================
   HEADER — Modern glassy brand bar
========================================================= */

.vr-header {
    position: relative;
    overflow: hidden;

    background: linear-gradient(135deg, #8e370c 0%, #b34a16 55%, #c95a1e 100%);

    color: #fff;
    padding: 44px 44px 48px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    isolation: isolate;
}

/* decorative glow orbs */
.vr-header::before,
.vr-header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.vr-header::before {
    width: 380px;
    height: 380px;
    right: -140px;
    top: -200px;
    background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 65%);
}

.vr-header::after {
    width: 300px;
    height: 300px;
    right: 60px;
    bottom: -220px;
    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
}

.vr-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 6px 14px 6px 10px;
    margin-bottom: 18px;

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 100px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.vr-brand-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.vr-header h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    max-width: 720px;
    font-size: clamp(24px, 3.2vw, 36px);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.vr-header p {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

/* =========================================================
   FORM BODY
========================================================= */

.vr-form {
    background: var(--surface);
    padding: 44px;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    box-shadow: var(--shadow-lg);
}

/* =========================================================
   SECTION
========================================================= */

.vr-section {
    margin-bottom: 48px;
}

.vr-section:last-of-type {
    margin-bottom: 0;
}

.vr-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.vr-section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;

    background: var(--brand-light);
    color: var(--brand);

    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.vr-section-title {
    margin: 0 0 2px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.vr-section-description {
    margin: 0;
    color: var(--ink-mute);
    font-size: 12.5px;
    line-height: 1.5;
}

/* =========================================================
   INPUT GRID
========================================================= */

.vr-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.vr-field.full {
    grid-column: 1 / -1;
}

.vr-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.1px;
}

.required {
    color: var(--brand);
    font-weight: 700;
}

.vr-field input,
.vr-field select,
.vr-field textarea {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--ink);
    outline: none;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.vr-field input,
.vr-field select {
    height: 52px;
    padding: 0 16px;
}

.vr-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    cursor: pointer;
}

.vr-field textarea {
    min-height: 150px;
    padding: 15px 16px;
    resize: vertical;
    line-height: 1.6;
}

.vr-field input::placeholder,
.vr-field textarea::placeholder {
    color: var(--ink-faint);
}

.vr-field input:hover,
.vr-field select:hover,
.vr-field textarea:hover {
    border-color: #d5cfc8;
}

.vr-field input:focus,
.vr-field select:focus,
.vr-field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
    background: #fff;
}

/* =========================================================
   EVALUATION GROUP CARD
========================================================= */

.vr-evaluation-group {
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.vr-evaluation-group:hover {
    box-shadow: var(--shadow-md);
    border-color: #ded8d2;
}

.vr-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 18px 22px;
    background: linear-gradient(180deg, #fbfaf9 0%, #f7f5f3 100%);
    border-bottom: 1px solid var(--line-soft);
}

.vr-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.2px;
}

.vr-group-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 30px;
    height: 24px;
    padding: 0 8px;

    background: var(--brand);
    color: #fff;
    border-radius: 6px;

    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.vr-group-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 100px;

    color: var(--ink-mute);
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.vr-group-score strong {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}

/* =========================================================
   RATING ROW
========================================================= */

.vr-rating-list {
    display: flex;
    flex-direction: column;
}

.vr-rating-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;

    padding: 16px 22px;
    border-bottom: 1px solid var(--line-soft);
    transition: background 0.15s ease;
}

.vr-rating-item:last-child {
    border-bottom: 0;
}

.vr-rating-item:hover {
    background: #fffdfb;
}

.vr-rating-info {
    min-width: 0;
}

.vr-rating-name {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.45;
}

.vr-rating-help {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 11.5px;
    line-height: 1.4;
}

/* =========================================================
   RATING BUTTONS — Desktop
========================================================= */

.vr-rating-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.vr-rating-button {
    position: relative;
    width: 34px;
    height: 34px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r-xs);

    color: var(--ink-mute);
    font-size: 11.5px;
    font-weight: 600;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease,
        box-shadow 0.15s ease;
}

.vr-rating-button:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-light);
    transform: translateY(-1px);
}

.vr-rating-button:active {
    transform: scale(0.94);
}

.vr-rating-button.selected {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 3px 10px rgba(179, 74, 22, 0.28);
    transform: none;
}

.vr-rating-button.selected:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    transform: none;
}

/* =========================================================
   STICKY SCORE DASHBOARD
========================================================= */

.vr-score-panel {
    position: sticky;
    bottom: 20px;
    z-index: 30;

    display: grid;
    grid-template-columns: auto minmax(200px, 1fr) auto;
    align-items: center;
    gap: 22px;

    margin-top: 28px;
    padding: 18px 24px;

    background: rgba(255, 252, 250, 0.92);
    border: 1.5px solid #ecd9cb;
    border-radius: var(--r-md);

    box-shadow: 0 12px 36px rgba(60, 35, 15, 0.12);

    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
}

.vr-score-circle {
    width: 62px;
    height: 62px;
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, var(--brand) 0%, #c95a1e 100%);
    color: #fff;
    border-radius: 50%;

    box-shadow: 0 6px 18px rgba(179, 74, 22, 0.3);
}

.vr-score-circle strong {
    font-size: 19px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.vr-score-circle span {
    font-size: 9px;
    opacity: 0.85;
    margin-top: 2px;
}

.vr-score-info {
    min-width: 0;
}

.vr-score-info > strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
}

.vr-score-info > span {
    display: block;
    margin-top: 1px;
    color: var(--ink-mute);
    font-size: 11.5px;
}

.vr-progress {
    width: 100%;
    height: 6px;
    margin-top: 9px;
    overflow: hidden;
    background: #ece3db;
    border-radius: 100px;
}

.vr-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--brand) 0%, #d4702f 100%);
    border-radius: inherit;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vr-completed {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 100px;

    color: var(--ink-soft);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* =========================================================
   FINAL EVALUATION
========================================================= */

.vr-final-box {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
    gap: 20px;
}

.vr-overall-card {
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}

.vr-overall-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.vr-overall-card p {
    margin: 0 0 20px;
    color: var(--ink-mute);
    font-size: 12px;
    line-height: 1.5;
}

.vr-overall-input {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vr-overall-input input {
    width: 120px;
    height: 64px;

    background: var(--surface-2);
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);

    text-align: center;
    font-size: 26px;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -1px;

    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.vr-overall-input input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
    background: #fff;
}

.vr-overall-input span {
    color: var(--ink-mute);
    font-size: 15px;
    font-weight: 600;
}

.vr-performance-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    padding: 26px 22px;
    min-height: 100%;

    background: linear-gradient(160deg, #fdf1ea 0%, #fbeee4 100%);
    border: 1.5px solid #f2ddcd;
    border-radius: var(--r-md);
    position: relative;
    overflow: hidden;
}

.vr-performance-card::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -60px;
    top: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(179, 74, 22, 0.08), transparent 70%);
}

.vr-performance-card > span {
    position: relative;
    color: var(--ink-mute);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vr-performance-card > strong {
    position: relative;
    margin-top: 6px;
    color: var(--brand);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* =========================================================
   SUBMIT
========================================================= */

.vr-submit-area {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--line-soft);
}

.vr-submit {
    min-width: 220px;
    height: 54px;
    padding: 0 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: linear-gradient(135deg, var(--brand) 0%, #c95a1e 100%);
    border: 0;
    border-radius: var(--r-sm);

    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;

    box-shadow: 0 6px 20px rgba(179, 74, 22, 0.32);

    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.vr-submit:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 28px rgba(179, 74, 22, 0.4);
    transform: translateY(-1px);
}

.vr-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(179, 74, 22, 0.3);
}

/* =========================================================
   TOAST
========================================================= */

.vr-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 200;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 14px 22px;

    background: #1a1a1a;
    color: #fff;
    border-radius: 100px;

    font-size: 13px;
    font-weight: 500;

    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);

    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px) scale(0.96);

    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vr-toast::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--green);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.vr-toast.show {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 920px) {

    .vr-app {
        padding: 28px 18px 90px;
    }

    .vr-header {
        padding: 36px 32px 40px;
    }

    .vr-form {
        padding: 34px 28px;
    }

    .vr-rating-item {
        gap: 20px;
        padding: 15px 18px;
    }

    .vr-rating-buttons {
        gap: 4px;
    }

    .vr-rating-button {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    .vr-group-header {
        padding: 16px 18px;
    }

    .vr-final-box {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RESPONSIVE — MOBILE (Main Experience)
========================================================= */

@media (max-width: 680px) {

    body {
        background: var(--surface);
    }

    .vr-app {
        padding: 0;
        max-width: 100%;
    }

    /* Header */
    .vr-header {
        border-radius: 0;
        padding: 28px 20px 34px;
    }

    .vr-header h1 {
        font-size: 22px;
        letter-spacing: -0.4px;
    }

    .vr-header p {
        font-size: 12.5px;
    }

    .vr-brand {
        margin-bottom: 14px;
        font-size: 10px;
    }

    /* Form */
    .vr-form {
        padding: 28px 16px 60px;
        border-radius: 0;
        box-shadow: none;
    }

    .vr-section {
        margin-bottom: 36px;
    }

    .vr-section-header {
        gap: 12px;
        margin-bottom: 18px;
    }

    .vr-section-number {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 11px;
    }

    .vr-section-title {
        font-size: 17px;
    }

    .vr-section-description {
        font-size: 12px;
    }

    /* Inputs */
    .vr-info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vr-field.full {
        grid-column: auto;
    }

    .vr-field input,
    .vr-field select {
        height: 50px;
        font-size: 15px;
    }

    .vr-field textarea {
        font-size: 15px;
    }

    /* Evaluation groups */
    .vr-evaluation-group {
        margin-bottom: 16px;
        border-radius: var(--r-sm);
    }

    .vr-group-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px;
    }

    .vr-group-title {
        font-size: 13px;
    }

    .vr-group-score {
        padding: 4px 10px;
        font-size: 11px;
    }

    /* Rating item → stacked layout on mobile */
    .vr-rating-item {
        display: block;
        padding: 16px;
        gap: 0;
    }

    .vr-rating-name {
        font-size: 14px;
        font-weight: 500;
    }

    .vr-rating-help {
        font-size: 12px;
        margin-top: 4px;
    }

    /* Mobile rating buttons — bigger touch targets */
    .vr-rating-buttons {
        display: grid;
        grid-template-columns: repeat(11, 1fr);
        gap: 6px;
        width: 100%;
        margin-top: 14px;
    }

    .vr-rating-button {
        width: 100%;
        height: 42px;
        border-radius: 9px;
        font-size: 12px;
        font-weight: 600;
        border-width: 1.5px;
    }

    /* Score panel — mobile */
    .vr-score-panel {
        position: sticky;
        bottom: 12px;

        grid-template-columns: auto 1fr;
        gap: 14px;

        padding: 14px 16px;
        border-radius: var(--r-sm);

        box-shadow: 0 10px 30px rgba(60, 35, 15, 0.16);
    }

    .vr-score-circle {
        width: 52px;
        height: 52px;
    }

    .vr-score-circle strong {
        font-size: 16px;
    }

    .vr-score-circle span {
        font-size: 8px;
    }

    .vr-score-info > strong {
        font-size: 12.5px;
    }

    .vr-score-info > span {
        font-size: 11px;
    }

    .vr-completed {
        display: none;
    }

    /* Final box */
    .vr-final-box {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .vr-overall-card {
        padding: 22px 18px;
    }

    .vr-overall-input input {
        width: 110px;
        height: 60px;
        font-size: 24px;
    }

    .vr-performance-card {
        min-height: 120px;
        padding: 22px;
    }

    .vr-performance-card > strong {
        font-size: 22px;
    }

    /* Submit — full width */
    .vr-submit-area {
        display: block;
        margin-top: 32px;
        padding-top: 26px;
    }

    .vr-submit {
        width: 100%;
        height: 56px;
        font-size: 15px;
    }

    /* Toast — full width friendly */
    .vr-toast {
        left: 16px;
        right: 16px;
        bottom: 20px;
        transform: translate(0, 20px) scale(0.96);
        justify-content: center;
        padding: 14px 20px;
    }

    .vr-toast.show {
        transform: translate(0, 0) scale(1);
    }
}

/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .vr-header {
        padding: 24px 16px 30px;
    }

    .vr-header h1 {
        font-size: 20px;
    }

    .vr-form {
        padding: 24px 12px 50px;
    }

    .vr-rating-buttons {
        gap: 4px;
    }

    .vr-rating-button {
        height: 38px;
        font-size: 11px;
    }

    .vr-section-title {
        font-size: 16px;
    }

    .vr-score-panel {
        padding: 12px 14px;
    }
}

/* =========================================================
   ACCESSIBILITY — REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Focus visibility for keyboard users */
.vr-rating-button:focus-visible,
.vr-submit:focus-visible,
.vr-field input:focus-visible,
.vr-field select:focus-visible,
.vr-field textarea:focus-visible {
    outline: 3px solid var(--brand-ring);
    outline-offset: 2px;
}
