/* ============================================
   ConfortoCare — auth.css
   Usado em: login.php e register.php
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* ── Orbs decorativos ── */
body::before {
    content: '';
    position: fixed;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,.15), transparent);
    border-radius: 50%;
    top: -250px; right: -250px;
    animation: orb 8s ease-in-out infinite;
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,107,53,.1), transparent);
    border-radius: 50%;
    bottom: -200px; left: -200px;
    animation: orb 10s ease-in-out infinite reverse;
    pointer-events: none;
}
@keyframes orb {
    0%,100% { transform: scale(1);   opacity: .5; }
    50%      { transform: scale(1.1); opacity: .8; }
}

/* ── Container / Card ── */
.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

/* Register é ligeiramente mais largo para acomodar os campos */
.auth-container.register { max-width: 480px; }

.auth-card {
    background: linear-gradient(135deg, rgba(30,41,59,.95), rgba(15,23,42,.95));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59,130,246,.3);
    border-radius: 24px;
    padding: 36px 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,.5);
    animation: slideUp .5s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    width: 68px; height: 68px;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(255,107,53,.4);
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.auth-logo i { font-size: 30px; color: #fff; }

.auth-title {
    font-size: 26px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -.5px;
    margin-bottom: 4px;
}
.auth-subtitle {
    font-size: 13.5px;
    color: #94a3b8;
    font-weight: 500;
}

/* ── Alertas ── */
.alert {
    padding: 13px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn .35s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert i { font-size: 18px; flex-shrink: 0; }

.alert-danger  { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.3);  color: #f87171; }
.alert-success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3); color: #34d399; }

/* ── Grupos de formulário ── */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 7px;
}

.form-input-wrapper { position: relative; }

.form-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
    transition: color .25s;
    z-index: 1;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 13px 18px 13px 46px;
    background: rgba(15,23,42,.6);
    border: 2px solid rgba(59,130,246,.3);
    border-radius: 10px;
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 500;
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.form-input::placeholder { color: #64748b; }
.form-input:focus {
    outline: none;
    background: rgba(15,23,42,.85);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.form-input:focus ~ .form-input-icon { color: #3b82f6; }

/* ── Toggle senha ── */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 18px;
    transition: color .25s;
    z-index: 2;
}
.password-toggle:hover { color: #3b82f6; }

/* ── Força da senha (register) ── */
.password-strength {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
}
.password-strength-bar {
    flex: 1;
    height: 3px;
    background: rgba(59,130,246,.15);
    border-radius: 2px;
    overflow: hidden;
}
.password-strength-fill {
    height: 100%;
    width: 0;
    transition: width .3s ease, background .3s ease;
}
.password-strength-fill.weak   { width: 33%; background: #ef4444; }
.password-strength-fill.medium { width: 66%; background: #f59e0b; }
.password-strength-fill.strong { width:100%; background: #10b981; }
.password-strength-text { color: #64748b; white-space: nowrap; }

/* ── Grid de dois campos lado a lado ── */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Opções (lembrar + esqueci) ── */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}
.form-checkbox input[type="checkbox"] {
    width: 17px; height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #3b82f6;
}
.form-checkbox label {
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
}
.form-checkbox label a { color: #3b82f6; text-decoration: none; font-weight: 600; }
.form-checkbox label a:hover { color: #60a5fa; text-decoration: underline; }

.form-link {
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color .25s;
}
.form-link:hover { color: #60a5fa; }

/* ── Botão submit ── */
.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform .25s, box-shadow .25s;
}
.btn-submit:hover  { transform: translateY(-2px); }
.btn-submit:active { transform: translateY(0); }

/* Login — azul */
.btn-submit.login {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 20px rgba(59,130,246,.3);
}
.btn-submit.login:hover { box-shadow: 0 10px 28px rgba(59,130,246,.4); }

/* Register — verde */
.btn-submit.register {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 6px 20px rgba(16,185,129,.3);
}
.btn-submit.register:hover { box-shadow: 0 10px 28px rgba(16,185,129,.4); }

/* ── Footer ── */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(59,130,246,.18);
}
.auth-footer p { font-size: 13.5px; color: #94a3b8; font-weight: 500; }
.auth-footer a { color: #3b82f6; text-decoration: none; font-weight: 700; transition: color .25s; }
.auth-footer a:hover { color: #60a5fa; }

/* ── Responsivo ── */
@media (max-width: 520px) {
    .auth-card { padding: 28px 22px; }
    .auth-title { font-size: 22px; }
    .form-row-2 { grid-template-columns: 1fr; }
}