@import url('https://fonts.googleapis.com/css2?family=Boldonse&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Martel+Sans:wght@200;300;400;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Climate+Crisis:YEAR@1979&display=swap');
*{
    color: var(--text);
    font-family: 'noto sans cypro minoan', sans-serif;
    font-weight: 200;
    box-sizing: border-box;
}
:root {
    --primary: #0b2846;
    --hover: rgba(82, 104, 128, 0.54);
    --secondary: #20639B;
    --accent: #3CAEA3;
    --accent-text: #2e8980;
    --tertiary: #7721b1;
    --success: #2E9B68;
    --warning: #F6A623;
    --danger: #E45756;
    --background: #e8f1f5;
    --card: #f7fbfc;
    --card-btn: #eef2f4;
    --border: #eff2f7;
    --border-header: #dadce1;
    --text: #17202A;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --white: #FFFFFF;
}

body.dark-mode {
    --primary: #101b2a;
    --hover: rgba(148, 163, 184, 0.2);
    --secondary: #5eaaf0;
    --accent: #38b5b0;
    --accent-text: #86ece3;
    --success: #67d99a;
    --warning: #f6c869;
    --danger: #ff8e8e;
    --background: #07111c;
    --card: #0d1a2b;
    --card-btn: #1a2a42;
    --border: #1f2f46;
    --border-header: #1f2f46;
    --text: #edf5ff;
    --text-secondary: #b4c3d7;
    --text-light: #d0d9e5;
    --white: #f8fbff;
}

body{
    width: 100%;
    background: var(--background);
    color: var(--text);
    height: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.25s ease, color 0.25s ease;
    padding-bottom: 2%;
}

header{
    width: 100%;
    height: fit-content;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    border-bottom: var(--border-header) 1px solid;
    padding: 0 2rem;
    position: relative;
}

#user{
    position: absolute;
    right: 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
}

a{
    text-decoration: none;
    color: var(--text);
}

#title h2{
    margin:1rem 0 0 0;
    padding:0;
    font-weight: 600;
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
}

main{
    width: 95%;
    height: 100%;
    gap: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.meta img{
    width: 20%;
}


.dash-container{
    display: flex;
    flex-direction: row;
}

.card{
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.meta{
    display: flex;
    min-width: 50%;
    max-width: 50%;
    height: 100%;
    flex-direction: row;
    position: relative;
}

.meta-img{
    flex: 0 0 40%;
    width: 40%;
    min-height: 17rem;
    max-height: 22rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    position: relative;
}

.meta-content{
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 55%;
    gap:15px;
    bottom: 0;
    left: 0;
   background: linear-gradient(transparent, rgba(0,0,0, .95));
}

#name-country{
    font-family: sans-serif;
    color: var(--white);
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 1.8rem);
    -webkit-text-stroke: 1px rgba(0, 0, 0, 1);
}

.title-country{
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 10px;
    place-items: center;
}

#trip-goal,
#trip-goal i,
#trip-goal span {
    color: white;
    font-size: .9rem;
    font-weight: 100;
}

p{
    margin: 0;
    padding:0;
}

#trip-time,
#trip-time i,
#trip-time span {
    color: white;
    font-size: .9rem;
    font-weight: 100;
}

#flag-circle{
    width: 2.6rem;
    height:2.6rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#flag{
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.content{
    background: var(--card);
    width:60%;
    min-height: 100%;
    padding-left: 2%;
    padding-bottom: 3.5%;
}

#obs{
    margin-left: 22%;
    flex-wrap: wrap;
    font-size: small;
    color: var(--accent-text);
    font-weight: 600;
}

#content-title{
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

.content h3{
    font-weight: 600;
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    margin: 0;
    padding: 0;
}

#meta{
    width: 95%;
}

#resume-container{
    display: flex;
    flex-direction: row;
    height: fit-content;
    width: 100%;
    gap: 1.8%
}

progress{
    width: 100%;
    height: 10px;
    border:none;
    appearance: none;
    -webkit-appearance: none;
}

#guardado span{
    font-weight: 600;
}

