@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #2267e9;
    --primary-dark: #1a52c0;
    --accent: #008a4b;
    --accent-dark: #006c3a;
    --secondary: #ee2e34;
    --secondary-dark: #c7252a;
    --tertiary: #fff20a;
    --tertiary-dark: #d9c600;
    --black: #1a1a1a;
    --white: #ffffff;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    min-height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Número da versão*/
.version {
    font-size: 0.75rem;
    color: #535353;
    margin-top: 0.5rem;
}

/* Elementos de fundo com gradientes orgânicos */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
}

.bg-element-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    top: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite;
}

.bg-element-2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(45deg, var(--secondary), var(--tertiary));
    bottom: -150px;
    right: -150px;
    animation: float 18s ease-in-out infinite reverse;
}

.bg-element-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    bottom: 50px;
    left: 30%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, 50px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 80px) rotate(240deg);
    }
}

/* Container principal */
.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 80px); /* Garante espaço para o footer */
}

/* Cartão de login com efeito de vidro */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 
        0 20px 40px var(--glass-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 50px var(--glass-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0)
    );
    transform: rotate(25deg);
    pointer-events: none;
}

/* Branding */
.branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.color-line {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

/* Título */
.title {
    color: rgb(46, 46, 46);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--accent), var(--accent-dark));
}

/* Campos de entrada */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
}

.input-field {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--secondary);
    box-shadow: 0 8px 15px rgba(238, 46, 52, 0.15);
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.input-field:focus + .input-icon {
    color: var(--secondary);
}

/* Botão */
.btn {
    width: 100%;
    background: linear-gradient(to right, var(--secondary), var(--secondary-dark));
    border: none;
    outline: none;
    height: 50px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    box-shadow: 0 4px 6px rgba(238, 46, 52, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(238, 46, 52, 0.3);
}

.btn:hover::before {
    left: 100%;
}

/* Footer */
.login-footer {
    background: linear-gradient(to right, var(--black), #2d2d2d);
    color: var(--white);
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    margin-top: auto;
    z-index: 100;
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-left, .footer-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.footer-right {
    text-align: right;
}

.footer-center {
    flex: 0 0 auto;
    padding: 0 1rem;
}

.footer-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 1rem;
}

.footer-line {
    margin-bottom: 0.2rem;
}

.footer-email {
    color: var(--accent) !important;
    text-decoration: none;
}

.footer-email:hover {
    text-decoration: underline;
}

.text-muted {
    color: #ccc !important;
}

/* ========== RESPONSIVIDADE ========== */

/* Tablets pequenos e smartphones grandes */
@media (max-width: 767.98px) {
    .login-card {
        padding: 2rem 1.5rem;
        max-width: 400px;
    }
    
    .bg-element {
        display: none;
    }
    
    body {
        background: linear-gradient(135deg, #e4e8f0 0%, #d1d9e8 100%);
    }
    
    .logo {
        width: 150px;
    }
    
    .title {
        font-size: 1.6rem;
    }
    
    .input-field {
        padding: 0.9rem 0.9rem 0.9rem 2.8rem;
        font-size: 0.95rem;
    }
    
    .input-icon {
        font-size: 1rem;
        left: 0.9rem;
    }
    
    .btn {
        height: 48px;
        font-size: 0.95rem;
    }
}

/* Smartphones médios */
@media (max-width: 576px) {
    .main-container {
        padding: 0.8rem;
    }
    
    .login-card {
        padding: 1.8rem 1.2rem;
        border-radius: 20px;
    }
    
    .branding {
        margin-bottom: 2rem;
    }
    
    .logo {
        width: 130px;
    }
    
    .title {
        font-size: 1.5rem;
        margin-bottom: 1.8rem;
    }
    
    .input-group {
        margin-bottom: 1.2rem;
    }
    
    .input-field {
        padding: 0.85rem 0.85rem 0.85rem 2.7rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .input-icon {
        font-size: 0.95rem;
        left: 0.85rem;
    }
    
    .btn {
        height: 46px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .version {
        font-size: 0.7rem;
    }
}

/* Smartphones pequenos (retrato) */
@media (max-width: 480px) {
    .main-container {
        padding: 0.5rem;
        min-height: calc(100vh - 70px);
    }
    
    .login-card {
        padding: 1.5rem 1rem;
        border-radius: 18px;
    }
    
    .branding {
        margin-bottom: 1.5rem;
    }
    
    .logo {
        width: 120px;
    }
    
    .title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .input-field {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
        font-size: 0.85rem;
    }
    
    .input-icon {
        font-size: 0.9rem;
        left: 0.8rem;
    }
    
    .btn {
        height: 44px;
        font-size: 0.85rem;
    }
    
    .footer-line {
        font-size: 0.65rem;
    }
    
    .login-footer {
        padding: 0.7rem 0.8rem;
        font-size: 0.7rem;
    }
}

/* Smartphones muito pequenos (menos de 360px) */
@media (max-width: 359px) {
    .login-card {
        padding: 1.2rem 0.8rem;
        border-radius: 16px;
    }
    
    .logo {
        width: 100px;
    }
    
    .title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }
    
    .input-field {
        padding: 0.7rem 0.7rem 0.7rem 2.3rem;
        font-size: 0.8rem;
    }
    
    .input-icon {
        font-size: 0.85rem;
        left: 0.7rem;
    }
    
    .btn {
        height: 42px;
        font-size: 0.8rem;
    }
    
    .footer-line {
        font-size: 0.6rem;
    }
    
    .login-footer {
        padding: 0.6rem 0.7rem;
        font-size: 0.65rem;
    }
}

/* Ajustes para orientação paisagem em dispositivos móveis */
@media (max-height: 500px) and (orientation: landscape) {
    .main-container {
        padding: 0.5rem;
        align-items: flex-start;
        min-height: auto;
    }
    
    .login-card {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .branding {
        margin-bottom: 1.5rem;
    }
    
    .logo {
        width: 100px;
    }
    
    .title {
        margin-bottom: 1.5rem;
    }
    
    .input-group {
        margin-bottom: 1rem;
    }
}

/* Animações de entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeIn 0.8s ease-out forwards;
}