:root {
    --primary: #ff760d;
    --focus: #6f2cff;
    --ring: rgba(111, 44, 255, 0.25);
    --radius-lg: 22px;
}

.file-upload-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid#ddd;
    border-radius: 8px;
    background: #f2f2f2;
    padding: 10px 12px;
    cursor: pointer;
}
.file-placeholder {
    flex: 1;
    color: #8a8a8a;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-upload-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: #3c0078;
}
.file-upload-wrapper input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.file-upload-wrapper:focus-within {
    box-shadow: 0 0 0 4px rgba(60, 0, 120, 0.15);
    outline: 0;
}

.btn-bio-gradient {
    position: relative;
    display: inline-block;
    width: 100%;
    background: linear-gradient(90deg, #3e2a7b 0%, #ff0000 100%);
    color: #fff;
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.btn-bio-gradient:hover {
    opacity: 0.9;
}

.btn-bio-gradient p {
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    margin: 0 0 5px;
}

.bio-badge-top {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bio-badge-top.success {
    background: #28a745; /* verde */
}

.bio-badge-top.success svg path {
    fill: #fff; /* deixa o ícone branco quando o fundo é verde */
}

.signup-area {
    background-image: url("/assets/images/background_image_nfn.svg");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    margin-top: 60px;
}

.form-wrapper {
    max-width: 1100px;
    margin: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    padding: 40px;
    margin-top: 20px;
}

.hero-title {
    text-align: center;
    font-weight: 800;
    font-size: clamp(22px, 3.4vw, 28px);
    margin-bottom: 8px;
}

.hero-sub {
    text-align: center;
    margin-bottom: 8px;
    font-size: 16px;
}

.hero-need {
    text-align: center;
    font-weight: 700;
    margin-bottom: 24px;
}

.card-bio {
    background: linear-gradient(135deg, #4b0082, #cf0028);
    color: #fff;
    border: 0;
}

.bio-chip {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #ffffff22;
    border: 2px solid #ffffff33;
}

.bio-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
}

.card-flag,
.card-form {
    border-radius: var(--radius-lg);
}

.form-label {
    font-weight: 700;
    color: #111827;
}

.label-req::after {
    content: " *";
    color: #dc3545;
}

.form-control {
    height: 52px;
    border-radius: 14px;
    box-shadow: none;
}

.upload-like {
    position: relative;
}

.upload-like .bi-upload {
    position: absolute;
    right: 14px;
    top: 54px;
    transform: translateY(-50%);
    opacity: 0.7;
}

.radio-square input {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #d1d5db;
    background: #fff;
    margin-right: 8px;
    cursor: pointer;
}

.radio-square input:checked {
    background: #f5f3ff;
    box-shadow: 0 0 0 4px var(--primary-color) inset;
}

.radio-square span {
    font-weight: 700;
}

.btn-cta {
    width: 100%;
    height: 54px;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.btn-ghost {
    background: var(--primary-color);
    cursor: not-allowed;
}

/* MODAL STYLE */
#selectImageModal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

#selectImageModal .modal-header {
    border-bottom: none;
    padding: 1rem 1.5rem 0;
}

#selectImageModal .modal-body {
    padding: 0 1.5rem 1.5rem;
}

#webCamContainer {
    position: relative;
    aspect-ratio: 4 / 3;
    background-color: #000;
    width: 100%;
    max-width: 380px;
    max-height: 360px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

video {
    object-fit: cover !important;
}

#webCamContainer video,
#webCamContainer canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transform: scaleX(-1); /* inverte horizontalmente */
    -webkit-transform: scaleX(-1);
}

.instructions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.instruction {
    background-color: #e60000;
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.3;
    width: 220px;
    padding: 20px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    clip-path: polygon(0 10%, 100% 0%, 100% 90%, 0% 100%);
    margin: 0;
}

.instruction:nth-child(even) {
    clip-path: polygon(0 0%, 100% 10%, 100% 100%, 0% 90%);
}

.capture-button,
.capture-button-back,
.capture-button-finish {
    border: none;
    padding: 10px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    max-width: 880px;
    color: white;
    margin: 0;
}

.capture-button,
.capture-button-finish {
    background-color: #e60000;
}

.capture-button-back {
    background-color: #02018d;
}

.capture-button:hover {
    background-color: #cc0000;
}

@media (min-width: 1400px) {
    #webCamContainer {
        max-width: 480px;
        max-height: 360px;
    }

    .instruction {
        width: auto;
        font-size: 14px;
    }

    .capture-button {
        max-width: 790px;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    #webCamContainer {
        max-width: 300px;
    }

    .instruction {
        width: 160px;
        font-size: 12px;
        padding: 10px 8px;
    }

    .capture-button {
        max-width: 240px;
        padding: 10px;
    }

    .bio-badge-top {
        width: 40px;
        height: 40px;
    }
}

.btn-gradient {
    background: linear-gradient(90deg, #3e2a7b 0%, #ff0000 100%);
    color: white;
    font-weight: bold;
    border: none;
    padding: 15px 60px;
    border-radius: 6px;
    width: 100%;
    max-width: 400px;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.rotate-icon svg {
    transition: transform 0.3s ease;
}

.collapse.show + .rotate-icon svg {
    transform: rotate(180deg);
}