progress::-webkit-progress-bar{
    background: var(--border);
    border-radius: 20px;
}

progress::-webkit-progress-value{
    background: var(--accent);
    border-radius: 20px;
}

.target{
    display: grid;
    grid-template-columns: 20px 1fr;
    place-items: center;
    margin-top: .6rem;
    padding: .9rem;
    background:rgb(from var(--accent) r g b / 20%);
    border-radius: 15px;
}

#target-desc{
    display: flex;
    flex-direction: column;
    width: 89%;
    padding: 0;
}

.logo{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

img{
    object-fit: cover;
    width: 2.7rem;
}

#target-desc h4{
    margin: 0;
    padding: 0; 
    font-size: .9rem;
    font-weight: 450;
}

#target-desc p{
    margin: 0;
    padding: 0;
    font-size: .7rem;
}


.target i{
    font-size: 2rem;
    color: var(--accent-text);
}

h1{
    font-family: "Boldonse", sans-serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2.5vw, 2rem);
    margin: 10px 0
}

.cards{
    display: flex;
    flex-direction: column;
    width: 30%;
    min-height: 100%;
    padding-top: 70px;
    background: var(--card);
    border-radius: 15px;
    border: none;
    align-items: center;
    position: relative;
    gap: 8%
}

.card-title{
    position: absolute;
    top: 15px;
    left:15px;
    margin: 0;
    font-weight: 500;
}

.icone-card{
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

/* Estilos do card de poupança */

.poupanca-i{
     background:rgb(from var(--success) r g b / 20%);
}

.destino-i{
     background:rgb(from var(--warning) r g b / 20%);
}

.destino-i i{
    color: var(--warning)
}

.destino span{
    color: var(--warning);
    font-weight: 600;
}

.destino{
    display: none
}

.poupanca-i i{
    color: var(--success)
}

.guardado span{
    font-weight: 600;
    color: var(--success);
    text-align: center;
}

.cards p{
    font-size: smaller;
}

.cards span{
    font-size: clamp(1rem, 1.8vw, 1.4rem);
}

/* Estilos do card de cotação */

.cotacao-i{
     background:rgb(from var(--secondary) r g b / 20%);
}

.cotacao-i i{
    color: var(--secondary)
}

.cotacao span{
    font-weight: 600;
    color: var(--secondary);
    text-align: center;
}

/* Estilos do card de viagem */

.viagem-i{
     background:rgb(from var(--tertiary) r g b / 20%);
}

.viagem-i i{
    color: var(--tertiary)
}

.viagem span{
    font-weight: 600;
    color: var(--tertiary);
    text-align: center;
}

button{
    cursor: pointer;
}

button:hover{
    background-color:rgb(from var(--hover) r g b / 3%);
}

#dash-container{
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 1.8%
}

.dash{
    width: 50%;
    min-height: 100%;
    border-radius: 10px;
    background: var(--card);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: .5rem 0 1.5rem 1.5rem
}

.notas {
    min-width: 50%;
    max-width: 50%;
    min-height: 49vh;
    padding: 1.5rem;
    background: var(--card);
    border-radius: 15px;
    border: none;
}

.nota{
    width: fit-content;
    max-width: 100%;
    height: 5rem;
    background: var(--background);
    border-radius: 10px;
    border: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 .8rem 0 1.2rem;
    transition: transform .35s ease;
    position: relative;
}

.pin{
    position: absolute;
    top: 5px;
    left: 5px
}

.nota p{
    overflow-wrap: anywhere;
}

.notas-container{
    display: flex;
    flex-direction: row;
    gap: .6rem;
    row-gap: .3rem;
    width: 100%;
    height: 100%;
    flex-wrap: wrap;
    align-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
}

.notas-container::-webkit-scrollbar {
    display: none;
}

.notas h3 {
    margin: 0 0 .5rem;
    font-weight: 600;
}

.grafico {
    width: 100%;
    height: 270px;
}

.actions{
    display: grid;
    grid-template-columns: 1fr 1fr;
    place-items: stretch;
    width: 95%;
    gap: 1rem;
    margin-top: 1.5%;
    align-items: stretch;
}

