* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    overflow-x: hidden;
}

.background-decoration {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    animation: float 6s ease-in-out infinite reverse;
}

.circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.2;
    }
}

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-tabs {
    display: flex;
    position: relative;
    background: #f3f4f6;
    padding: 6px;
    margin: 1rem 1.5rem 0;
    border-radius: 12px;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.auth-tab.active {
    color: #22c55e;
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.auth-form {
    display: none;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.form-header p {
    color: #6b7280;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 2.75rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #22c55e;
    background: white;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.input-wrapper input::placeholder {
    color: #9ca3af;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #6b7280;
}

.toggle-password svg {
    width: 1.25rem;
    height: 1.25rem;
}

.toggle-password .hidden {
    display: none;
}

.password-strength {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-fill.weak {
    width: 33%;
    background: #ef4444;
}

.strength-fill.medium {
    width: 66%;
    background: #f59e0b;
}

.strength-fill.strong {
    width: 100%;
    background: #22c55e;
}

.strength-text {
    font-size: 0.75rem;
    color: #6b7280;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.remember-me,
.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
}

/* SUBSTITUA O BLOCO ABAIXO */
.remember-me input,
.terms-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me input:checked+.checkmark,
.terms-checkbox input:checked+.checkmark {
    background: #22c55e;
    border-color: #22c55e;
}

.checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.remember-me input:checked+.checkmark::after,
.terms-checkbox input:checked+.checkmark::after {
    opacity: 1;
}

.forgot-password {
    color: #22c55e;
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.terms-checkbox {
    margin-bottom: 1.5rem;
}

.terms-checkbox a {
    color: #22c55e;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

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

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

.btn-loader {
    display: flex;
}

.btn-loader.hidden {
    display: none;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    padding: 0.75rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: #22c55e;
    background: #f0fdf4;
}

.demo-credentials {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.demo-credentials p {
    color: white;
    font-size: 0.875rem;
    margin: 0;
}

.demo-credentials code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast.success .toast-icon::before {
    content: '✅';
}

.toast.error .toast-icon::before {
    content: '❌';
}

.toast.warning .toast-icon::before {
    content: '⚠️';
}

.toast.info .toast-icon::before {
    content: 'ℹ️';
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.modal-content>p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.modal-content .form-group {
    text-align: left;
}

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-10px);
    }

    40%,
    80% {
        transform: translateX(10px);
    }
}

.input-error {
    border-color: #ef4444 !important;
}

@media (max-width: 480px) {
    .auth-card {
        border-radius: 20px;
    }

    .logo-title {
        font-size: 1.75rem;
    }

    .social-buttons {
        flex-direction: column;
    }
}