@font-face {
    font-family: "Inter";
    src: url("../fonte/inter/static/Inter_18pt-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --fundo: #07050f;
    --roxo: #8b5cf6;
    --roxo-claro: #c4b5fd;
    --roxo-forte: #6d28d9;
    --texto: #f5f3ff;
    --texto-suave: #a79cc7;
    --borda: rgba(139, 92, 246, .22);
    --card: rgba(20, 14, 38, .72);
    --erro: #f87171;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--texto);
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(109, 40, 217, .35), transparent 60%),
        radial-gradient(800px 500px at 110% 10%, rgba(139, 92, 246, .22), transparent 60%),
        var(--fundo);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.painel {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

[hidden] { display: none !important; }

/* ---------- Tela de login ---------- */
.tela-login {
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: entrar .6s ease both;
}

.cadeado {
    width: 96px;
    height: 96px;
    margin: 0 auto 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--roxo);
    background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, .28), rgba(20, 14, 38, .9) 70%);
    border: 1px solid var(--borda);
    box-shadow: 0 0 40px rgba(139, 92, 246, .35);
}

h1 {
    margin: 0;
    font-size: clamp(1.9rem, 6vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -.02em;
}

h1 span { color: var(--roxo); }

.sub {
    margin: 12px auto 30px;
    max-width: 320px;
    color: var(--texto-suave);
    font-size: clamp(.95rem, 3.6vw, 1.05rem);
    line-height: 1.5;
}

.pin {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 3vw, 18px);
}

.pin input {
    width: clamp(58px, 16vw, 72px);
    height: clamp(64px, 17vw, 76px);
    border-radius: 16px;
    border: 1.5px solid var(--borda);
    background: rgba(20, 14, 38, .7);
    color: var(--texto);
    font: inherit;
    font-size: 1.9rem;
    text-align: center;
    caret-color: var(--roxo-claro);
    outline: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.pin input:focus {
    border-color: var(--roxo);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .22), 0 0 24px rgba(139, 92, 246, .3);
}

.pin input:not(:placeholder-shown) { border-color: rgba(139, 92, 246, .6); }

.erro {
    min-height: 1.4em;
    margin: 14px 0 6px;
    color: var(--erro);
    font-size: .95rem;
}

.btn-entrar {
    position: relative;
    width: 100%;
    height: 56px;
    margin-top: 10px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    color: #fff;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(124, 58, 237, .35);
    transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-entrar:active { transform: scale(.98); }

.btn-entrar:disabled { cursor: progress; opacity: .85; }

.btn-texto { transition: opacity .2s; }

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
}

.btn-entrar.carregando .btn-texto { opacity: 0; }
.btn-entrar.carregando .spinner { opacity: 1; animation: girar .7s linear infinite; }

.rodape-login {
    margin: 28px 0 0;
    color: var(--texto-suave);
    font-size: .85rem;
}

/* ---------- Painel de links ---------- */
.tela-links {
    width: 100%;
    max-width: 480px;
    animation: entrar .5s ease both;
}

.cab-links {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.icone-links {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    box-shadow: 0 8px 24px rgba(124, 58, 237, .4);
}

.cab-links h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.cab-links p {
    margin: 4px 0 0;
    color: var(--texto-suave);
    font-size: .95rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--borda);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
    transition: border-color .25s, transform .25s;
}

.card + .card { margin-top: 14px; }

.card:hover {
    border-color: rgba(139, 92, 246, .55);
    transform: translateY(-2px);
}

.card-topo h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.card-topo p {
    margin: 6px 0 0;
    color: var(--texto-suave);
    font-size: .95rem;
}

.link-caixa {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(7, 5, 15, .6);
    border: 1px solid var(--borda);
    font-size: .95rem;
    color: var(--roxo-claro);
    overflow-wrap: anywhere;
}

.btn-copiar {
    width: 100%;
    height: 52px;
    margin-top: 14px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-copiar:active { transform: scale(.98); }

.btn-copiar.copiado {
    background: linear-gradient(90deg, #059669, #34d399);
}

/* ---------- Lista de projetos ---------- */
.titulo-secao {
    margin: 34px 0 0;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -.01em;
}

.sub-secao {
    margin: 6px 0 16px;
    color: var(--texto-suave);
    font-size: .92rem;
}

.lista-projetos {
    display: grid;
    gap: 10px;
    padding-bottom: 8px;
}

.item-projeto {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    background: var(--card);
    border: 1px solid var(--borda);
    border-radius: 16px;
    transition: border-color .25s;
}

.item-info { flex: 1 1 auto; min-width: 0; }

.item-info h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.item-link {
    display: block;
    margin-top: 4px;
    color: var(--roxo-claro);
    font-size: .8rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.btn-copiar.btn-copiar-mini {
    width: auto;
    min-width: 88px;
    height: 42px;
    margin-top: 0;
    padding: 0 16px;
    flex: 0 0 auto;
    border-radius: 12px;
    font-size: .9rem;
}

/* ---------- Hover e movimento (só quando o aparelho tem mouse) ---------- */
@media (hover: hover) and (pointer: fine) {
    .btn-entrar:hover { box-shadow: 0 14px 36px rgba(124, 58, 237, .5); }
    .btn-copiar:hover { box-shadow: 0 10px 28px rgba(124, 58, 237, .4); }
    .item-projeto:hover { border-color: rgba(139, 92, 246, .55); }
}

@keyframes entrar {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes girar {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- Telas pequenas ---------- */
@media (max-width: 360px) {
    .cadeado { width: 80px; height: 80px; }
    .card { padding: 18px; }
}
