/* =============================================
 Auth System - PowerGym Academia
 Dark theme, clean, fullscreen — sem header/footer
 ============================================= */

a, a:hover, a:focus, a:active, a:visited { text-decoration: none !important; }
.auth-link, .auth-btn, .auth-btn-outline, .auth-btn-outline-sm { text-decoration: none !important; }

/* Body */
.auth-body {
 background: var(--bg-primary);
 min-height: 100vh;
 display: flex;
 flex-direction: column;
}

/* Fullscreen: sem header/footer, gradient bg sutil */
.auth-fullscreen {
 background:
 radial-gradient(ellipse at 20% 50%, rgba(229, 9, 20, 0.08) 0%, transparent 50%),
 radial-gradient(ellipse at 80% 50%, rgba(244, 6, 18, 0.05) 0%, transparent 50%),
 var(--bg-primary);
}
.auth-fullscreen .auth-header,
.auth-fullscreen .auth-footer { display: none !important; }

/* Container — centralizado na tela inteira */
.auth-container {
 flex: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 1.5rem;
 min-height: 100vh;
}

/* Card — sem bg, sem borda, limpo */
.auth-card {
 background: transparent;
 border: none;
 border-radius: 0;
 padding: 2rem;
 width: 100%;
 max-width: 400px;
 box-shadow: none;
}

/* Header Card */
.auth-header-card { text-align: center; margin-bottom: 2rem; }

.auth-logo {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 0.6rem;
 margin-bottom: 1.5rem;
}
.auth-logo i { font-size: 1.75rem; color: var(--primary-color); }
.auth-logo span { font-size: 1.5rem; font-weight: 800; color: var(--text-white); }

.auth-icon-circle {
 width: 56px; height: 56px;
 background: rgba(229, 9, 20, 0.1);
 border-radius: 50%;
 display: flex; align-items: center; justify-content: center;
 margin: 0 auto 1rem;
}
.auth-icon-circle i { font-size: 1.25rem; color: var(--primary-color); }

.auth-title {
 font-size: 1.5rem; font-weight: 700;
 color: var(--text-white); margin-bottom: 0.4rem;
}
.auth-subtitle {
 color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5;
}

