/* Modern Login Page Styles - Glassmorphism Edition */
:root {
    --primary-color: #4285f4;
    --accent-color: #8ab4f8;
    --bg-dark: #0f1011;
    --glass-bg: rgba(30, 31, 32, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #e8eaed;
    --text-dim: #9aa0a6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at top right, #1e1e2e, #0f1011);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    font-size: 15px;
    color: var(--text-dim);
}

/* Logo QUBIA */
.logo-container {
    margin-bottom: 20px;
}

/* Logo TDS - Centro do Login */
.tds-logo-login {
    height: 120px;
    width: auto;
    max-width: 100%;
    object-fit: contain;

    /* Sem filtros - logo limpa */
    animation: logoFloat 3s ease-in-out infinite alternate;

    /* Garantir transparência */
    background: transparent !important;
}

/* Logo QUBIA - Cabeçalho do Login (canto superior) */
.qubia-header-logo-login {
    position: fixed;
    top: 20px;
    left: 20px;
    height: 55px;
    width: auto;
    z-index: 1000;
    /* Logo pequena de cabeçalho */
    background: transparent !important;
    opacity: 0.9;
}

@keyframes logoFloat {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-3px);
    }
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    padding-left: 4px;
}

.form-group input {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #e8eaed;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.15);
}

.form-group input::placeholder,
.modal-form textarea::placeholder {
    color: var(--text-dim);
    opacity: 0.7;
}

.form-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
    font-style: italic;
}

.forgot-link {
    color: var(--accent-color);
    text-decoration: none;
    font-style: normal;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.link-separator {
    color: var(--text-dim);
    margin: 0 8px;
    font-style: normal;
}

/* Container para input de senha com botão */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-input-container input {
    padding-right: 50px; /* Espaço para o botão */
}

/* Botão de mostrar/ocultar senha */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(66, 133, 244, 0.1);
}

.password-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.password-toggle .eye-icon {
    width: 18px;
    height: 18px;
}

.login-button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.login-button:hover {
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.4);
    filter: brightness(1.1);
}

/* Divider OR */
.divider-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-dim);
    font-size: 14px;
}

.divider-or::before,
.divider-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

/* Azure Button */
.azure-button {
    background: linear-gradient(135deg, #0078d4, #0063b1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.azure-button:hover {
    box-shadow: 0 8px 24px rgba(0, 120, 212, 0.4);
}

.azure-icon {
    color: white;
}

.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 18px;
    height: 18px;
    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); }
}

.error-message {
    background: rgba(154, 155, 154, 0.1);
    border: 1px solid rgba(84, 85, 84, 0.2);
    color: #edf0ee;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
    margin-top: 16px;
    /* Animação shake removida para evitar tremor */
}

/* Animação shake removida */

.login-footer {
    margin-top: 32px;
    text-align: center;
}

.login-footer p {
    font-size: 13px;
    color: var(--text-dim);
}

/* Modal para solicitação de conta */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    color: var(--text-main);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form textarea {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #e8eaed;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.modal-form textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.15);
}

.modal-button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.modal-button:hover {
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.4);
    filter: brightness(1.1);
}

.modal-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
    }

    .modal-content {
        padding: 24px;
        margin: 20px;
    }
}
