/*
 * Estilos das páginas de autenticação (conforme template/login e template/cadastro).
 */

:root {
    --auth-background: #f8fafc;
    --auth-card: #ffffff;
    --auth-primary: #1d72e8;
    --auth-primary-hover: #1557b0;
    --auth-text-main: #1e293b;
    --auth-text-muted: #64748b;
    --auth-text-light: #94a3b8;
    --auth-border: #e2e8f0;
    --auth-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --auth-radius-lg: 0.75rem;
    --auth-radius-md: 0.5rem;
}

.auth-body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--auth-background);
    color: var(--auth-text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    line-height: 1.5;
    box-sizing: border-box;
}

.auth-body *,
.auth-body *::before,
.auth-body *::after {
    box-sizing: border-box;
}

/* Brand (template login/cadastro) */
.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    text-align: center;
}

.brand-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.auth-body .brand-logo-link {
    display: inline-block;
    text-decoration: none;
}

.auth-body .brand-logo-img {
    display: block;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-body .logo-box {
    background-color: var(--auth-primary);
    color: white;
    padding: 0.5rem;
    border-radius: var(--auth-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-body .logo-box .material-symbols-outlined {
    font-size: 2rem;
}

.brand-name {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--auth-text-main);
}

.brand-subtitle {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}

/* Card (login) */
.login-card {
    width: 100%;
    max-width: 448px;
    min-width: 0;
    background-color: var(--auth-card);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-border);
    overflow: hidden;
}

.card-body {
    padding: 2.5rem;
    min-width: 0;
    overflow: hidden;
}

.card-header {
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--auth-text-main);
}

.card-description {
    color: var(--auth-text-muted);
    font-size: 0.9375rem;
}

/* Form (template) */
.login-card form,
.card-body form {
    min-width: 0;
    width: 100%;
}

.auth-body .form-group {
    margin-bottom: 1.5rem;
    min-width: 0;
}

.auth-body .label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.auth-body label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text-main);
}

.forgot-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-primary);
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--auth-primary-hover);
}

.input-wrapper {
    position: relative;
    min-width: 0;
    width: 100%;
}

.input-icon-left {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-light);
    font-size: 1.25rem;
    pointer-events: none;
}

.input-control {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    background-color: var(--auth-card);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--auth-text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.input-control:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(29, 114, 232, 0.1);
}

.input-control::placeholder {
    color: var(--auth-text-light);
}

.input-control.input-password-right {
    padding-right: 2.75rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-light);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: var(--auth-text-muted);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-group input {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid var(--auth-border);
    cursor: pointer;
}

.checkbox-group label {
    margin-left: 0.5rem;
    font-weight: 400;
    color: var(--auth-text-muted);
    cursor: pointer;
    font-size: 0.875rem;
}

/* Botão primário (auth) */
.auth-body .btn-primary {
    width: 100%;
    background-color: var(--auth-primary);
    color: white;
    padding: 0.875rem;
    border: none;
    border-radius: var(--auth-radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s, transform 0.1s;
    font-family: inherit;
}

.auth-body .btn-primary:hover {
    background-color: var(--auth-primary-hover);
}

.auth-body .btn-primary:active {
    transform: scale(0.98);
}

.auth-body a.btn-primary {
    text-decoration: none;
    box-sizing: border-box;
}

/* Divider */
.auth-body .divider {
    position: relative;
    margin: 2rem 0;
    text-align: center;
}

.auth-body .divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--auth-border);
    z-index: 1;
}

.auth-body .divider span {
    position: relative;
    z-index: 2;
    background-color: var(--auth-card);
    padding: 0 0.75rem;
    color: var(--auth-text-light);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Social */
.auth-body .social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    background-color: var(--auth-card);
    color: var(--auth-text-main);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.btn-social:hover {
    background-color: #f1f5f9;
}

/* Card footer */
.card-footer {
    background-color: #f8fafc;
    padding: 1.25rem 2.5rem;
    border-top: 1px solid var(--auth-border);
    text-align: center;
}

.card-footer p {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}

.signup-link {
    font-weight: 700;
    color: var(--auth-primary);
    text-decoration: none;
}

.signup-link:hover {
    text-decoration: underline;
}

/* Site footer */
.site-footer {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
}

.site-footer a {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--auth-text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--auth-primary);
}

/* Mensagens de erro/sucesso */
.auth-body .alert-message {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--auth-radius-md);
    font-size: 0.875rem;
}

.auth-body .alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-body .alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Cadastro: header-section, input-container com ícone, submit-btn */
.header-section {
    margin-bottom: 2rem;
}

.header-section h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-text-main);
    margin-bottom: 0.5rem;
}

.header-section p {
    color: var(--auth-text-muted);
    font-size: 0.9375rem;
}

.input-container {
    position: relative;
    min-width: 0;
    width: 100%;
}

.input-container .input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-light);
    font-size: 1.25rem;
    pointer-events: none;
}

.auth-body .input-container input[type="text"],
.auth-body .input-container input[type="email"],
.auth-body .input-container input[type="password"] {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    background-color: var(--auth-card);
    color: var(--auth-text-main);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s;
    outline: none;
}

.auth-body .input-container input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(29, 114, 232, 0.1);
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--auth-text-muted);
}

.submit-btn {
    width: 100%;
    background-color: var(--auth-primary);
    color: white;
    font-weight: 700;
    padding: 0.875rem;
    border: none;
    border-radius: var(--auth-radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(29, 114, 232, 0.2);
    transition: all 0.2s;
}

.submit-btn:hover {
    background-color: var(--auth-primary-hover);
}

.submit-btn:active {
    transform: scale(0.98);
}

.form-footer-note {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    margin-top: 1rem;
    text-align: center;
}

.form-footer-note a {
    color: var(--auth-primary);
    font-weight: 600;
}

/* Validar email: ícone de sucesso */
.auth-success-icon-wrap {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.auth-success-icon-wrap .material-symbols-outlined {
    color: var(--success);
    font-size: 2rem;
}

.auth-body .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
