/* ===================================================
   ESTILOS PARA SISTEMA DE AUTENTICAÇÃO SEGURO
   ================================================= */

/* Login Container */
#login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Login Box */
.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    animation: slideUp 0.5s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #4F46E5;
    margin-bottom: 15px;
}

.login-header.warning i {
    color: #F59E0B;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: #6B7280;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 8px;
    color: #4F46E5;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
    color: #9CA3AF;
}

/* Form Check */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    color: #6B7280;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #4F46E5;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: #6B7280;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #4B5563;
}

.btn-block {
    width: 100%;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.login-footer i {
    color: #10B981;
    margin-right: 8px;
}

.login-footer small {
    font-size: 12px;
    color: #6B7280;
}

/* Info Box */
.info-box {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.info-box i {
    color: #3B82F6;
    font-size: 20px;
    flex-shrink: 0;
}

.info-box p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #1E40AF;
}

.info-box ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.info-box li {
    font-size: 13px;
    color: #1E40AF;
    margin: 4px 0;
}

.info-box strong {
    color: #1E3A8A;
}

/* Code Display */
.code-display {
    background: #1F2937;
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin: 12px 0;
    font-family: 'Courier New', monospace;
}

.code-display i {
    color: #10B981;
    margin-right: 12px;
}

.code-display span {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
}

/* Init Message */
.init-message {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.init-message i {
    color: #F59E0B;
    font-size: 24px;
    margin-bottom: 12px;
    display: block;
}

.init-message p {
    font-size: 14px;
    color: #92400E;
    margin: 8px 0;
}

/* Access Denied */
.access-denied {
    text-align: center;
    padding: 60px 20px;
}

.access-denied i {
    font-size: 80px;
    color: #EF4444;
    margin-bottom: 20px;
}

.access-denied h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 12px;
}

.access-denied p {
    font-size: 16px;
    color: #6B7280;
    margin-bottom: 30px;
}

/* Modal Content */
.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.large {
    max-width: 900px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 i {
    color: #4F46E5;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-close:hover {
    background: #F3F4F6;
    color: #1F2937;
}

/* Modal Body */
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #E5E7EB;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card i {
    font-size: 32px;
    color: #4F46E5;
}

.stat-card.success i {
    color: #10B981;
}

.stat-card.danger i {
    color: #EF4444;
}

.stat-card.warning i {
    color: #F59E0B;
}

.stat-info h4 {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

/* Perfis Stats */
.perfis-stats {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
}

.perfis-stats h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 16px;
}

.perfis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.perfil-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #F3F4F6;
    border-radius: 8px;
}

.perfil-name {
    font-size: 14px;
    color: #374151;
}

.perfil-count {
    font-size: 16px;
    font-weight: 700;
    color: #4F46E5;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge.success {
    background: #D1FAE5;
    color: #065F46;
}

.badge.danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge.info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge.warning {
    background: #FEF3C7;
    color: #92400E;
}

.status-active {
    background: #D1FAE5;
    color: #065F46;
}

.status-inactive {
    background: #FEE2E2;
    color: #991B1B;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    color: #6B7280;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #4F46E5;
    color: white;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
        max-width: 90%;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .perfis-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
        max-width: 90%;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .perfis-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   CORREÇÃO LOGIN v8.0 - 04/12/2024
   ============================================================ */

/* Inputs do formulário de login */
.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    transition: all 0.3s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input::placeholder {
    color: #9CA3AF;
}

/* Botão de login */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    background: #4F46E5;
    color: white;
    margin-top: 10px;
}

.btn-login:hover:not(:disabled) {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alertas de erro/sucesso */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert strong {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.alert-error {
    background: #FEE2E2;
    border: 2px solid #EF4444;
    color: #991B1B;
}

.alert-success {
    background: #D1FAE5;
    border: 2px solid #10B981;
    color: #065F46;
}