.quick-btn{
    width: 100%;
    min-height: 5rem;
    height: 100%;
    border: none;
    border-radius: 10px;
    background: var(--card-btn);
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 10px;
    padding: 0 .8rem 0 1.2rem;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

.quick-btn h3,
.quick-btn p{
    margin: 0;
    padding: 0;
}

.button-desc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.quick-btn h3{
    font-size: 1rem;
    font-weight: 400;
    text-align: left;
    line-height: 1.2;
}

.quick-btn p{
    font-size: .7rem;
    font-weight: 200;
    text-align: left;
    line-height: 1.3;
}

.quick-btn i{
    font-size: 2rem;
    flex-shrink: 0;
}

.quick-notes article{
    display: flex;
    flex-direction: row;
    align-items: center;
}

#notes-txt i{
    margin-right: .5rem;
}

#notes-txt span{
    font-size: 1.5rem;
}

#notes-txt{
    padding-top: 1.5rem;
}

.quick-notes{
    width: 95%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    background: var(--background);
    align-items: center;
    justify-content: center;
    padding: 0 1rem 1rem 1rem;
    margin-top: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.nota-modal{
    height: 5rem;
    background: transparent;
    border-radius: 10px;
    border: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 .8rem 0 2.3rem;  
    overflow-wrap: anywhere;
    width: 90%;
}

#n-modal{
    height: 100%;
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(60, 174, 163, 0.7) transparent;
}

#n-modal::-webkit-scrollbar {
    width: 8px;
}

#n-modal::-webkit-scrollbar-track {
    background: transparent;
}

#n-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), var(--accent-text));
    border-radius: 999px;
}


textarea {
    width: 95%;
    height: 5rem;
    padding: 12px 15px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    resize: vertical;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(from var(--accent) r g b / 15%);
}

#theme-toggle-btn {
    width: 10rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 0 .5rem;
    border-radius: 20px;
    background-color: var(--accent);
    border: none;
    color: var(--text-light);
    text-align: center;
    cursor: pointer;
    color: var(--white);
    position: absolute;
    top: 2rem;
    right: 0;
}

.primary-btn{
    margin-top: 20px;
    background-color: var(--accent);
    color: var(--text);
}



#id-viagem{
    width: 10rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 0;
    border-radius: 20px;
    background-color: var(--accent);
    border: none;
    color: var(--text-light);
    text-align: center;
    cursor: pointer;
    color: var(--white);
    position: absolute;
    top: 2rem;
    right: 11vw;
}

#percent{
    position: absolute;
    right: 0;
    top:1.5rem;
    color: var(--accent-text);
}

#progress-meta{
    position: relative;
}

select{
    background-color: transparent;
    color: var(--white);
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
    padding: 0 1rem;
    cursor: pointer;
}

select:focus{
    border: none;
}
footer{
    margin: 2rem;
}

option{
    background-color: var(--background);
    color:var(--text);
    cursor: pointer;
}

#theme-toggle-btn i {
    font-size: 1.2rem;
    color: var(--white);
}

#theme-toggle-btn:hover, .primary-btn:hover {
    background-color: var(--accent-text);
}

.user-menu {
    position: relative;
    width: fit-content;
}

.user-menu summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    user-select: none;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu summary:hover {
    background:rgb(from var(--hover) r g b / 10%);
}

.user-menu summary .ph-user-circle {
    font-size: 1.8rem;
}

.user-menu summary .ph-caret-down {
    font-size: .9rem;
}

.user-options {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 200px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    z-index: 1000;
}

.user-options a,
.user-options button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 9px;
    color: var(--text);
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.user-options a:hover,
.user-options button:hover {
    background:rgb(from var(--hover) r g b / 10%);
}

.user-options i {
    font-size: 1.2rem;
}

.user-options hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 6px 0;
}

.user-options .logout {
    color: var(--danger);
}

.trip-list {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    padding: 1rem 1.2rem 0;
}

