/* ══════════════════════════════════════════════════════════════════
   Painel "IH ID" — a conta do passageiro sem sair da página
   Usa as variáveis de css/esam-modern.css (cores do logótipo).
   ══════════════════════════════════════════════════════════════════ */
.ih-conta { position: fixed; inset: 0; z-index: 1080; visibility: hidden; }
.ih-conta__fundo { position: absolute; inset: 0; background: rgba(11, 15, 25, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s ease; }
.ih-conta__painel {
    position: absolute; top: 12px; right: 12px; bottom: 12px;
    width: min(440px, calc(100vw - 24px));
    display: flex; flex-direction: column;
    background: var(--ih-ink);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    transform: translateX(calc(100% + 24px));
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.ih-conta-aberta .ih-conta { visibility: visible; }
.ih-conta-aberta .ih-conta__fundo { opacity: 1; }
.ih-conta-aberta .ih-conta__painel { transform: none; }
body.ih-conta-aberta { overflow: hidden; }

/* topo com o anel do logótipo */
.ih-conta__topo {
    position: relative;
    display: flex; align-items: center; gap: .9rem;
    padding: 1.25rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    overflow: hidden;
}
.ih-conta__topo::before {
    content: ""; position: absolute; right: -70px; top: -100px;
    width: 230px; height: 230px; border-radius: 50%;
    border: 26px solid var(--ih-amarelo);
    opacity: .12;
}
.ih-conta__marca { position: relative; flex: none; display: inline-flex; align-items: center; height: 46px; }
.ih-conta__marca img { height: 46px; width: auto; }
.ih-conta__topo > div { position: relative; padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .12); }
.ih-conta__sobre { display: block; white-space: nowrap; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--ih-amarelo); }
.ih-conta__topo h2 { margin: .15rem 0 0; font-size: 1.25rem; font-weight: 800; color: #fff; }
.ih-conta__fechar { position: relative; margin-left: auto; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); background: transparent; color: #fff; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.ih-conta__fechar:hover { background: rgba(255, 255, 255, .1); transform: rotate(90deg); }

.ih-conta__corpo { flex: 1; overflow-y: auto; padding: 1.4rem; }
.ih-conta__rodape { padding: .9rem 1.4rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; text-align: center; color: rgba(255, 255, 255, .5); }
.ih-conta__rodape a { color: var(--ih-amarelo); }

.ih-conta__carregar { display: flex; align-items: center; justify-content: center; gap: .7rem; padding: 3rem 0; color: rgba(255, 255, 255, .65); }
.ih-conta__carregar span { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--ih-amarelo); animation: ihGirar .8s linear infinite; }
@keyframes ihGirar { to { transform: rotate(360deg); } }

