/* ============================================================
   BiotechProject — Auth Pages CSS v1.0
   Login · Recuperar Senha · Redefinir Senha · Registrar
   Paleta: verde musgo (#3F6B52) + azul água (#447B8B)
   ============================================================ */

/* ── Design Tokens (espelha o sistema principal) ─────────────── */
:root {
    --auth-bg-from:         #243B36;
    --auth-bg-to:           #1A2C28;
    --auth-accent:          #3F6B52;
    --auth-accent-dark:     #2F5240;
    --auth-secondary:       #447B8B;
    --auth-secondary-dark:  #335E6B;
    --auth-card-bg:         #ffffff;
    --auth-card-radius:     1rem;
    --auth-card-shadow:     0 20px 60px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.20);
    --auth-input-border:    #D0DAD4;
    --auth-input-focus:     #3F6B52;
    --auth-text:            #1F2A24;
    --auth-text-muted:      #56655C;
    --auth-danger:          #B5453A;
    --auth-success:         #447D5F;
    --font-sans:            'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

/* ── Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-sans);
    color: var(--auth-text);
    background: linear-gradient(145deg, var(--auth-bg-from) 0%, var(--auth-bg-to) 100%);
    -webkit-font-smoothing: antialiased;
    padding: 1.5rem 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Padrão decorativo sutil de fundo */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 45% at 10% 20%, rgba(63, 107, 82, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 80%, rgba(68, 123, 139, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ── Card principal ──────────────────────────────────────────── */
.auth-card {
    position: relative;
    z-index: 1;
    background: var(--auth-card-bg);
    border-radius: var(--auth-card-radius);
    box-shadow: var(--auth-card-shadow);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

/* Card maior para registro (mais campos) */
.auth-card-wide { max-width: 480px; }

/* ── Cabeçalho do card ───────────────────────────────────────── */
.auth-card-header {
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
    padding: 2rem 2rem 1.75rem;
    text-align: center;
    color: #fff;
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem;
    margin-bottom: 0.875rem;
}

.auth-logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.875rem;
}

.auth-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
    color: #fff;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

/* ── Corpo do card ───────────────────────────────────────────── */
.auth-card-body {
    padding: 1.875rem 2rem 2rem;
}

/* ── Inputs e labels ─────────────────────────────────────────── */
.auth-card-body .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text);
    margin-bottom: 0.35rem;
}

.auth-card-body .form-control {
    border: 1.5px solid var(--auth-input-border);
    border-radius: 0.5rem;
    padding: 0.6rem 0.875rem;
    font-size: 0.9375rem;
    color: var(--auth-text);
    background-color: #F7FAF8;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.auth-card-body .form-control:focus {
    border-color: var(--auth-input-focus);
    box-shadow: 0 0 0 3px rgba(63, 107, 82, 0.16);
    background-color: #fff;
    outline: none;
}

.auth-card-body .form-control::placeholder {
    color: #9EB0A4;
    font-size: 0.875rem;
}

/* Input group com ícone (campo senha com olho) */
.auth-input-group {
    position: relative;
}

.auth-input-group .form-control {
    padding-right: 2.75rem;
}

.auth-input-group .auth-input-icon {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-text-muted);
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 0 0.5rem 0.5rem 0;
    transition: color 0.15s;
}

.auth-input-group .auth-input-icon:hover { color: var(--auth-accent); }

/* ── Botão principal ─────────────────────────────────────────── */
.btn-auth-primary {
    width: 100%;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.18s, box-shadow 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-auth-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(47, 82, 64, 0.35);
    color: #fff;
}

.btn-auth-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-auth-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Botão secundário (link style) */
.btn-auth-link {
    background: none;
    border: none;
    color: var(--auth-accent);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}

.btn-auth-link:hover { color: var(--auth-accent-dark); text-decoration: underline; }

/* ── Rodapé do card / links auxiliares ──────────────────────── */
.auth-card-footer {
    border-top: 1px solid #E8EFEA;
    padding: 1.125rem 2rem;
    text-align: center;
    background: #F7FAF8;
    font-size: 0.85rem;
    color: var(--auth-text-muted);
}

.auth-card-footer a {
    color: var(--auth-accent);
    font-weight: 500;
    text-decoration: none;
}

.auth-card-footer a:hover { color: var(--auth-accent-dark); text-decoration: underline; }

/* ── Separador ou-então ──────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: var(--auth-text-muted);
    font-size: 0.8rem;
}

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

/* ── Alertas customizados ────────────────────────────────────── */
.auth-alert {
    border-radius: 0.5rem;
    border-left: 3px solid;
    padding: 0.7rem 0.875rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.auth-alert-danger {
    background: #F8ECEA;
    border-color: var(--auth-danger);
    color: #7D2F26;
}

.auth-alert-success {
    background: #EAF3ED;
    border-color: var(--auth-success);
    color: #2A5840;
}

.auth-alert-info {
    background: #E8F0F2;
    border-color: var(--auth-secondary);
    color: #234654;
}

/* ── Requisitos de senha (progress indicator) ────────────────── */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #E1E8E3;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.password-strength-bar .bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-weak   .bar-fill { width: 33%; background: var(--auth-danger);   }
.strength-medium .bar-fill { width: 66%; background: #9B6A24;               }
.strength-strong .bar-fill { width: 100%; background: var(--auth-success);  }

.password-hint {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
}

/* ── Spinner de loading para botão ──────────────────────────── */
.btn-auth-primary .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ── Responsividade ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card { border-radius: 0.75rem; }
    .auth-card-header { padding: 1.625rem 1.5rem 1.5rem; }
    .auth-card-body   { padding: 1.5rem; }
    .auth-card-footer { padding: 1rem 1.5rem; }
    .auth-title { font-size: 1.25rem; }
}

@media (max-width: 375px) {
    body { padding: 1rem 0.5rem; }
    .auth-card-body { padding: 1.25rem 1.125rem; }
    .auth-card-header { padding: 1.375rem 1.25rem 1.25rem; }
}