.trip-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .8rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--text);
    transition: border-color .2s ease, transform .2s ease;
}

.trip-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    flex: 1;
    min-width: 0;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.icon-btn {
    padding: .35rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
}

.icon-btn:hover {
    background: rgb(from var(--hover) r g b / 15%);
    color: var(--text);
}

.danger-btn {
    background: var(--danger) !important;
    color: var(--white) !important;
}

.trip-item:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.trip-item.active {
    background: rgb(from var(--accent) r g b / 12%);
    border-color: var(--accent);
}

.trip-item-name {
    font-weight: 500;
}

.trip-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.2rem 1.2rem;
}

.secondary-btn {
    background: var(--border);
    color: var(--text);
}

.empty-trip-message {
    margin: 0;
    padding: .9rem 1rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    background: var(--background);
}

.user-menu[open] .ph-caret-down {
    transform: rotate(180deg);
}

.close{
    position: absolute;
    top: 1rem;
    right: 1rem;
    border-radius: 50%;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    border: none;
    color: var(--white);
    background: none;
}
dialog {
    width: min(450px, 90vw);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0;
    background: var(--card);
    color: var(--text);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    scrollbar-width: none;
}

dialog::backdrop {
    backdrop-filter: blur(4px);
}

dialog[open] {
    animation: modal-in .25s ease;
}

dialog h2 {
    margin: 0;
    padding: 1.5rem 1.7rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.35rem;
    font-weight: 600;
}

dialog form {
    display: grid;
    gap: 8px;
    padding: 1.5rem 1.7rem 1.7rem;
}

dialog label {
    margin-top: 8px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

dialog input,
dialog select,
dialog textarea {
    width: 100%;
    box-sizing: border-box;
    padding: .75rem .9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: var(--background);
    color: var(--text);
    font-family: inherit;
    font-size: .9rem;
    transition: border .2s ease, box-shadow .2s ease, background .2s ease;
}

dialog input:focus,
dialog select:focus,
dialog textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(from var(--accent) r g b / 15%);
}

dialog input::placeholder,
dialog textarea::placeholder {
    color: var(--text-light);
}

dialog textarea {
    min-height: 110px;
    resize: vertical;
}

dialog .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

dialog button,
form button {
    border: none;
    border-radius: 10px;
    padding: .7rem 1rem;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, opacity .2s ease;
}

dialog button:hover,
form button:hover {
    transform: translateY(-1px);
}

dialog button[type="submit"],
form button[type="submit"] {
    background: var(--accent);
    color: var(--white);
}

dialog button[type="submit"]:hover,
form button[type="submit"]:hover {
    background: var(--accent-text);
}

dialog button[type="button"] {
    color: var(--text);
}

dialog input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

dialog input:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

#cadastro {
    width: min(430px, 90vw);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 2rem 1.8rem 1.6rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#cadastro h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 600;
    color: var(--text);
}

#cadastro form {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

#cadastro label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: .2rem;
}

#cadastro input:not([type="checkbox"]) {
    width: 100%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .8rem .9rem;
    color: var(--text);
    font-size: .95rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#cadastro input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: .2rem;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

#cadastro input::placeholder {
    color: var(--text-light);
}

#cadastro input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(from var(--accent) r g b / 15%);
}

#login {
    width: min(430px, 90vw);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 2rem 1.8rem 1.6rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#login a{
    color: #20639B;
}

#login a:hover{
    text-decoration: underline;
    color: #17202A;
}

#login h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 600;
    color: var(--text);
}

#login form {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

#login label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: .2rem;
}

#login input {
    width: 100%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .8rem .9rem;
    color: var(--text);
    font-size: .95rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#login input::placeholder {
    color: var(--text-light);
}

#login input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(from var(--accent) r g b / 15%);
}

#cadastro {
    width: min(430px, 90vw);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 2rem 1.8rem 1.6rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    margin: 2rem auto;
}

#cadastro h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 600;
    color: var(--text);
}

#cadastro form {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

#cadastro label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: .2rem;
}

