/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configurações do body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 25%, #2d2d2d 75%, #1a1a1a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animação de fundo */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Partículas de fundo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Container principal do login */
.login-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 450px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(120, 119, 198, 0.1) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(255, 119, 198, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.login-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-wrapper:hover::before {
    opacity: 1;
}

/* Seção da imagem */
.login-image {
    width: 100%;
    height: 200px;
    background: url('../../imagens/logi.png') no-repeat center center/cover;
    position: relative;
    overflow: hidden;
}

.login-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(120, 119, 198, 0.2) 0%,
        rgba(255, 119, 198, 0.1) 50%,
        rgba(120, 219, 255, 0.2) 100%
    );
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.login-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(30, 30, 30, 0.1) 50%,
        rgba(30, 30, 30, 0.8) 100%);
}

.login-wrapper:hover .login-image::before {
    opacity: 1;
}

/* Formulário de login */
.login-form {
    width: 100%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-form p {
    font-size: 14px;
    margin-bottom: 30px;
    color: #b0b0b0;
    text-align: center;
    line-height: 1.5;
}

/* Labels dos campos */
.form-label {
    display: block;
    margin-bottom: 8px;
    color: #cccccc;
    font-weight: 500;
    font-size: 14px;
}

/* Campos de entrada */
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e0e0e0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: rgba(var(--primary-rgb), 0.8);
    background: rgba(51, 51, 51, 0.9);
    box-shadow: 
        0 0 0 4px rgba(var(--primary-rgb), 0.1),
        0 8px 20px rgba(var(--primary-rgb), 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
    color: #888;
    transition: color 0.3s ease;
}

.login-form input[type="text"]:focus::placeholder,
.login-form input[type="password"]:focus::placeholder {
    color: #aaa;
}

/* Container da senha com botão de visibilidade */
.password-container {
    position: relative;
    margin-bottom: 20px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #888;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #cccccc;
}

/* Botão de submit */
.login-form input[type="submit"] {
    width: 100%;
    padding: 16px;
    margin: 20px 0;
    background: linear-gradient(135deg, 
        rgb(var(--primary-rgb)) 0%, 
        rgb(var(--secondary-rgb)) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 20px rgba(var(--primary-rgb), 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-form input[type="submit"]::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: left 0.6s ease;
}

.login-form input[type="submit"]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 30px rgba(var(--primary-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-form input[type="submit"]:hover::before {
    left: 100%;
}

.login-form input[type="submit"]:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.1s ease;
}

.login-form input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

.login-form input[type="submit"]:disabled::before {
    display: none;
}

/* Links */
.forgot-password,
.register-link {
    text-decoration: none;
    color: rgb(var(--primary-rgb));
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
}

.forgot-password {
    margin-bottom: 10px;
}

.register-link {
    margin-top: 20px;
    font-weight: 500;
}

.forgot-password:hover,
.register-link:hover {
    color: rgb(var(--secondary-rgb));
    text-decoration: underline;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.toast {
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    min-width: 320px;
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateX(120%) scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(120, 119, 198, 0.05) 0%, 
        transparent 50%, 
        rgba(255, 119, 198, 0.05) 100%);
    pointer-events: none;
}

.toast.active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.toast .icon {
    font-size: 24px;
    margin-top: 2px;
    color: rgb(var(--primary-rgb));
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
}

.toast .message {
    flex: 1;
}

.toast .message-text {
    display: block;
    color: #e0e0e0;
}

.toast .text-1 {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    color: #ffffff;
}

.toast .text-2 {
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.4;
}

.toast-close {
    cursor: pointer;
    color: #888;
    font-size: 18px;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.toast-close:hover {
    color: #cccccc;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.toast .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        rgb(var(--primary-rgb)) 0%, 
        rgb(var(--secondary-rgb)) 100%);
    border-radius: 0 0 12px 12px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 5s linear;
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
}

.toast .progress.active {
    transform: scaleX(1);
}

/* Responsividade */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .login-wrapper {
        max-width: 100%;
        margin: 0;
    }

    .login-image {
        height: 150px;
    }

    .login-form {
        padding: 30px 20px;
    }

    .login-form h1 {
        font-size: 24px;
    }

    .toast {
        min-width: 280px;
        margin: 0 10px 10px 0;
    }
}

@media screen and (max-width: 480px) {
    .login-form {
        padding: 25px 15px;
    }

    .login-form h1 {
        font-size: 22px;
    }

    .login-form input[type="text"],
    .login-form input[type="password"],
    .login-form input[type="submit"] {
        padding: 12px;
        font-size: 14px;
    }

    .toast {
        min-width: 250px;
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-wrapper {
    animation: fadeIn 0.6s ease-out;
}

/* Estados de loading */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

