* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Partículas animadas */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 70%;
    animation-delay: 1s;
}

.particle:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    width: 50px;
    height: 50px;
    top: 10%;
    left: 60%;
    animation-delay: 1.5s;
}

.particle:nth-child(6) {
    width: 70px;
    height: 70px;
    top: 70%;
    left: 50%;
    animation-delay: 2.5s;
}

/* Formas geométricas flutuantes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    animation: rotate 20s linear infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 10%;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 15%;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    animation-delay: 5s;
}

.shape-3 {
    width: 120px;
    height: 120px;
    top: 50%;
    right: 20%;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-delay: 10s;
}

/* Card de login */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 45px rgba(220, 38, 38, 0.2);
    position: relative;
    z-index: 2;
    animation: slideIn 0.8s ease-out;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.logo i {
    font-size: 2rem;
    color: white;
}

.card-header h1 {
    color: #1f2937;
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.card-header p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Formulário */
.login-form {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 25px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #1f2937;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    background: #ffffff;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.1);
}

.input-wrapper input:focus + label,
.input-wrapper input:valid + label {
    transform: translateY(-25px) scale(0.8);
    color: #dc2626;
}

.input-wrapper label {
    position: absolute;
    left: 50px;
    top: 15px;
    color: #9ca3af;
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 15px;
    color: #6b7280;
    font-size: 1.1rem;
    z-index: 1;
    transition: color 0.3s ease;
}

.input-wrapper input:focus ~ .input-icon {
    color: #dc2626;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transition: width 0.3s ease;
}

.input-wrapper input:focus ~ .input-line {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #dc2626;
}

/* Opções do formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-color: #dc2626;
}

.checkbox-container input:checked ~ .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #dc2626;
}

/* Botão de login */
.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loader {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* Rodapé do card */
.card-footer {
    text-align: center;
}

.card-footer p {
    color: #6b7280;
    font-size: 0.9rem;
}

.register-link {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #991b1b;
}

/* Indicador de status */
.status-indicator {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #1f2937;
    font-size: 0.9rem;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 2s ease-in-out infinite;
}

/* Animações */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsividade */
@media (max-width: 480px) {
    .login-card {
        margin: 20px;
        padding: 30px 25px;
    }
    
    .status-indicator {
        top: 20px;
        right: 20px;
        font-size: 0.8rem;
    }
    
    .floating-shapes .shape {
        display: none;
    }
}

/* Placeholder customizado */
.input-wrapper input::placeholder {
    color: transparent;
}

/* Estados de loading */
.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    opacity: 1;
}

.login-btn.loading .btn-icon {
    opacity: 0;
}

/* Mensagens de erro */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
    z-index: 1000;
    animation: slideInError 0.5s ease-out;
    max-width: 350px;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.error-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.error-content span {
    flex: 1;
    font-weight: 500;
}

.error-content small {
    display: block;
    margin-top: 5px;
    opacity: 0.8;
    font-size: 0.8rem;
}

.close-error {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-error:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes slideInError {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutError {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100px);
    }
}

@media (max-width: 480px) {
    .error-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Efeito ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}