#cadastro input[type="text"],
#cadastro input[type="email"],
#cadastro input[type="password"] {
    width: 100%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .8rem .9rem;
    color: var(--text);
    font-size: .95rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#cadastro input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(from var(--accent) r g b / 15%);
}

.lgpd-box {
    display: grid;
    grid-template-columns: 1.1rem 1fr;
    align-items: start;
    gap: .7rem;
    margin-top: .4rem;
    line-height: 1.5;
    padding: .8rem .9rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background);
    cursor: pointer;
}

.lgpd-box span {
    color: var(--text-secondary);
    font-size: .8rem;
    line-height: 1.5;
}

.erro-msg {
    margin: 0 0 1rem;
    padding: .75rem .9rem;
    border-radius: 10px;
    background: rgb(from var(--danger) r g b / 10%);
    border: 1px solid rgb(from var(--danger) r g b / 25%);
    color: var(--danger);
    font-size: .85rem;
    font-weight: 500;
}

#botoes {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 1rem;
}

.btn {
    border: none;
    border-radius: 12px;
    padding: .8rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, opacity .2s ease;
}

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

#login-btn {
    background: var(--accent);
    color: var(--white);
    width: 100%;
}

#login-btn:hover {
    background: var(--accent-text);
}

#login-theme-btn {
    width: 3.2rem;
    min-width: 3.2rem;
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}

#login-theme-btn:hover {
    background: rgb(from var(--hover) r g b / 12%);
}

#theme-icon {
    color: var(--text);
    font-size: 1.1rem;
}



@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsividade / UI mobile */
@media (max-width: 900px) {
    header {
        padding: 0 1.25rem;
    }

    #user {
        right: 1.25rem;
    }

    main {
        width: calc(100% - 2rem);
    }

    #resume-container {
        gap: 1rem;
    }

    .meta {
        min-width: 48%;
        max-width: 48%;
    }

    .content {
        width: 52%;
    }

    .cards {
        width: calc(33.333% - .7rem);
    }

    #dash-container {
        gap: 1rem;
    }

    .dash,
    .notas {
        min-width: 0;
        max-width: none;
    }

    .dash {
        width: 58%;
    }

    .notas {
        width: 42%;
    }
}

