/* ============================================
   TELA DE LOGIN PROFISSIONAL
   Design Premium e Moderno
   ============================================ */

/* Background Simples */
.auth-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.bg-gradient {
    display: none;
}

.bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    opacity: 0.5;
}

.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.5;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.4;
    }
}

/* Wrapper Principal */
.auth-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.6s ease;
}

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

/* Brand/Logo */
.auth-brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.logo-icon {
    width: 288px;
    height: 288px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 3s ease-in-out infinite;
    padding: 1rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.auth-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    50% { 
        transform: translateY(-10px) rotate(2deg); 
    }
}

.logo-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.5px;
}

.tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* Card Moderno */
.auth-card-modern {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #a78bfa 0%, #6366f1 50%, #8b5cf6 100%);
    opacity: 0.8;
}

.auth-card-modern::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Tabs Modernas */
.auth-tabs-modern {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 16px;
    position: relative;
}

.tab-btn-modern {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.tab-btn-modern:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn-modern.active {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.tab-icon {
    font-size: 1.125rem;
}

/* Alertas Modernos */
.alert-modern {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
    border-left: 4px solid;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error-modern {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fca5a5;
}

.alert-success-modern {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #6ee7b7;
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.alert-content p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Formulário Moderno */
.auth-form-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group-modern {
    position: relative;
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
}

.label-icon {
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
}

.input-modern {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.input-modern::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-modern:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.input-modern:focus + .input-focus-line {
    width: 100%;
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.eye-icon {
    font-size: 1.125rem;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.password-strength {
    margin-top: 0.75rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Checkbox Moderno */
.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
}

.checkbox-modern input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-modern input[type="checkbox"]:checked + .checkmark {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.checkbox-modern input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

.checkbox-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

.link-inline {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.link-inline:hover {
    color: white;
}

/* PDF Modal */
.pdf-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.pdf-modal-overlay.show {
    display: flex;
}

.pdf-modal-container {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.pdf-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.pdf-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.pdf-modal-body {
    flex: 1;
    overflow: hidden;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    border: none;
    border-radius: 8px;
    background: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@media (max-width: 768px) {
    .pdf-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .pdf-modal-body iframe {
        height: 60vh;
        min-height: 400px;
    }
    
    .pdf-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .pdf-modal-header h2 {
        font-size: 1.25rem;
    }
}

/* Form Options */
.form-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.form-options .checkbox-modern {
    margin: 0;
}

.forgot-link {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: white;
    text-decoration: underline;
}

/* Botão Moderno */
.btn-modern {
    position: relative;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-primary-modern {
    background: linear-gradient(135deg, #a78bfa 0%, #6366f1 50%, #8b5cf6 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary-modern::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.5s;
}

.btn-primary-modern:hover::before {
    left: 100%;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(167, 139, 250, 0.5);
    background: linear-gradient(135deg, #b794f6 0%, #7c3aed 50%, #9f7aea 100%);
}

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

.btn-primary-modern.loading .btn-text {
    opacity: 0;
}

.btn-primary-modern.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tab Content */
.tab-content-modern {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content-modern.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Footer */
.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.auth-footer p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.switch-tab-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.switch-tab-link:hover {
    color: white;
    text-decoration: underline;
}

/* Features */
.auth-features {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feature-text strong {
    font-size: 0.875rem;
    color: white;
    font-weight: 600;
}

.feature-text span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-wrapper {
        padding: 1rem;
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-card-modern {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .logo-icon {
        width: 100px;
        height: 100px;
    }

    .logo-text h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    .auth-tabs-modern {
        gap: 0.5rem;
        padding: 0.4rem;
    }

    .tab-btn-modern {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .tab-icon {
        font-size: 1rem;
    }

    .auth-features {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .input-modern {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .btn-modern {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .auth-card-modern {
        padding: 1.5rem 1.25rem;
    }

    .logo-icon {
        width: 80px;
        height: 80px;
    }

    .logo-text h1 {
        font-size: 1.75rem;
    }

    .tab-btn-modern span {
        display: none;
    }

    .tab-btn-modern {
        padding: 0.75rem;
    }
}

