/* Reset e configurações base */
* {
    margin: 1000;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333333;
    background: #f8f9fa;
    overflow-x: hidden;
}

/* Container principal */
.main-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Background Pattern */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #005aaa 0%, #50E3C2 100%);
    opacity: 0.05;
    z-index: -1;
}

.background-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 90, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(80, 227, 194, 0.1) 0%, transparent 50%);
    background-size: 400px 400px;
    animation: float 20s ease-in-out infinite;
}

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

/* Header */
.auth-header {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 90, 170, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #005aaa;
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.logo-link:hover {
    color: #003d7a;
    text-decoration: none;
    transform: translateY(-2px);
}

.logo-link i {
    font-size: 1.75rem;
}

/* Main Content */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    border: 1px solid rgba(0, 90, 170, 0.1);
}

.auth-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.auth-card-header {
    background: linear-gradient(135deg, #005aaa 0%, #0074d9 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.header-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header-icon i {
    font-size: 2rem;
    color: white;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

.auth-card-body {
    padding: 2rem;
}

/* Custom Alert */
.custom-alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.custom-alert i {
    color: #28a745;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    color: #155724;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.alert-content p {
    color: #155724;
    margin: 0;
    font-size: 0.9rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-label i {
    color: #005aaa;
    width: 16px;
    text-align: center;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    background: #fafbfc;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: #005aaa;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 90, 170, 0.1);
    transform: translateY(-2px);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.is-valid {
    border-color: #28a745;
    background: #f8fff9;
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #666666;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.input-wrapper.focused .input-icon {
    color: #005aaa;
    transform: scale(1.1);
}

/* Invalid Feedback */
.invalid-feedback {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    border-left: 3px solid #dc3545;
}

.invalid-feedback i {
    color: #dc3545;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #005aaa 0%, #0074d9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 90, 170, 0.3);
}

.btn-auth:hover:not(:disabled) {
    background: linear-gradient(135deg, #003d7a 0%, #005bb5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 90, 170, 0.4);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.btn-auth:disabled .btn-loading {
    display: flex;
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #005aaa;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #003d7a;
    background: rgba(0, 90, 170, 0.1);
    text-decoration: none;
    transform: translateX(-3px);
}

/* Auth Info */
.auth-info {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.3s;
}

.auth-info.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 90, 170, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #005aaa 0%, #0074d9 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-content h3 {
    color: #333333;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-content p {
    color: #666666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Footer */
.auth-footer {
    background: #2c3e50;
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #50E3C2;
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-main {
        padding: 1rem 0;
        min-height: calc(100vh - 120px);
    }

    .auth-card-header {
        padding: 1.5rem;
    }

    .header-icon {
        width: 60px;
        height: 60px;
    }

    .header-icon i {
        font-size: 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-subtitle {
        font-size: 0.9rem;
    }

    .auth-card-body {
        padding: 1.5rem;
    }

    .form-control {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
    }

    .input-icon {
        left: 0.875rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .auth-card {
        border-radius: 15px;
    }

    .auth-card-header {
        padding: 1rem;
    }

    .auth-card-body {
        padding: 1rem;
    }

    .form-control {
        padding: 0.75rem 0.75rem 0.75rem 2.25rem;
        font-size: 0.9rem;
    }

    .input-icon {
        left: 0.75rem;
    }

    .btn-auth {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .info-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .info-icon {
        margin: 0 auto;
    }

    .custom-alert {
        flex-direction: column;
        text-align: center;
    }
}

/* Animações adicionais */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.btn-auth:hover:not(:disabled) {
    animation: pulse 2s infinite;
}

/* Estados de foco para acessibilidade */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #005aaa;
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Print styles */
@media print {
    .auth-header,
    .auth-footer,
    .background-pattern {
        display: none;
    }
    
    .auth-main {
        padding: 0;
        min-height: auto;
    }
    
    .auth-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

