/*--------------------------------------------------------------
# AUTH.CSS - IMPACTO Academia
# Compartilhado entre login.php e register.php
--------------------------------------------------------------*/

:root {
    --primary:      #2e8b57;
    --dark:         #0a5c36;
    --light:        #7ccd7c;
    --deep-black:   #050505;
    --charcoal:     #0e0e0e;
    --card-bg:      #0e0e0e;
    --soft-white:   #F0F0F0;
    --gray-mid:     #888888;
    --gray-light:   #cccccc;
    --border:       rgba(46,139,87,0.2);
    --muted:        rgba(46,139,87,0.1);
    --shadow-green: rgba(46,139,87,0.3);

    --font-body:    'Barlow', sans-serif;
    --font-display: 'Barlow Condensed', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --ease: cubic-bezier(0.4,0,0.2,1);
}

/* ==================== RESET ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: var(--font-body);
    background: radial-gradient(ellipse 120% 120% at 50% 50%, #1a1a1a 0%, #0e0e0e 40%, #050505 100%);
    background-attachment: fixed;
    color: var(--soft-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Grain de veludo — textura premium */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
    background-size: 220px 220px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    mix-blend-mode: overlay;
}

body::after { display: none; }

/* ==================== WRAPPER ==================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
}

/* ==================== LEFT SIDE ==================== */
.auth-brand-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    background: #0e0e0e;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Linhas decorativas de fundo */
.brand-bg-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.brand-bg-lines::before,
.brand-bg-lines::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(46,139,87,0.06);
    border-radius: 50%;
    animation: expandRing 6s ease-in-out infinite;
}

.brand-bg-lines::before {
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.brand-bg-lines::after {
    width: 900px;
    height: 900px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 3s;
}

@keyframes expandRing {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.05); }
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 460px;
    width: 100%;
}

/* Logo */
.brand-logo {
    text-align: center;
    margin-bottom: 40px;
}

.brand-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(46,139,87,0.4));
}

.brand-logo h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1;
    background: linear-gradient(135deg, #0a5c36, #2e8b57, #7ccd7c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gray-mid);
    margin-top: -4px;
    margin-bottom: 10px;
}

.brand-tagline {
    font-size: 0.9rem;
    color: var(--gray-mid);
    letter-spacing: 0.1em;
}

/* Stats (login) */
.brand-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 12px;
    text-align: center;
    transition: all 0.3s var(--ease);
}

.stat-card:hover {
    background: var(--muted);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(46,139,87,0.15);
}

.stat-card i {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.stat-card strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--soft-white);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card span {
    font-size: 0.75rem;
    color: var(--gray-mid);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Horários (login) */
.brand-hours {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-size: 0.82rem;
    color: var(--gray-light);
    line-height: 1.8;
}

.brand-hours i {
    color: var(--primary);
    font-size: 1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.brand-hours strong {
    color: var(--soft-white);
}

/* Benefits (register) */
.brand-benefits {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: all 0.3s var(--ease);
}

.benefit-item:hover {
    background: var(--muted);
    border-color: rgba(46,139,87,0.4);
}

.benefit-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
}

.benefit-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--soft-white);
    margin-bottom: 2px;
}

.benefit-item p {
    font-size: 0.78rem;
    color: var(--gray-mid);
    line-height: 1.4;
}

/* ==================== RIGHT SIDE ==================== */
.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    background: radial-gradient(ellipse 120% 120% at 50% 50%, #1a1a1a 0%, #0e0e0e 40%, #050505 100%);
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.auth-form-container {
    width: 100%;
    max-width: 500px;
    background: #0e0e0e;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    position: relative;
    z-index: 1;
    animation: slideInRight 0.6s var(--ease);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #2e8b57, #7ccd7c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 0.88rem;
    color: var(--gray-mid);
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.88rem;
    animation: slideDown 0.3s var(--ease);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: rgba(244,67,54,0.1);
    border: 1px solid rgba(244,67,54,0.3);
    color: #f44336;
}

.alert-success {
    background: rgba(46,139,87,0.1);
    border: 1px solid rgba(46,139,87,0.3);
    color: var(--light);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--soft-white);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.required { color: var(--primary); }
.optional  { color: var(--gray-mid); font-weight: 400; font-size: 0.78rem; }

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-mid);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s;
}

.form-control {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--deep-black);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--soft-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.25s var(--ease);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--muted);
    background: #0a0a0a;
}

.form-control::placeholder { color: #444; }

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-mid);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    z-index: 2;
    transition: color 0.2s;
}

.toggle-password:hover { color: var(--primary); }

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--gray-light);
    user-select: none;
    cursor: pointer;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover { color: var(--light); }

/* Password Strength */
.password-strength {
    margin-bottom: 20px;
}

.strength-track {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.4s var(--ease), background-color 0.4s;
    background-color: #2e8b57;
}

.strength-label {
    font-size: 0.78rem;
    color: var(--gray-mid);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    box-shadow: 0 6px 20px var(--shadow-green);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow-green);
}

.btn-submit:hover::after { left: 100%; }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Footer */
.form-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-mid);
    margin-bottom: 16px;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.form-footer a:hover { color: var(--light); }

.form-back {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 16px;
}

.form-back a {
    font-size: 0.82rem;
    color: var(--gray-mid);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-back a:hover { color: var(--primary); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .auth-wrapper { flex-direction: column; }

    .auth-brand-side {
        padding: 32px 24px;
        min-height: auto;
    }

    .brand-logo h1 { font-size: 2.5rem; }

    .brand-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .auth-form-side { padding: 32px 20px; }

    .auth-form-container { padding: 32px 28px; }
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }

    .auth-form-container { padding: 24px 20px; }

    .brand-logo h1 { font-size: 2rem; }

    .brand-stats { gap: 8px; }
    .stat-card { padding: 14px 8px; }
    .stat-card strong { font-size: 1.3rem; }
}

@media (max-width: 768px) and (orientation: landscape) {
    .auth-brand-side { display: none; }
    .auth-form-side { min-height: 100vh; }
}