@media (max-width: 900px) {
    :root {
        --mobile-gap: .75rem;
        --mobile-radius: 14px;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        overflow-x: hidden;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    header {
        min-height: 4rem;
        padding: .55rem .8rem;
        gap: .5rem;
    }

    header > h1 {
        font-size: 1.35rem;
        white-space: nowrap;
    }

    header > img {
        width: 2.15rem;
        height: 2.15rem;
    }

    #user {
        right: .8rem;
    }

    .user-menu summary {
        min-height: 2.7rem;
        padding: .4rem .3rem .4rem .5rem;
    }

    .destino-i{
        margin: 5%;
    }

    .destino{
        display: flex;

    }

    .user-menu summary span {
        max-width: 5.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-options {
        right: 0;
        width: min(13rem, calc(100vw - 1.5rem));
    }

    main {
        width: calc(100% - 1rem);
        gap: var(--mobile-gap);
    }

    #title {
        padding: 1rem 0 .35rem;
        min-height: 4.8rem;
    }

    #title h2 {
        max-width: calc(100% - 3rem);
        font-size: clamp(1.60rem, 6.85vw, 2.05rem);
        line-height: 1.1;
        margin-top: .25rem;
    }

    #title p {
        font-size: .93rem;
        margin-top: .3rem;
    }

    #theme-toggle-btn {
        top: .95rem;
        right: 0;
        width: 2.8rem;
        height: 2.5rem;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }

    #theme-toggle-btn i {
        font-size: 1.05rem;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);

    }

    /* Resumo em cima e os 3 cards logo abaixo no mobile */
    #resume-container {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--mobile-gap);
        align-items: stretch;
    }

    .meta {
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 14rem;
        height: 100%;
        border-radius: var(--mobile-radius);
        overflow: hidden;
        grid-column: 1 / -1;
    }

    .meta-img {
        width: 100%;
        height: 100%;
        min-height: 14rem;
        max-height: none;
        flex: 1;
    }

    .meta-content {
        height: 60%;
        padding: .7rem;
        gap: .35rem;
        justify-content: flex-end;
        align-items: flex-start;
    }

    #name-country {
        font-size: 1.10rem;
        line-height: 1.15;
    }

    .title-country {
        grid-template-columns: 2rem 1fr;
        gap: .4rem;
        width: 100%;
    }

    #flag-circle {
        width: 2rem;
        height: 2rem;
    }

    #trip-goal,
    #trip-goal i,
    #trip-goal span,
    #trip-time,
    #trip-time i,
    #trip-time span {
        font-size: .81rem;
        line-height: 1.25;
    }

    .content {
        width: 100%;
        min-width: 0;
        min-height: 14rem;
        padding: 1rem;
        border-radius: var(--mobile-radius);
        overflow: hidden;
    }

    #content-title {
        align-items: flex-start;
        gap: .25rem;
        flex-wrap: wrap;
    }

    #content-title h4{
        margin: .5rem 0;
    }

    .content h3 {
        font-size: 1.20rem;
        line-height: 1.2;
    }

    #obs {
        margin-left: 10%;
        font-size: .70rem;
        line-height: 2.5rem;
    }

    #meta {
        width: 100%;
        margin-top: .85rem;
    }

    #meta p {
        font-size: .65rem;
        line-height: 1.3;
    }

    .target {
        grid-template-columns: 1.6rem 1fr;
        margin-top: .75rem;
        padding: .65rem;
        border-radius: 10px;
    }

    .target i {
        font-size: 1.45rem;
    }

    #target-desc {
        width: 100%;
    }

    #target-desc h4 {
        font-size: .75rem;
    }

    #target-desc p {
        display: none
    }

    /* Cards: 3 cards compactos na linha abaixo do resumo */
    .cards {
        width: 100%;
        min-width: 0;
        min-height: 7rem;
        padding: .7rem .55rem;
        border-radius: var(--mobile-radius);
        gap: .3rem;
        justify-content: center;
    }

    .card-title {
        position: static;
        width: 100%;
        font-size: .81rem;
        line-height: 1.1;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .icone-card {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.35rem;
    }

    .cards span {
        font-size: .95rem;
        line-height: 1.1;
    }

    .cards p {
        font-size: .73rem;
        line-height: 1.15;
        text-align: center;
    }

    #resume-container > .cards {
        grid-column: span 1;
    }

    /* Dashboard: gráfico e notas ficam lado a lado quando há espaço */
    #dash-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--mobile-gap);
        align-items: stretch;
    }

    .notes-modal{
    height: 70vh
}   


    .dash,
    .notas {
        width: 100%;
        min-width: 0;
        max-width: none;
        border-radius: var(--mobile-radius);
    }

    .dash {
        min-height: 0;
        padding: .75rem;
        justify-content: flex-start;
    }

    .grafico {
        width: 100%;
        height: 180px;
    }

    /* Ações ficam logo abaixo do gráfico e continuam em 2 colunas */
    .actions {
        width: 100%;
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
        margin-top: .65rem;
    }

    .quick-btn {
        min-height: 4rem;
        height: 100%;
        padding: .6rem .6rem;
        gap: .5rem;
        border-radius: 11px;
    }

    .quick-btn i {
        flex: 0 0 auto;
        font-size: 1.45rem;
    }

    .quick-btn h3 {
        font-size: 1.02rem;
        line-height: 1.1;
    }

    .quick-btn p {
        font-size: .6rem;
        line-height: 1.15;
    }

    .quick-notes {
        width: 100%;
        margin-top: .65rem;
        padding: .55rem;
        gap: .4rem;
        border-radius: 10px;
    }

    #notes-txt {
        padding-top: .3rem;
    }

    #notes-txt span {
        font-size: 1.25rem;
    }

    .notas {
        min-height: 0;
        padding: .75rem;
    }

    .notas h3,
    .quick > h3 {
        font-size: 1.12rem;
        line-height: 1.15;
        margin-bottom: .45rem;
    }

    .notas-container {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        height: 100%;
        gap: .45rem;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .nota {
        width: 100%;
        max-width: 100%;
        min-height: 3.4rem;
        height: auto;
        padding: .65rem .55rem .65rem 1.7rem;
        font-size: .97rem;
        flex: 0 0 auto;
    }

    .pin {
        top: 4px;
        left: 4px;
        font-size: 1rem;
    }

    textarea {
        width: 100%;
        min-height: 5.5rem;
        font-size: .85rem;
    }

    /* Touch targets */
    button,
    select,
    input[type="button"],
    input[type="submit"],
    .icon-btn {
        min-height: 2.75rem;
    }

    .icon-btn {
        min-width: 2.75rem;
        display: grid;
        place-items: center;
    }

    /* Modais */
    dialog {
        width: calc(100% - 1rem);
        max-width: none;
        max-height: calc(100dvh - 1rem);
        margin: auto;
        border-radius: var(--mobile-radius);
    }

    dialog h2 {
        padding: 1rem;
        font-size: 1.4rem;
    }

    dialog form {
        padding: .85rem 1rem 1rem;
    }

    dialog input,
    dialog select,
    dialog textarea,
    dialog button,
    form button {
        min-height: 2.8rem;
        font-size: .95rem;
    }

    .trip-list {
        padding: .75rem 1rem 0;
    }

    .trip-item {
        min-height: 3.1rem;
        padding: .55rem .65rem;
    }

    .trip-modal-actions {
        padding: .85rem 1rem 1rem;
    }

    /* Login/cadastro */
    #login,
    #cadastro {
        position: static;
        width: calc(100% - 1rem);
        margin: .75rem auto;
        padding: 1.35rem 1rem 1rem;
        transform: none;
    }

    #login h1,
    #cadastro h1 {
        font-size: 2.1rem;
    }

    #login input,
    #cadastro input:not([type="checkbox"]),
    #login-btn,
    #login-theme-btn {
        min-height: 2.9rem;
        font-size: .95rem;
    }

    #login-theme-btn {
        width: 3rem;
        min-width: 3rem;
    }

    .lgpd-box {
        padding: .7rem;
    }

    footer {
        margin: .75rem 0 1rem;
        font-size: 1rem;
    }
}

