/* --- Variáveis e Fontes --- */
:root {
    --accent: #cf0000;
    --card: #ffffff;
    --text: #111111;
    --muted: #6b6b6b;
    --glass: rgba(0, 0, 0, 0.06);
    --fw-strong: 600;
}

@font-face {
    font-family: "Product Sans";
    src: url("ProductSans-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Product Sans";
    src: url("ProductSans-Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* --- Reset e Estilos Globais/Base --- */
* {
    box-sizing: border-box;
    font-family: "Product Sans", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 300;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--text);
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

h1 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: var(--fw-strong);
    letter-spacing: 0.2px;
    color: var(--text);
}

/* --- Componente Card (Principal) --- */
/* card: split header "head" and white body, no border-radius */
.card {
    width: 100%;
    max-width: 560px;
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
    /* display: grid; */
    /* grid-template-rows: auto 1fr; */
    /* overflow: hidden; */
}

.card-header {
    display: flex;
    gap: 12px;
    padding: 5px 36px;
    background: var(--accent);
    color: #fff;
    border-bottom: 0;
    margin: 0;
    height: 115px;
    margin-bottom: 16px;
    justify-content: center;
    align-items: center;
}

.card-header h1 { /* removed text from header; kept empty rule for safe edits */ }

.card-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: var(--fw-strong);
    letter-spacing: 0.2px;
    color: var(--text);
}

.card-body {
    padding: 28px;
    background: var(--card);
    /* border-top:1px solid rgba(0,0,0,0.04); */
    border-bottom: 5px solid var(--accent);
}

/* ensure logo sits well on colored head */
.logo {
    display: block;
    height: 59px;
    margin: 0;
}

.card-header .logo {
    margin: 0;
}

/* --- Formulário e Elementos de Entrada (Inputs) --- */
.form {
    display: none;
    gap: 10px;
    flex-direction: column;
}

.form.active {
    display: flex;
}

label {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    color: var(--muted);
}

label { position: relative; }

label .icon-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 6px;
    color: var(--muted);
}

label .icon-toggle-password img.eye-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
}