/* bilhete ilustrativo, com o autocarro a percorrer a rota */
.ih-conta__bilhete {
    position: relative;
    padding: 1.2rem 1.3rem;
    margin-bottom: 1.3rem;
    border-radius: 16px;
    background: var(--ih-degrade);
    color: var(--ih-ink);
}
.ih-conta__bilhete::before, .ih-conta__bilhete::after {
    content: ""; position: absolute; top: 58px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--ih-ink);
}
.ih-conta__bilhete::before { left: -10px; }
.ih-conta__bilhete::after { right: -10px; }
.ih-conta__bilhete-rota { display: flex; align-items: center; gap: .8rem; padding-bottom: .9rem; border-bottom: 2px dashed rgba(11, 15, 25, .25); }
.ih-conta__bilhete-rota strong { font-family: var(--ih-titulos); font-size: 1.6rem; font-weight: 800; letter-spacing: .02em; }
.ih-conta__bilhete-rota span { position: relative; flex: 1; height: 2px; background: rgba(11, 15, 25, .3); }
.ih-conta__bilhete-rota span i { position: absolute; top: 50%; left: 6%; transform: translate(-50%, -50%); padding: 0 .35rem; border-radius: 6px; background: #ffd21f; font-size: .9rem; animation: ihViajar 3.5s ease-in-out infinite; }
@keyframes ihViajar { 0%, 100% { left: 6%; } 50% { left: 94%; } }
.ih-conta__bilhete p { margin: .9rem 0 0; color: rgba(11, 15, 25, .78); font-size: .92rem; line-height: 1.45; }

.ih-conta__alerta { margin-bottom: 1rem; padding: .75rem .95rem; border-radius: 12px; background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); color: #fecaca; font-size: .88rem; }
.ih-conta__alerta--ok { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); color: #bbf7d0; }

/* selector deslizante Entrar | Criar conta */
.ih-conta__seletor { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 1.3rem; border-radius: 14px; background: var(--ih-ink-2); border: 1px solid rgba(255, 255, 255, .08); }
.ih-conta__seletor[hidden] { display: none; }
.ih-conta__seletor button { position: relative; z-index: 1; height: 42px; border: 0; background: none; font: 700 .92rem var(--ih-corpo); color: rgba(255, 255, 255, .6); cursor: pointer; transition: color .25s ease; }
.ih-conta__seletor button.activo { color: var(--ih-ink); }
.ih-conta__seletor-marca { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--ih-degrade); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.ih-conta__seletor.no-registar .ih-conta__seletor-marca { transform: translateX(100%); }

/* campos */
.ih-conta label { display: block; margin: 0 0 .4rem; font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .75); }
.ih-conta__campo { position: relative; display: flex; align-items: center; margin-bottom: 1rem; border-radius: 12px; background: var(--ih-ink-2); border: 1.5px solid rgba(255, 255, 255, .1); transition: border-color .2s ease, box-shadow .2s ease; }
.ih-conta__campo:focus-within { border-color: var(--ih-amarelo); box-shadow: 0 0 0 4px rgba(255, 210, 31, .15); }
.ih-conta__campo > i { width: 44px; text-align: center; color: rgba(255, 255, 255, .45); }
.ih-conta__campo input { flex: 1; min-width: 0; height: 50px; padding: 0 .9rem 0 0; border: 0; background: transparent; font: 500 .98rem var(--ih-corpo); color: #fff; outline: none; }
.ih-conta__campo input::placeholder { color: rgba(255, 255, 255, .35); }
.ih-conta__olho { width: 44px; height: 44px; border: 0; background: none; color: rgba(255, 255, 255, .55); cursor: pointer; }
.ih-conta__olho:hover { color: var(--ih-amarelo); }
.ih-conta__duplo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
.ih-conta__armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ih-conta__ajuda { margin: -.4rem 0 1.1rem; text-align: right; font-size: .85rem; }
.ih-conta__ajuda a,
.ih-conta__ajuda button { padding: 0; border: 0; background: none; font: inherit; color: var(--ih-amarelo); cursor: pointer; }
.ih-conta__ajuda button:disabled { color: rgba(255, 255, 255, .4); cursor: default; }
.ih-conta__ajuda { color: rgba(255, 255, 255, .6); }
.ih-conta__campo input.ih-conta__codigo { font-family: var(--ih-titulos); font-size: 1.4rem; font-weight: 800; letter-spacing: .5em; }
.ih-conta__enviar { width: 100%; }
.ih-conta__enviar:disabled { opacity: .7; cursor: wait; transform: none; }

/* força da palavra-passe */
.ih-conta__forca { height: 5px; margin: -.4rem 0 1.1rem; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ih-conta__forca span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .3s ease, background .3s ease; }
.ih-conta__forca[data-nivel="0"] span, .ih-conta__forca[data-nivel="1"] span { width: 25%; background: #ef4444; }
.ih-conta__forca[data-nivel="2"] span { width: 55%; background: #f59e0b; }
.ih-conta__forca[data-nivel="3"] span { width: 80%; background: var(--ih-amarelo); }
.ih-conta__forca[data-nivel="4"] span { width: 100%; background: #22c55e; }

.ih-conta label.ih-conta__termos { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1.2rem; font-weight: 500; line-height: 1.45; }
.ih-conta__termos input { margin-top: .2rem; accent-color: var(--ih-amarelo); }
.ih-conta__termos a { color: var(--ih-amarelo); text-decoration: underline; }

.ih-conta__balcao {
    width: 100%; display: flex; align-items: center; gap: .8rem;
    margin-top: 1.1rem; padding: .9rem 1rem;
    border-radius: 14px; border: 1px dashed rgba(255, 210, 31, .4);
    background: rgba(255, 210, 31, .06); color: rgba(255, 255, 255, .8);
    font: 500 .88rem var(--ih-corpo); text-align: left; cursor: pointer;
    transition: background .2s ease;
}
.ih-conta__balcao:hover { background: rgba(255, 210, 31, .12); }
.ih-conta__balcao > i:first-child { color: var(--ih-amarelo); font-size: 1.1rem; }
.ih-conta__balcao b { display: block; color: #fff; }
.ih-conta__voltar { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem; border: 0; background: none; padding: 0; font: 600 .88rem var(--ih-corpo); color: rgba(255, 255, 255, .65); cursor: pointer; }
.ih-conta__voltar:hover { color: var(--ih-amarelo); }
.ih-conta__subtitulo { margin: 0 0 .4rem; font-size: 1.35rem; font-weight: 800; color: #fff; }
.ih-conta__texto { margin: 0 0 1.2rem; color: rgba(255, 255, 255, .65); font-size: .92rem; }
.ih-conta__texto b { color: var(--ih-amarelo); }

/* com sessão: saudação, cartão de embarque, números e atalhos */
.ih-conta__ola { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.3rem; }
.ih-conta__avatar {
    flex: none; width: 58px; height: 58px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px; background: var(--ih-degrade);
    font-family: var(--ih-titulos); font-size: 1.4rem; font-weight: 800; color: var(--ih-ink);
}
.ih-conta__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--ih-ink); }
.ih-conta__ola small { display: block; font-size: .85rem; color: rgba(255, 255, 255, .6); }
.ih-conta__ola strong { display: block; font-family: var(--ih-titulos); font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.ih-conta__ola div > span { display: block; font-size: .82rem; color: rgba(255, 255, 255, .5); }

.ih-embarque { display: block; border-radius: 18px; background: var(--ih-degrade); color: var(--ih-ink); overflow: hidden; transition: transform .2s ease; }
.ih-embarque[hidden] { display: none; }
.ih-embarque:hover { transform: translateY(-3px); color: var(--ih-ink); }
.ih-embarque__topo { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.2rem 0; }
.ih-embarque__topo small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.ih-embarque__topo em { font-style: normal; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 20px; background: rgba(11, 15, 25, .12); }
.ih-embarque__topo em.pago { background: var(--ih-ink); color: #86efac; }
.ih-embarque__rota { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1.2rem 1rem; }
.ih-embarque__rota > span { display: flex; flex-direction: column; }
.ih-embarque__rota > span:last-child { text-align: right; }
.ih-embarque__rota b { font-family: var(--ih-titulos); font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.ih-embarque__rota small { font-size: .8rem; font-weight: 600; opacity: .7; }
.ih-embarque__rota > i { font-size: 1.2rem; }
.ih-embarque__dados { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .9rem 1.2rem; border-top: 2px dashed rgba(11, 15, 25, .25); }
.ih-embarque__dados small { display: block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .65; }
.ih-embarque__dados b { font-family: var(--ih-titulos); font-size: 1.05rem; }
.ih-embarque__rodape { display: flex; align-items: center; gap: .4rem; padding: .75rem 1.2rem; background: var(--ih-ink); color: var(--ih-amarelo); font-size: .86rem; font-weight: 700; }
.ih-embarque__rodape span { margin-right: auto; color: rgba(255, 255, 255, .6); font-weight: 500; }

.ih-conta__semviagem { display: flex; align-items: center; gap: .9rem; padding: 1.1rem; border-radius: 16px; border: 1px dashed rgba(255, 210, 31, .4); background: rgba(255, 210, 31, .06); color: rgba(255, 255, 255, .75); font-size: .88rem; }
.ih-conta__semviagem[hidden] { display: none; }
.ih-conta__semviagem:hover { color: #fff; background: rgba(255, 210, 31, .12); }
.ih-conta__semviagem > i:first-child { font-size: 1.5rem; color: var(--ih-amarelo); }
.ih-conta__semviagem b { display: block; color: #fff; }

.ih-conta__numeros { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0; }
.ih-conta__numeros > div { padding: .9rem 1rem; border-radius: 14px; background: var(--ih-ink-2); border: 1px solid rgba(255, 255, 255, .07); }
.ih-conta__numeros small { display: block; font-size: .74rem; color: rgba(255, 255, 255, .55); }
.ih-conta__numeros strong { font-family: var(--ih-titulos); font-size: 1.25rem; font-weight: 800; color: var(--ih-amarelo); }
.ih-conta__atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ih-conta__atalhos a { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: 14px; background: var(--ih-ink-2); border: 1px solid rgba(255, 255, 255, .07); font-size: .9rem; font-weight: 600; color: #fff; transition: border-color .2s ease, transform .2s ease; }
.ih-conta__atalhos a:hover { border-color: var(--ih-amarelo); transform: translateY(-2px); color: #fff; }
.ih-conta__atalhos i { font-size: 1.15rem; color: var(--ih-amarelo); }
.ih-conta__sair { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.2rem; padding: .8rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .7); }
.ih-conta__sair:hover { color: #fecaca; border-color: rgba(239, 68, 68, .45); }

/* no telemóvel o painel sobe de baixo, como uma folha */
@media (max-width: 575.98px) {
    .ih-conta__painel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; transform: translateY(100%); }
    .ih-conta__duplo { grid-template-columns: 1fr; gap: 0; }
    .ih-conta__marca img { height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
    .ih-conta__bilhete-rota span i { animation: none; left: 50%; }
    .ih-conta__painel { transition: none; }
}