/* Celulares estreitos: somente aqui reduzimos para uma coluna */
@media (max-width: 390px) {
    header > h1 {
        font-size: .95rem;
    }

    .user-menu summary span {
        max-width: 5rem;
    }

    #resume-container {
        grid-template-columns: 1fr 1fr;
    }

    .meta {
        min-height: 12.5rem;
    }

    .meta-img {
        min-height: 12.5rem;
    }

    .content {
        min-height: 12.5rem;
        padding: .8rem;
    }

    .content h3 {
        font-size: .80rem;
    }

    .cards {
        min-height: 6.5rem;
    }

    .icone-card {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.2rem;
    }

    .cards span {
        font-size: .57rem;
    }

    #dash-container {
        grid-template-columns: 1fr;
    }

    .grafico {
        height: 190px;
    }

    .notas {
        min-height: 12rem;
    }
}

@media (max-width: 340px) {
    #resume-container {
        grid-template-columns: 1fr;
    }

    .meta,
    .content,
    #resume-container > .cards {
        grid-column: 1;
    }

    .meta,
    .meta-img,
    .content {
        min-height: 13rem;
    }

    .cards {
        min-height: 6rem;
    }

    #botoes {
        grid-template-columns: 1fr 3rem;
    }
}

@media (max-height: 600px) and (max-width: 600px) {
    #title {
        padding-top: .6rem;
    }

    #title h2 {
        font-size: 1.35rem;
    }

    .meta,
    .meta-img,
    .content {
        min-height: 11rem;
    }

    .grafico {
        height: 145px;
    }

    #login,
    #cadastro {
        margin: .5rem auto;
    }

    #login::before,
    #cadastro::before {
        margin-bottom: .75rem;
    }
}