label .icon-toggle-password {
    width: 36px;
    height: 36px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

label .icon-toggle-password[aria-pressed="true"] {
    color: var(--accent);
}

input,
select {
    padding: 12px 10px;
    border: 1px solid #e7e7e7;
    background: transparent;
    color: var(--text);
    outline: none;
    border-radius: 0;
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 4px 18px rgba(255, 0, 0, 0.06);
}

/* Aumento do tamanho da fonte para acessibilidade em dispositivos móveis/maior */
input,
textarea,
select {
    font-size: max(1rem, 21px) !important;
}

/* Reduce visual clutter for file input */
input[type="file"] {
    /* hide native file button but keep accessible */
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.file-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.file-label {
    display: inline-block;
    background: transparent;
    border: 1px solid #e7e7e7;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--accent);
    font-size: 18px;
}

.file-label:hover {
    border-color: var(--accent);
}

.file-name {
    color: var(--muted);
    font-size: 16px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-type {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.type-btn {
    padding: 8px 10px;
    border: 1px solid #e7e7e7;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.type-btn[aria-pressed="true"] {
    border-color: var(--accent);
    color: var(--accent);
}

input[type="date"] {
    /* replace default calendar with provided SVG icon on the right */
    padding-right: 44px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25567.2 25349.4'><path fill='%23CF0000' d='M2060.1 17714.4c-44.2,539.5 -5.7,3153.2 -5.7,3912.1 0,1381.6 -92.1,1163.2 2804.9,1163.2l17795.1 0c926.9,2.3 859,-272.8 859,-1128.4 0,-861.5 41.8,-3275.5 -4.8,-3946.7 -264.6,54 -403.7,209.4 -992.4,234 -678.4,28.2 -1429.5,-268.9 -1821.8,-757 -641.7,-798.6 -756,-2341.1 -1412.1,-2416 -438.1,-50 -573.8,272.4 -703.5,587.8 -123.8,301.4 -248.1,602.3 -376.6,909.6 -254.1,607.7 -411.1,1065.5 -1116.4,1419 -952.1,477.2 -2245.1,243.7 -2835.1,-521.8 -277.5,-360.1 -629.2,-1279.5 -818.7,-1754.8 -123.8,-310.4 -236.6,-643.5 -648.1,-644.6 -391.7,-0.9 -517.7,307.8 -642.6,620 -120.8,301.8 -256.1,607.2 -376.1,908.4 -293.5,737.3 -509.4,1104.6 -1155.8,1415.2 -925.8,444.7 -2211.6,219.1 -2803.9,-563.7 -260.3,-343.8 -616.1,-1285.2 -796.4,-1739.3 -127.7,-321.5 -253.5,-642.4 -655.2,-640.9 -544,2.2 -719.5,838.7 -1027.6,1554.4 -266.6,618.9 -427.8,1063.6 -1169.6,1403.2 -491.8,225.1 -1075,289.1 -1623.6,146.5 -163.4,-42.5 -343.2,-134.8 -473.1,-160zm9972.7 -7591.8c-340.9,11.7 -686.4,18.3 -1034.4,21.5l-151.5 0c-393.4,3.5 -790.1,2.6 -1187,0l346.6 0c-246.8,-4.8 -490.9,-12 -731.2,-22.5 -38.5,-1721.8 -6.2,-3730.3 -4.5,-5496.2l-1804.8 -8.3 0 5505.4c-32.5,1.1 -64.8,2.2 -97.2,3.2l-76.6 -0.2c-764.6,0 -1529.2,0 -2293.9,0 -827.2,0 -1296.4,1.2 -1896.8,393.8 -401.7,262.6 -806.3,728.7 -963.6,1329.5 -146.1,557.2 -83.4,1575.3 -83.4,2200.7 0,369.1 -50.5,2016.2 44.5,2237.1 280.4,652.4 1707.8,982.7 2149.3,-171.4 107.2,-279.8 226.1,-540.6 337.4,-810.1 279.8,-678.1 402.6,-1045 922,-1371 567.8,-356.4 1275.9,-301.1 1779.9,50.6 1018.6,710.9 832.3,2447.6 1817.1,2808 690.9,252.8 1338.2,-67.7 1543.3,-604.9 104.5,-273.8 225.2,-535.1 338.8,-809.2 288.1,-696.6 589.7,-1686.5 1797,-1686.5 714.3,0 1192.7,426.1 1442.2,862l684.7 1609c258.4,688.6 991.2,826.3 1528.7,640.3 623.8,-215.8 678.9,-751.8 940.1,-1355 287.4,-664 366.9,-1063.5 859.8,-1435 487.2,-367.2 1191.2,-438.7 1778.5,-107.7 520.1,293.1 681.5,698.6 946.6,1348.7 238.4,584.7 415.1,1255.2 853.3,1473.3 615.7,306.6 1371.9,102.8 1628.1,-394.8 136.6,-265.5 67.8,-1781.9 67.8,-2213.9 0,-1714.4 151.4,-2774 -1025.8,-3586.3 -564.7,-389.7 -1087.2,-407.2 -1883.9,-407.2l-2097 0c-32.6,-1.2 -65.1,-2.6 -97.5,-4 -38.6,-1721.8 -6.3,-3730.3 -4.5,-5496.2l-1805 -8.3 0 5505.4c-340.9,11.7 -686.4,18.3 -1034.4,21.5l807.2 0c-654.6,7.5 -1311.6,12.2 -1950.7,0l151.4 0c-246.6,-4.8 -490.7,-12 -731,-22.5 -38.6,-1721.8 -6.3,-3730.3 -4.5,-5496.2l-1805 -8.3 0 5505.4zm176.9 -6085.9c-95.1,-654.6 55.2,-878.1 464,-1405.2 80.3,-103.7 186.1,-289.5 296.1,-367.1 183.8,177.7 391.2,469.7 527.1,728.1 219.2,416.6 253.2,532 134.5,1023.8 252.9,-104 503.7,-526.1 617.5,-886.6 254.6,-806.3 -194.6,-1609.8 -609.4,-2261.6 -118.9,-186.9 -521.7,-796.4 -679.2,-868.3 -141.2,268.6 -433.8,612.7 -628.3,899.8 -199.4,294.3 -420.4,600.3 -573.7,955 -165.5,383.1 -284.1,813.5 -178.3,1285.6 88.3,394 352.8,786.3 629.7,896.3zm-4567 0c-95.1,-654.6 55.2,-878.1 464,-1405.2 80.3,-103.7 186.1,-289.5 296.3,-367.1 183.8,177.7 391.1,469.7 527.1,728.1 219.2,416.6 253.1,532 134.3,1023.8 252.9,-104 503.8,-526.1 617.7,-886.6 254.4,-806.3 -194.8,-1609.8 -609.5,-2261.6 -118.9,-186.9 -521.7,-796.4 -679.2,-868.3 -141.2,268.6 -433.8,612.7 -628.3,899.8 -199.4,294.3 -420.4,600.3 -573.7,955 -165.5,383.1 -284,813.5 -178.3,1285.6 88.3,394 352.9,786.3 629.7,896.3zm9133.9 0c-95.1,-654.6 55.2,-878.1 464.1,-1405.2 80.3,-103.7 186.1,-289.5 296.1,-367.1 183.8,177.7 391.2,469.7 527.1,728.1 219.2,416.6 253.2,532 134.5,1023.8 252.9,-104 503.7,-526.1 617.5,-886.6 254.6,-806.3 -194.8,-1609.8 -609.4,-2261.6 -118.9,-186.9 -521.7,-796.4 -679.4,-868.3 -141.1,268.6 -433.7,612.7 -628.1,899.8 -199.5,294.3 -420.4,600.3 -573.8,955 -165.5,383.1 -284,813.5 -178.1,1285.6 88.3,394 352.8,786.3 629.5,896.3zm-16741.6 21309.1l25500.9 3.5 -0.9 -364.1c9.8,-0.9 16.9,-1.8 20.9,-2.9l11.4 -1079.8c-5.2,-1.1 -17.8,-2.2 -34.8,-3.2l-1.2 -506.6 -25496.3 -3.5 0 511.5c-9.1,1.2 -16.8,2.5 -22.3,3.8l-12.6 1077.6c5.8,1.2 18.8,2.6 34.9,3.8l0 359.8z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    -webkit-background-size: 20px 20px;
    background-size: 20px 20px;
}

/* hide native picker icon visually but keep functionality clickable */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 36px;
    height: 100%;
}

/* Firefox: ensure indicator area doesn't overlap icon */
input[type="date"]::-moz-focus-inner {
    border: 0;
}

/* ensure input has room for icon */
input[type="password"], input[type="text"][data-has-icon="true"] {
    padding-right: 44px;
}

.cep-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
/* ensure inputs inside cep-row follow proportions (CEP ~80%, Número ~20%) */
.cep-row label { display: block; }
.cep-row input { width: 100%; box-sizing: border-box; }

/* --- Ações e Botões --- */
.form-actions {
    display: flex;
    /* gap:12px; */
    justify-content: flex-end;
    margin-top: 16px;
    flex-direction: column-reverse;
}

button[type="submit"] {
    order: 2;
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 100;
    box-shadow: 0 6px 14px rgba(255, 0, 0, 0.08);
    transition: transform .12s ease, box-shadow .12s ease;
    font-size: 24px;
}

button[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.06);
}

/* simple style for bottom link buttons to look like links */
.link-like {
    background: hsl(0, 0%, 95.1%);
    border: 0;
    color: var(--accent);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 18px;
    text-decoration: none;
}

.link-like:hover {
    text-decoration: underline;
}

.form-links {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 12px;
}

.bottom-links {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-right: 10px;
}

.bottom-links .link-like {
    order: 1;
}

.modal-actions {
    display:flex;
    gap:8px;
    justify-content:flex-end;
    margin-top: 33px;
    margin-bottom: 14px;
    margin-right: 3px;
}

/* --- Utilitários e Mensagens --- */
.tabs {
    display: none;
}

.msg {
    margin-top: 12px;
    color: #c11f00;
    font-size: 17px;
    display: none;
    justify-content: center;
    /* background and padding only when visible via .visible */
}

.msg.visible {
    display: flex;
    padding: 6px;
    /* keep default (error) background for non-success messages */
    background: #ff000038;
}

/* new: success variant uses green background and darker green text */
.msg.success.visible {
    background: #e6f8ea;
    color: #116622;
}

/* cropper & preview styles for register page */
.cropper-wrap {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
}

.crop-area {
    width: 280px;
    height: 280px;
    background: #f6f6f6;
    border: 2px solid #e2e2e7;
    position: relative;
    overflow: hidden;
}

.crop-area img {
    position: absolute;
    left: 0;
    top: 0;
    user-select: none;
    touch-action: none
}

.crop-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.input-inline {
    display: flex;
    gap: 8px;
    align-items: center
}

.small-btn {
    padding: 8px 12px;
    border: 1px solid #e7e7e7;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
}

.small-btn:hover {
    border-color: var(--accent);
    /* color: var(--accent); */
}

@media (max-width:420px) {
    .card {
        padding: 18px;
    }

    .logo {
        height: 36px;
        margin-bottom: 10px;
    }
}

/* modal styles for simple centered panel */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
}

.modal-panel {
    position: relative;
    background: var(--card);
    padding: 18px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    /* border: 1px solid rgba(0, 0, 0, 0.04); */
    z-index: 61;
}

/* new header inside modal panels: red background bar matching accent */
.modal-panel-header {
    background: var(--accent);
    color: #fff;
    padding: 22px 23px;
    margin: -18px -18px 22px -18px; /* extend to panel edges and sit above panel content */
}
.modal-panel-header h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 300;
}

/* --- Media Queries (Responsividade) --- */
@media (max-width:420px) {
    .card {
        padding: 18px;
    }

    .logo {
        height: 36px;
        margin-bottom: 10px;
    }
}

div {}