/* Alerts — integrados, sem caixa */
.auth-alert {
 padding: 0.5rem 0;
 font-size: 0.85rem; font-weight: 500;
 margin-bottom: 1rem;
 display: flex; align-items: center; gap: 0.5rem;
 background: transparent; border: none;
}
.auth-alert-error { color: #fca5a5; }
.auth-alert-success { color: #86efac; }

/* Form */
.auth-form {
 display: flex; flex-direction: column; gap: 1.25rem;
}
.auth-form-group { position: relative; }

.auth-form-label {
 display: block;
 font-weight: 500; color: var(--text-secondary);
 margin-bottom: 0.4rem; font-size: 0.8rem;
 text-transform: uppercase;
 letter-spacing: 0.5px;
}

.auth-form-input {
 width: 100%;
 padding: 0.75rem 0;
 border: none;
 border-bottom: 1px solid rgba(255, 255, 255, 0.1);
 border-radius: 0;
 font-size: 0.95rem;
 transition: var(--transition);
 background: transparent;
 color: var(--text-white);
 font-family: inherit;
}
.auth-form-input:focus {
 outline: none;
 border-bottom-color: var(--primary-color);
 background: transparent;
}
.auth-form-input::placeholder { color: var(--text-light); }
.auth-form-input.error { border-bottom-color: #ef4444; }

.field-error {
 color: #fca5a5; font-size: 0.75rem;
 margin-top: 0.25rem;
}

/* Input wrapper (password toggle) */
.auth-input-wrapper { position: relative; }
.auth-input-wrapper .auth-form-input { padding-right: 2.75rem; }

.password-toggle {
 position: absolute; right: 0.75rem; top: 50%;
 transform: translateY(-50%);
 background: none; border: none;
 color: var(--text-light); cursor: pointer;
 padding: 0.4rem; font-size: 0.85rem;
 transition: var(--transition);
}
.password-toggle:hover { color: var(--primary-color); }

/* Row: remember + forgot */
.auth-form-row {
 display: flex; align-items: center;
 justify-content: space-between; gap: 1rem;
}
.auth-link-sm {
 font-size: 0.8rem; color: var(--text-secondary);
 transition: var(--transition);
}
.auth-link-sm:hover { color: var(--primary-color); }

/* 2-col row for register */
.auth-form-row-2col {
 display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}

/* Checkbox */
.auth-checkbox-label {
 display: flex; align-items: center; gap: 0.5rem;
 font-size: 0.85rem; color: var(--text-secondary); cursor: pointer;
}
.auth-checkbox-label input[type="checkbox"] {
 margin: 0; accent-color: var(--primary-color);
 width: 16px; height: 16px;
}

/* Buttons */
.auth-btn {
 width: 100%;
 background: var(--gradient-primary);
 color: var(--text-white) !important;
 padding: 0.9rem 2rem;
 border: none; border-radius: var(--border-radius);
 font-size: 1rem; font-weight: 700;
 cursor: pointer; transition: var(--transition);
 display: flex; align-items: center; justify-content: center; gap: 0.5rem;
 box-sizing: border-box;
}
.auth-btn:hover {
 transform: translateY(-2px);
 box-shadow: var(--shadow-red-hover);
 color: var(--text-white) !important;
}
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.auth-btn-outline {
 width: 100%;
 background: transparent; color: var(--text-secondary);
 padding: 0.9rem 2rem;
 border: 1px solid rgba(255, 255, 255, 0.06);
 border-radius: var(--border-radius);
 font-size: 0.95rem; font-weight: 600;
 cursor: pointer; transition: var(--transition);
 display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.auth-btn-outline:hover {
 background: rgba(255, 255, 255, 0.03);
 border-color: rgba(255, 255, 255, 0.1);
 color: var(--text-white);
}

.auth-btn-outline-sm {
 background: transparent; color: var(--text-secondary);
 padding: 0.5rem 1rem;
 border: 1px solid rgba(255, 255, 255, 0.08);
 border-radius: var(--border-radius);
 font-size: 0.85rem; font-weight: 500;
 cursor: pointer; transition: var(--transition);
 display: inline-flex; align-items: center; gap: 0.4rem;
}
.auth-btn-outline-sm:hover {
 background: rgba(239, 68, 68, 0.1);
 border-color: rgba(239, 68, 68, 0.3); color: #fca5a5;
}

/* Divider */
.auth-divider {
 display: flex; align-items: center;
 margin: 1.5rem 0; color: var(--text-light); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
 content: ''; flex: 1; height: 1px;
 background: rgba(255, 255, 255, 0.04);
}
.auth-divider span { padding: 0 1rem; }

/* Links */
.auth-links {
 margin-top: 1.5rem; text-align: center;
 display: flex; flex-direction: column; gap: 0.75rem;
}
.auth-link {
 color: var(--text-secondary); font-size: 0.85rem;
 transition: var(--transition);
 display: inline-flex; align-items: center; gap: 0.3rem;
}
.auth-link:hover { color: var(--primary-color); }

/* Secure badge — integrado */
.auth-secure-badge {
 margin-top: 1.5rem;
 display: flex; align-items: center; justify-content: center;
 gap: 0.4rem;
 color: rgba(134, 239, 172, 0.5); font-size: 0.75rem;
}

/* Benefits */
.auth-benefits {
 margin-top: 1.5rem;
 display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
}
.auth-benefits span {
 display: flex; align-items: center; gap: 0.4rem;
 font-size: 0.8rem; color: var(--text-secondary);
}
.auth-benefits i { color: var(--success-color); font-size: 0.7rem; }

/* Info box — integrado */
.auth-info-box {
 margin-top: 1.5rem;
 padding: 0;
}
.auth-info-box p {
 color: var(--text-secondary); font-size: 0.8rem;
 margin: 0 0 0.4rem 0;
 display: flex; align-items: center; gap: 0.4rem;
}
.auth-info-box p:last-child { margin: 0; }
.auth-info-box i { color: #818cf8; font-size: 0.75rem; }

/* =============================================
 DASHBOARD (com header/footer visíveis)
 ============================================= */

.auth-dashboard {
 padding: 2rem;
 margin-top: 70px;
 max-width: 900px;
 margin-left: auto;
 margin-right: auto;
}

.dashboard-header {
 display: flex; align-items: center;
 justify-content: space-between;
 margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.dashboard-welcome h1 {
 font-size: 1.75rem; font-weight: 800;
 color: var(--text-white); margin-bottom: 0.25rem;
}
.dashboard-welcome p {
 color: var(--text-secondary); font-size: 0.95rem;
}

.dashboard-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
 gap: 1rem; margin-bottom: 2rem;
}

.dash-card {
 background: var(--bg-card);
 border: 1px solid rgba(255, 255, 255, 0.06);
 border-radius: var(--border-radius-lg);
 padding: 1.5rem;
 transition: var(--transition);
}
.dash-card:hover {
 border-color: rgba(255, 255, 255, 0.1);
 transform: translateY(-2px);
}
.dash-card-icon {
 width: 44px; height: 44px;
 background: rgba(229, 9, 20, 0.1);
 border-radius: 12px;
 display: flex; align-items: center; justify-content: center;
 margin-bottom: 1rem;
}
.dash-card-icon i { color: var(--primary-color); font-size: 1.1rem; }
.dash-card h3 { color: var(--text-white); font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.dash-card p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; }
.dash-badge {
 display: inline-block; margin-top: 0.75rem;
 padding: 0.25rem 0.6rem;
 background: rgba(255, 255, 255, 0.06);
 border-radius: 20px; font-size: 0.7rem;
 color: var(--text-light); font-weight: 600;
}
.dash-link {
 display: inline-flex; align-items: center; gap: 0.3rem;
 margin-top: 0.75rem; font-size: 0.85rem;
 color: var(--primary-color); font-weight: 600;
}
.dash-link:hover { color: var(--secondary-color); }

.dashboard-info {
 display: flex; flex-wrap: wrap; gap: 1.5rem;
 padding: 1rem;
 background: var(--bg-card);
 border: 1px solid rgba(255, 255, 255, 0.06);
 border-radius: var(--border-radius-lg);
}
.info-item {
 display: flex; align-items: center; gap: 0.5rem;
 font-size: 0.85rem; color: var(--text-secondary);
}
.info-item i { color: var(--primary-color); font-size: 0.8rem; }

/* =============================================
 FOOTER (dashboard only)
 ============================================= */

.auth-footer {
 background: var(--bg-dark);
 padding: 1.5rem 0 1rem;
 margin-top: auto;
}
.footer-auth {
 display: flex; justify-content: space-between;
 align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-brand-auth {
 display: flex; align-items: center; gap: 0.5rem;
}
.footer-links-auth {
 display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.footer-links-auth a {
 color: var(--text-secondary); font-size: 0.8rem;
 transition: var(--transition);
}
.footer-links-auth a:hover { color: var(--primary-color); }
.footer-bottom-auth {
 border-top: 1px solid rgba(255, 255, 255, 0.06);
 padding-top: 1rem; margin-top: 1rem;
 display: flex; justify-content: space-between;
 align-items: center; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom-auth .copyright p { color: var(--text-light); font-size: 0.75rem; margin: 0; }
.security-badge {
 display: flex; align-items: center; gap: 0.4rem;
 color: var(--success-color); font-size: 0.7rem; font-weight: 600;
}

/* =============================================
 LOADING
 ============================================= */

.auth-loading { display: inline-flex; align-items: center; gap: 0.5rem; }
.auth-spinner {
 width: 14px; height: 14px;
 border: 2px solid transparent;
 border-top: 2px solid currentColor;
 border-radius: 50%;
 animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
 RESPONSIVE
 ============================================= */

@media (max-width: 768px) {
 .auth-container { padding: 1rem; }
 .auth-card { padding: 1.5rem; }
 .auth-title { font-size: 1.35rem; }
 .auth-form-row-2col { grid-template-columns: 1fr; }

 .dashboard-header { flex-direction: column; align-items: flex-start; }
 .dashboard-grid { grid-template-columns: 1fr; }
 .dashboard-info { flex-direction: column; gap: 0.5rem; }
 .footer-auth { flex-direction: column; text-align: center; }
 .footer-bottom-auth { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
 .auth-card { padding: 1.25rem; max-width: 100%; }
 .auth-form-input { padding: 0.75rem 0.85rem; }
 .auth-btn { padding: 0.85rem 1.5rem; font-size: 0.95rem; }
}
