/* ============================================
   PÁGINAS DE AUTENTICAÇÃO - PADRÃO RÁDIO
   ============================================ */

/* Reset e Body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Body específico para páginas de autenticação */
body.auth-page {
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 0 !important; /* Remove padding do radio-public.css */
    display: flex !important;
    flex-direction: column !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Remove qualquer espaço após o body */
body.auth-page::after {
    display: none !important;
}

/* Variáveis CSS */
:root {
    --auth-bg-primary: #ffffff;
    --auth-bg-secondary: #f8f9fa;
    --auth-text-primary: #4A4A4A;
    --auth-text-secondary: #666666;
    --auth-text-muted: #999999;
    --auth-border: #e0e0e0;
    --auth-primary: var(--cor-primaria, #FF9800);
    --auth-primary-hover: var(--cor-secundaria, #F57C00);
    --auth-shadow: rgba(0, 0, 0, 0.1);
    --auth-shadow-hover: rgba(255, 152, 0, 0.3);
    --auth-input-bg: #ffffff;
    --auth-input-border: #e0e0e0;
    --auth-card-bg: #ffffff;
    --auth-footer-bg: #4A4A4A;
    --auth-footer-text: rgba(255, 255, 255, 0.9);
}

/* Header de Autenticação */
.auth-header {
    background: var(--auth-bg-primary);
    padding: 15px 0;
    box-shadow: 0 2px 10px var(--auth-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--auth-text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: opacity 0.3s;
}

.auth-logo:hover {
    opacity: 0.8;
}

.auth-logo i {
    font-size: 2rem;
    color: var(--auth-primary);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--auth-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-back:hover {
    background: var(--auth-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--auth-shadow-hover);
}

/* Main Container */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: var(--auth-bg-secondary);
    transition: background-color 0.3s ease;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

/* Card de Autenticação */
.auth-card {
    background: var(--auth-card-bg);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 20px var(--auth-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Header do Card */
.auth-card .auth-header {
    text-align: center;
    margin-bottom: 2rem;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.auth-card .auth-header i {
    font-size: 4rem;
    color: var(--auth-primary);
    margin-bottom: 1rem;
    display: block;
}

.auth-card .auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.auth-card .auth-header p {
    color: var(--auth-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--auth-text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    border: 2px solid var(--auth-input-border);
    border-radius: 10px;
    transition: all 0.3s;
    background: var(--auth-input-bg);
    color: var(--auth-text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.form-control::placeholder {
    color: var(--auth-text-muted);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--auth-primary);
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    border: 2px solid var(--auth-input-border);
    border-radius: 4px;
    background: var(--auth-input-bg);
    transition: all 0.3s;
}

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--auth-text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-check-label a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}

.form-check-label a:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* Botões */
.btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--auth-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
}

.btn-primary:hover {
    background: var(--auth-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--auth-shadow-hover);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-google {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    background: var(--auth-input-bg);
    border: 2px solid var(--auth-input-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-google:hover {
    border-color: #4285f4;
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.2);
}

.btn-google i {
    font-size: 1.25rem;
    color: #4285f4;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--auth-text-muted);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--auth-border);
}

.divider span {
    padding: 0 1rem;
}

/* Links */
.forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password a {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.forgot-password a:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* Footer do Card */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-text-secondary);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* Tipo de Usuário */
.tipo-usuario-info {
    margin-bottom: 2rem;
}

.tipo-usuario-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.tipo-card {
    padding: 1.25rem;
    border: 2px solid var(--auth-border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--auth-input-bg);
}

.tipo-card:hover {
    border-color: var(--auth-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--auth-shadow-hover);
}

.tipo-card.active {
    border-color: var(--auth-primary);
    background: rgba(255, 152, 0, 0.05);
}

.tipo-card i {
    font-size: 2rem;
    color: var(--auth-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.tipo-title {
    font-weight: 700;
    color: var(--auth-text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.tipo-desc {
    font-size: 0.8rem;
    color: var(--auth-text-secondary);
    transition: color 0.3s ease;
}

.info-redirect {
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.info-redirect i {
    color: var(--auth-primary);
}

/* Password Tips */
.password-tips {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--auth-bg-secondary);
    border-radius: 8px;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.password-tips-header {
    font-weight: 600;
    color: var(--auth-text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.password-tips-header i {
    color: var(--auth-primary);
}

.password-requirements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.password-requirements li i {
    font-size: 0.9rem;
}

.password-requirements li.valid {
    color: #28a745;
}

/* Password Strength */
#password-strength {
    margin-top: 0.75rem;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: var(--auth-border);
    border-radius: 2px;
    transition: background-color 0.3s;
}

.strength-bar.active-weak {
    background: #dc3545;
}

.strength-bar.active-medium {
    background: #ffc107;
}

.strength-bar.active-good {
    background: #17a2b8;
}

.strength-bar.active-strong {
    background: #28a745;
}

#strength-text {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Footer Bottom */
.auth-page .auth-footer-bottom {
    background: var(--auth-footer-bg);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--auth-footer-text);
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

.auth-page .auth-footer-bottom .container {
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0 2rem;
}

.auth-page .auth-footer-bottom p {
    margin: 0 !important;
    padding: 0 !important;
}

/* Esconder barra LGPD nas páginas de autenticação */
.auth-page .lgpd-bar,
.auth-page #lgpd-bar,
.auth-page [class*="lgpd"],
.auth-page [id*="lgpd"] {
    display: none !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-header .container {
        padding: 0 1rem;
    }

    .auth-logo span {
        display: none;
    }

    .btn-back span {
        display: none;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .tipo-usuario-cards {
        grid-template-columns: 1fr;
    }

    .auth-main {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }

    .auth-card .auth-header h2 {
        font-size: 1.5rem;
    }

    .auth-card .auth-header i {
        font-size: 3rem;
    }
}
