/* Identity / Login — ProEscola (Bootstrap + animações) */
:root {
    --identity-primary: hsl(213 78% 32%);
    --identity-accent: hsl(204 70% 51%);
    --identity-glow: hsl(204 70% 51% / 0.45);
    --identity-card-border: rgba(13, 110, 253, 0.08);
}

html {
    scroll-behavior: smooth;
}

.identity-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, hsl(213 45% 18%) 0%, hsl(213 50% 24%) 45%, hsl(204 55% 32%) 100%);
}

.identity-site-header {
    position: relative;
    z-index: 10;
}

.identity-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.identity-brand-text {
    color: var(--identity-primary);
    letter-spacing: -0.02em;
}

.identity-nav-cta {
    border: 1px solid rgba(13, 110, 253, 0.35);
    color: var(--identity-primary);
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.identity-nav-cta:hover {
    background: linear-gradient(135deg, hsl(204 70% 51%), hsl(213 78% 32%));
    border-color: transparent;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--identity-glow);
}

.identity-site-footer {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Fundo animado da página de login */
.identity-login-shell {
    position: relative;
    flex: 1;
    overflow: hidden;
    padding-bottom: 2rem;
}

.identity-login-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, hsl(204 70% 55% / 0.35), transparent),
        radial-gradient(ellipse 60% 50% at 100% 50%, hsl(35 60% 55% / 0.12), transparent);
    pointer-events: none;
}

/* Textura em malha (profissional, discreta) */
.identity-login-mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 20%, transparent 70%);
    pointer-events: none;
    opacity: 0.9;
}

.identity-login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    opacity: 0.45;
    animation: identityBlobFloat 14s ease-in-out infinite;
}

.identity-login-blob-1 {
    width: min(420px, 70vw);
    height: min(420px, 70vw);
    top: -80px;
    right: -100px;
    background: hsl(204 70% 50%);
}

.identity-login-blob-2 {
    width: min(360px, 60vw);
    height: min(360px, 60vw);
    bottom: -60px;
    left: -80px;
    background: hsl(213 78% 40%);
    animation-delay: -7s;
}

@keyframes identityBlobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-12px, 18px) scale(1.05); }
    66% { transform: translate(10px, -10px) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
    .identity-login-blob {
        animation: none;
    }
    .identity-login-card-anim,
    .identity-login-header-anim,
    .identity-login-form-anim,
    .identity-login-hint-anim {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

.identity-login-container {
    position: relative;
    z-index: 2;
}

.identity-login-card {
    position: relative;
    border-radius: 1.25rem !important;
    background: rgba(255, 255, 255, 0.98) !important;
    overflow: hidden;
    border: 1px solid var(--identity-card-border) !important;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 24px 48px -12px rgba(13, 60, 120, 0.18) !important;
}

.identity-login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, hsl(213 78% 32%), hsl(204 70% 51%), hsl(35 60% 55%));
    z-index: 1;
}

.identity-login-badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: hsl(213 78% 34%);
    background: linear-gradient(135deg, hsl(213 78% 96%), hsl(204 70% 96%));
    border: 1px solid hsl(204 70% 85% / 0.6);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
}

.identity-login-title {
    letter-spacing: -0.02em;
    color: hsl(215 35% 18%);
}

.identity-login-trust {
    font-size: 0.8125rem;
}

.identity-login-trust i {
    opacity: 0.9;
}

.identity-login-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(13, 60, 120, 0.15), transparent);
    opacity: 1;
}

.identity-login-field {
    animation: identityFieldIn 0.45s ease both;
}

.identity-login-field + .identity-login-field {
    animation-delay: 0.08s;
}

@keyframes identityFieldIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .identity-login-field {
        animation: none !important;
    }
}

.identity-login-card-anim {
    animation: identityCardIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes identityCardIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.identity-login-header-anim {
    animation: identityFadeUp 0.6s ease 0.12s both;
}

.identity-login-form-anim {
    animation: identityFadeUp 0.6s ease 0.22s both;
}

.identity-login-hint-anim {
    animation: identityFadeUp 0.7s ease 0.4s both;
}

@keyframes identityFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.identity-login-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: linear-gradient(135deg, hsl(213 78% 32%), hsl(204 70% 48%));
    box-shadow: 0 8px 28px hsl(204 70% 45% / 0.4);
    animation: identityIconPulse 3s ease-in-out infinite;
}

@keyframes identityIconPulse {
    0%, 100% { box-shadow: 0 8px 28px hsl(204 70% 45% / 0.4); }
    50% { box-shadow: 0 10px 36px hsl(204 70% 50% / 0.55); }
}

.identity-login-icon {
    font-size: 1.75rem;
    color: #fff;
}

.identity-login-link {
    color: hsl(204 55% 38%);
}

.identity-login-link:hover {
    color: hsl(213 78% 28%);
}

.identity-login-submit {
    position: relative;
    overflow: hidden;
    border: none;
    color: #fff !important;
    background: linear-gradient(135deg, hsl(213 78% 32%), hsl(204 70% 48%)) !important;
    box-shadow: 0 8px 24px hsl(204 70% 40% / 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.identity-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px hsl(204 70% 45% / 0.55);
}

.identity-login-submit:active {
    transform: translateY(0);
}

.identity-login-submit-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: identityShine 4s ease-in-out infinite;
}

@keyframes identityShine {
    0%, 70% { transform: translateX(-100%); }
    85% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.text-shadow-sm {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.identity-login-card .form-control:focus {
    border-color: hsl(204 70% 50%);
    box-shadow: 0 0 0 0.2rem hsl(204 70% 50% / 0.2);
}

.identity-login-card .form-control {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

::selection {
    background: hsl(204 70% 50% / 0.25);
}

.identity-site-header .navbar-brand img {
    transition: transform 0.25s ease;
}

.identity-site-header .navbar-brand:hover img {
    transform: scale(1.03);
}
