/* Auth Pages Styles */

@font-face {
    font-family: 'NewOrder';
    src: url('/fonts/neworder-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NewOrder';
    src: url('/fonts/neworder-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NewOrder';
    src: url('/fonts/neworder-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NewOrder';
    src: url('/fonts/neworder-semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NewOrder';
    src: url('/fonts/neworder-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand-blue: #3b82f6;
    --brand-blue-hover: #2563eb;
    --brand-blue-light: #60a5fa;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

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

html,
body {
    font-family: 'Inter', sans-serif;
    background-color: white;
    color: var(--gray-900);
    overflow-x: hidden;
    height: 100%;
    width: 100%;
}

.login-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    overflow: hidden;
}

.login-left {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
}

.login-right {
    flex: 1;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
}

/* Decorative elements for right panel */
.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.05));
    border-radius: 50%;
    transform: translate(50%, -50%);
    z-index: 1;
}

.login-right::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(96, 165, 250, 0.02));
    border-radius: 50%;
    transform: translate(-50%, 50%);
    z-index: 1;
}

.quote-section {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quote-container {
    position: relative;
}

.quote-text {
    position: relative;
    z-index: 10;
    font-family: 'NewOrder', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.3;
    max-width: 28rem;
    letter-spacing: 0.01em;
}

.quote-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info cite {
    font-style: normal;
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
}

.author-info p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.form-container {
    width: 100%;
    max-width: 400px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--brand-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

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

.form-title {
    font-family: 'NewOrder', sans-serif;
    font-size: 1.875rem;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.form-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-btn:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

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

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    padding: 0 1rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

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

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    z-index: 10;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--gray-600);
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input.with-icon {
    padding-left: 3rem;
}

.form-input.with-toggle {
    padding-right: 3rem;
}

.form-select.with-icon {
    padding-left: 3rem;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input.readonly {
    background: var(--gray-100);
    color: var(--gray-600);
}

.forgot-password {
    text-align: right;
    margin-bottom: 1.5rem;
}

.forgot-password a {
    color: var(--brand-blue);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.forgot-password a:hover {
    color: var(--brand-blue-hover);
}

.submit-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--brand-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: var(--brand-blue-hover);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 0.875rem;
}

.signup-link a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    color: var(--brand-blue-hover);
}

.loading-spinner {
    animation: spin 1s linear infinite;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
}

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

/* Maintenance alert styles */
.maintenance-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.maintenance-alert .alert-content {
    display: flex;
    gap: 0.75rem;
}

.maintenance-alert .alert-icon {
    color: #dc2626;
    flex-shrink: 0;
}

.maintenance-alert .alert-text h3 {
    color: #991b1b;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.maintenance-alert .alert-text p {
    color: #7f1d1d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.maintenance-alert .alert-details {
    font-size: 0.75rem;
    color: #991b1b;
}

/* Benefits Box */
.benefits-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-icon {
    color: #10b981;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Info boxes */
.info-box {
    background: var(--brand-blue-light);
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Variantes mais suaves / refinadas (utilizar em telas de 2FA) */
.info-box--soft {
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(59,130,246,0.03));
    border: 1px solid rgba(59,130,246,0.25);
    backdrop-filter: blur(4px);
}

.info-box--security .info-box-icon {
    color: var(--brand-blue);
}

.info-box--soft .info-box-content h3 {
    color: #1e40af; /* azul mais escuro para contraste */
}

.info-box--soft .info-box-content ul {
    color: #1d4ed8; /* texto dos itens */
}

.info-box-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(59,130,246,0.12);
    color: #1e3a8a;
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .25rem .55rem;
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 999px;
    margin-bottom: .5rem;
}

/* Security warning box */
.security-warning-box {
    background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(245,158,11,0.08));
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 12px;
    padding: 1rem 1.1rem 1rem 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.security-warning-box h3 {
    font-size: .875rem;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 .35rem 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.security-warning-box p, .security-warning-box li {
    font-size: .75rem;
    line-height: 1.15rem;
    color: #7c2d12;
}
.security-warning-box ul { list-style: disc; list-style-position: inside; margin: .35rem 0 0 0; padding:0; }
.security-warning-box .legal-note { margin-top: .55rem; font-size: .65rem; color: #78350f; opacity:.85; }
.security-warning-box code { background: rgba(0,0,0,0.05); padding: 2px 4px; border-radius:4px; font-size:.65rem; }

.info-box-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-box-icon {
    color: var(--brand-blue);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.info-box-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.info-box-content ul {
    font-size: 0.875rem;
    color: #1d4ed8;
    list-style: disc;
    list-style-position: inside;
    margin: 0;
    padding: 0;
}

.info-box-content li {
    margin-bottom: 0.25rem;
}

/* Rate limit message */
.rate-limit-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.countdown-timer {
    font-weight: 600;
    font-size: 1.1em;
    color: #dc2626;
    margin-top: 0.5rem;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.hidden {
    display: none !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-right {
        display: none;
    }

    .login-left {
        padding: 1.5rem;
    }

    .quote-text {
        font-size: 1.5rem;
    }

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

@media (min-width: 1024px) {
    .login-left {
        width: 50%;
        padding: 3rem;
    }

    .login-right {
        display: flex;
        width: 50%;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        position: relative;
        overflow: hidden;
    }
}
